AN00182 HID Class with linux host

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
pasau
Experienced Member
Posts: 77
Joined: Fri Dec 06, 2013 7:05 pm

AN00182 HID Class with linux host

Postby pasau » Mon Mar 02, 2020 11:06 pm

I found that this application example with the xCORE-200 explorerKIT platform does not work for me on a linux host. I can't move the mouse. I tried 2 different machines, but it works on a Windows host. The CDC example AN00184 works though.

the mouse seems to be seen properly as input device from the kernel log:

Code: Select all

dmesg -T | grep -i usb | tail -n 7
[Mon Mar  2 15:46:31 2020] usb 2-3: new high-speed USB device number 7 using xhci_hcd
[Mon Mar  2 15:46:31 2020] usb 2-3: New USB device found, idVendor=20b1, idProduct=1010, bcdDevice=10.00
[Mon Mar  2 15:46:31 2020] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Mon Mar  2 15:46:31 2020] usb 2-3: Product: Example HID Mouse
[Mon Mar  2 15:46:31 2020] usb 2-3: Manufacturer: XMOS
[Mon Mar  2 15:46:31 2020] input: XMOS Example HID Mouse as /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:1.0/0003:20B1:1010.0002/input/input26
[Mon Mar  2 15:46:31 2020] hid-generic 0003:20B1:1010.0002: input,hidraw0: USB HID v11.10 Mouse [XMOS Example HID Mouse] on usb-0000:00:14.0-3/input0
Of course, i have no problem with any other mouse, which is what makes this suspicious, maybe a driver issue. does anyone have the same issue?
scryver
Newbie
Posts: 1
Joined: Mon Oct 12, 2020 5:35 pm

Postby scryver » Mon Oct 12, 2020 5:40 pm

I know it's months later, but... there is a bug in the HID report definition. It says it makes a relative wheel input, but the actual code makes an absolute wheel input. Stupid thing is, in the comment it says it does the relative one... so you see how helpful comments can be.
The needed byte is 0x6 instead of 0x2. I don't have the code on hand so I don't know the exact line number, but I think you could find it with this description.

Good luck!

Who is online

Users browsing this forum: No registered users and 6 guests