==== Logitech wireless mouse/trackball ====
To handle old (not Unifying Receiver) Logitech product:
sudo apt-get install lomoco
sudo lomoco -i
003.005: 046d:c508 Receiver for Cordless Optical TrackMan (C-BA4-MSE) Caps: CSR SMS
Receiver type: C508
Mouse type: Cordless Optical TrackMan
Connect button on mouse pressed: no
Active RF Channel: 1
Battery status: 7 (full)
Cordless security ID: 0x8e16
Receiver talking: yes
Lock Request (CONNECT button pressed): no
Mouse Powerup (First time out of the box auto-locking): no
Receiver Unlocked (Mouse disconnected): no
Wait Lock (Searching for mouse): no
Device physical shape type: 0
SmartScroll (SMS): reporting not supported
USB Mouse Polling Interval: 10ms
sudo lomoco --pid=C508 -i | grep -w "Battery status:"
For logitech devices there are additional packets:
[[https://wiki.archlinux.org/index.php/Logitech_Marble_Mouse]]
=== Change trackball pointer speed ===
Using CTM:
#!/bin/bash
xinput set-prop "Logitech USB Receiver" "libinput Accel Speed" 1
xinput set-prop "Logitech USB Receiver" "Coordinate Transformation Matrix" \
2.000000, 0.000000, 0.000000, \
0.000000, 2.000000, 0.000000, \
0.000000, 0.000000, 1.000000
=== Automatic speed change when device connected ===
dmesg
164704.769399] usb 1-6: new low-speed USB device number 11 using xhci_hcd
[164704.931613] usb 1-6: New USB device found, idVendor=046d, idProduct=c508, bcdDevice=15.00
[164704.931621] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[164704.931623] usb 1-6: Product: USB Receiver
[164704.931625] usb 1-6: Manufacturer: Logitech
[164704.937746] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:046D:C508.0008/input/input21
[164704.997603] hid-generic 0003:046D:C508.0008: input,hidraw3: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:14.0-6/input0
udevadm info --attribute-walk --path /sys/devices/pci0000\:00/0000\:00\:14.0/usb1/1-6/1-6\:1.0/0003\:046D\:C508.0008/input/input21
# or simply
udevadm info --attribute-walk --path /dev/input/mouse0
looking at parent device '//devices/pci0000:00/0000:00:14.0/usb1/1-6':
ATTRS{idProduct}=="c508"
ATTRS{idVendor}=="046d"
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c508", SYMLINK+="trackman"
ACTION=="add|change", \
SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c508", \
ENV{DISPLAY}=":0", \
ENV{XAUTHORITY}="/home/localuser/.Xauthority", \
RUN+="/root/sc/logitech-set-sens.sh"
udevadm control --reload-rules && udevadm trigger -s usb -a idProduct="c508"