AN00182 HID Class with linux host

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
pasau
Experienced Member
Posts: 77
Joined: Fri Dec 06, 2013 7:05 pm

AN00182 HID Class with linux host

Post by pasau »

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

Post by scryver »

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!
nathanfauvey
Junior Member
Posts: 5
Joined: Mon May 23, 2022 10:50 am

Post by nathanfauvey »

Hi all,
First post for me, but I have the same kind of problem here, I am new to XMOS product and bought the XCORE-200 explorer kit. I am making myself familiar one step at a time with the tools.
My problem is when I run the "AN00182_hid_extended_explorer", it seems that nothing happens. At least at the user view (me).

Also, when I check the debug configuration panel, the device options indicates : "Target: XMOS XTAG-3 connected to None [.XNfaW.L]"

SETUP :
-Linux OS (Ubuntu 20.04)
-XCORE-200 explorer kit linked with XTAG-3 (both HS USB and 5V IN are connected to PC, and obviously the XTAG too)
- xTIMEcomposer 14.4.1 tool
nathanfauvey
Junior Member
Posts: 5
Joined: Mon May 23, 2022 10:50 am

Post by nathanfauvey »

Just to reply to my previous post, the last part about the XTAG connected to None is no longer a problem (I just disconnected then reconnected and it sees it).
However, the main problem remains, and I get the same thing when I enter the command line described above.
Please do not hesitate to reply something as I am a novice... Thank you !!
Post Reply