-
-
Notifications
You must be signed in to change notification settings - Fork 420
Description
I've been trying to get raw HID. It's partially working but not quite. I'm wondering if it's expecting to work and if not, what I need to do to make it work? I've been looking through the source and there are quite a comments that suggest that it might not be complete. I don't understand many of them.
I have a genuine Arduino Uno with a 16u2. I've put Hoodloader2 on it and it works exactly as expected - I can upload programs to it and communicate with the other AVR on the same board.
I'm now trying to use RawHID to set up a bidirectional link between my Uno and the PC using my own vendor id and product id. I'm using hidapi on Windows 10 (from the main repo) on the PC.
When I enumerate devices on the PC, I see the 16u2 and I can connect to it. I can send bytes with hid_write() on the PC and receive them using RawHID.read() on the 16u2. This is great. (hidapi sends on the first OUT endpoint or the control endpoint is there isn't an OUT one. I'm not sure which it happening this case.)
However when I try to send from the 16u2 using RawHID.write() it is not received by the PC. Using Wireshark I can see that each character is arriving as the single payload byte in a URB_INTERRUPT packet but hid_read() does not return them.
Is this expected to work? Is there something else I need to do?
Also:
-
RawHID doesn't work in a multi-report interface. Because of the serial port that the 16u2 is implemented is this a multi-report system. Do I need to turn off the serial port somehow?
-
Can I induce RawHID to send on endpoint 0, the control endpoint?
Thanks,
Martin.