-
Notifications
You must be signed in to change notification settings - Fork 22
Input devices
Sdrberry supports several input devices:
- touch
- Mouse
- Keyboard
- Contour ShuttleXress
- USB CAT interface (Like ESP32)
- USB Volume controler (cheap Aliexpress volume controler)
Standard touch screens are detected by sdrberry. However nonstandard driver can not always be found. To help sdrberry to find the correct driver You can add the driver name to the cfg file. Change the touchscreen entry to the correct driver name. Touch xy coordinates can be swapped by setting touch_swap_xy to 0,1,2 or 3
0 no swap
1 xy swap
2 x inverted
3 rotate
4 xy swap + rotate
[input]
mouse = "Mouse"
touch_swap_xy = "0"
touch_debug = "0"
touchscreen = "raspberrypi-ts"
To check the touch screen xy coordinates set touch_debug = 1. The xy coordinates will be printed to stdout.
Midi is not tested yet. The driver is already present but need some extra development and testing.
The mouse can be very slow in response to movement. To fix this add to the end of cmdline.txt (/boot/firmware/cmdline.txt)
usbhid.mousepoll=2
The complete line shoudl look something like this (example from raspberry pi5, but this also works for pi4)
console=serial0,115200 console=tty1 root=PARTUUID=fb78368c-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=NL usbhid.mousepoll=2
Check the device ID by using lsusb
pi@pi2:~ $ lsusb
Bus 002 Device 002: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Bus 001 Device 007: ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
Bus 001 Device 009: ID 0bda:c811 Realtek Semiconductor Corp. 802.11ac NIC
Bus 001 Device 008: ID 413d:553a
Bus 001 Device 003: ID 214b:7250 Huasheng Electronics USB2.0 HUB
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Add the device ID to sdrberry_config.cfg input section, hiddevice item.
[input]
hiddevice = "413d:553a"
Sdrberry has implemented a CAT interface based on the FT-891 CAT set but is extended. Sdrberry will check the USB bus if there is a CAT device, this is configured in sdrberry_config.cfg.
[CAT]
USB = "/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0"
The following CAT commands are supported:
AB // Copy VFO-A to VFO-B
AI // ( 0 or 1) Turn auto-information on or off
BA // Copy VFO-B to VFO-A
BS // Band select
EX // Menu commands (ignored)
FA // Set or request VFO-A frequency
FB // Set or request VFO-B frequency
ID // Request radio's ID (0650 for the FT-891)
IF // Information request/answer
IS0 // Set or request IF shift
MD0 // Set or request mode (USB, LSB, CW, etc.)
NA0 // Request narrow IF shift
OI // Opposite Band Information request/answer
RIC // Alternate way of asking for split status
RM // Read meter
SH0 // Set or request IF bandwidth
SM0 // Read S-meter
ST // ( 0 - 2) Split mode off, on or on +5KHz up
SV // Swap VFOs
TX // Set or request transmit/receive status
FT // Frequency Tune step frequency + or - X (It is assumed tranceiver will respond with FA or FB command
AG // Set Volume
RG // Set rf gain
GT // Get command 0 = Max Volume, 1 Max Gain, 2 List bands, 3 List Filter
IG
Install evtest tool and run evtest.
sudo apt install -y evtest
sudo evtest
Output should be something like this:
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: C-Media Electronics Inc. USB Audio Device
/dev/input/event1: Contour Design ShuttleXpress
/dev/input/event10: vc4-hdmi-1
/dev/input/event11: vc4-hdmi-1 HDMI Jack
/dev/input/event12: 11-005d Goodix Capacitive TouchScreen
/dev/input/event2: Microsoft Microsoft® Nano Transceiver v1.0
/dev/input/event3: Microsoft Microsoft® Nano Transceiver v1.0 Mouse
/dev/input/event4: Microsoft Microsoft® Nano Transceiver v1.0 Consumer Control
/dev/input/event5: Microsoft Microsoft® Nano Transceiver v1.0 Consumer Control
/dev/input/event6: Microsoft Microsoft® Nano Transceiver v1.0 System Control
/dev/input/event7: pwr_button
/dev/input/event8: vc4-hdmi-0
/dev/input/event9: vc4-hdmi-0 HDMI Jack
Select the device event number [0-12]: 12
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x416 product 0x38f version 0x1060
Input device name: "11-005d Goodix Capacitive TouchScreen"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 59 (KEY_F1)
Event code 60 (KEY_F2)
Event code 61 (KEY_F3)
Event code 62 (KEY_F4)
Event code 63 (KEY_F5)
Event code 64 (KEY_F6)
Event code 125 (KEY_LEFTMETA)
Event code 330 (BTN_TOUCH)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 207
Min 0
Max 719
Event code 1 (ABS_Y)
Value 604
Min 0
Max 1279
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 9
Event code 48 (ABS_MT_TOUCH_MAJOR)
Value 0
Min 0
Max 255
Event code 50 (ABS_MT_WIDTH_MAJOR)
Value 0
Min 0
Max 255
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 719
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 1279
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 65535
Properties:
Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)
Event: time 1737992459.964306, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 8
Event: time 1737992459.964306, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 333
Event: time 1737992459.964306, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 226
Event: time 1737992459.964306, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 49
Event: time 1737992459.964306, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 49
Event: time 1737992459.964306, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1737992459.964306, type 3 (EV_ABS), code 0 (ABS_X), value 333
Event: time 1737992459.964306, type 3 (EV_ABS), code 1 (ABS_Y), value 226
Event: time 1737992459.964306, -------------- SYN_REPORT ------------
Event: time 1737992460.101655, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 334
Event: time 1737992460.101655, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 231
Event: time 1737992460.101655, type 3 (EV_ABS), code 0 (ABS_X), value 334
Event: time 1737992460.101655, type 3 (EV_ABS), code 1 (ABS_Y), value 231
Event: time 1737992460.101655, -------------- SYN_REPORT ------------
Event: time 1737992460.125658, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 337
Event: time 1737992460.125658, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 266
Event: time 1737992460.125658, type 3 (EV_ABS), code 0 (ABS_X), value 337
Event: time 1737992460.125658, type 3 (EV_ABS), code 1 (ABS_Y), value 266
Event: time 1737992460.125658, -------------- SYN_REPORT ------------
Event: time 1737992460.149657, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 342
Event: time 1737992460.149657, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 302
Event: time 1737992460.149657, type 3 (EV_ABS), code 0 (ABS_X), value 342
Event: time 1737992460.149657, type 3 (EV_ABS), code 1 (ABS_Y), value 302
Event: time 1737992460.149657, -------------- SYN_REPORT ------------
Event: time 1737992460.173655, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 350
Event: time 1737992460.173655, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 337
Event: time 1737992460.173655, type 3 (EV_ABS), code 0 (ABS_X), value 350
Event: time 1737992460.173655, type 3 (EV_ABS), code 1 (ABS_Y), value 337
Event: time 1737992460.173655, -------------- SYN_REPORT ------------
Event: time 1737992460.197658, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 354
Event: time 1737992460.197658, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 359
Event: time 1737992460.197658, type 3 (EV_ABS), code 0 (ABS_X), value 354
Event: time 1737992460.197658, type 3 (EV_ABS), code 1 (ABS_Y), value 359
Event: time 1737992460.197658, -------------- SYN_REPORT ------------