4

I have a device that has this output in /proc/bus/input/devices:

I: Bus=0003 Vendor=05b8 Product=3280 Version=0111
N: Name="PixArt USB Optical Mouse"
P: Phys=usb-0000:00:1a.0-1.1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input89
U: Uniq=
H: Handlers=mouse3 event5 
B: PROP=0
B: EV=17
B: KEY=ff0000 0 0 0 0
B: REL=103
B: MSC=10

Where are these bitfields (KEY, REL etc.) set?

Looking around the linux source, it looks like the specific drivers set the bitfields. However, the module that is installed for this device is hid_generic1, which does almost nothing.

I imagine there's also another driver that's listening to the mouse. Is it mousedev? It's something that's creating a file called /dev/input/mouse3. It seems mousedev needs the bitfields to be set before it decides that it is the driver to match to the mouse device.

Footnotes

1 - How I know hid_generic is being used

dmesg output when I plug in the moues:

[272055.191824] usb 1-1.1: new low-speed USB device number 23 using ehci-pci
[272055.288221] usb 1-1.1: New USB device found, idVendor=05b8, idProduct=3280
[272055.288232] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[272055.288238] usb 1-1.1: Product: USB Optical Mouse
[272055.288243] usb 1-1.1: Manufacturer: PixArt
[272055.291101] input: PixArt USB Optical Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input88
[272055.291774] hid-generic 0003:05B8:3280.004A: input,hidraw2: USB HID v1.11 Mouse [PixArt USB Optical Mouse] on usb-0000:00:1a.0-1.1/input0

Note hid-generic is mentioned. I can further verify this by running sudo rmmod hid_generic and then unplugging and re-plugging the device in. sudo lsmod | grep hid_generic shows that it's back.

theicfire
  • 621
  • 5
  • 10
  • Aren't these values sent by the device? What problem are you trying to solve? If the problem is getting the right driver to be loaded, that's normally a matter of updating the source code of the driver. If there's a new model that can be managed by a pre-existing driver, there's a generic load-driver-module-by-ID mechanism, but the driver might not pick up the hardware if it doesn't recognize it. – Gilles 'SO- stop being evil' Oct 21 '14 at 22:01
  • As nobody answered, I'd ask at kernel mailing list. – Hi-Angel Jun 11 '16 at 06:46
  • @Hi-Angel any news?) – eri Dec 28 '22 at 08:53
  • 1
    @eri though I can't remember for sure as it's a very old comment, but judging from the text I'd assume it was a suggestion to the OP regarding further actions. I don't think I myself ever asked that question. – Hi-Angel Dec 28 '22 at 08:57
  • 1
    @Hi-Angel i only found EV bits, but no REL or KEY. REL & 3 seems is xyz; KEY[0]& 70000 seems is left,right,center buttons. – eri Dec 28 '22 at 09:15

0 Answers0