-
-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RawHID.write not working on a Leonardo clone #91
Comments
Arduino IDE 1.6.9 was reported to work and creashed with 1.6.10. |
Looks like this change in the arduino IDE between versions 1.6.9 and 1.6.10 makes a RawHID.write of 64 bytes stop working. |
As a workaround you can either revert the arduino IDE change referenced above. |
It also broke the gamepad. Vote the bug here: arduino/Arduino#5732 |
I'm unable to work RawHID.write , |
Has a solution been identified for this problem? Please update this thread if that is the case. RawHID.write does not work. No data is sent to the PC. |
@jbutzine Which IDE version do you use? It should be fixed in 1.8.2 but I never tested it. And I have no time in the near future |
I'm using 1.8.2 |
Ok. It works. I have to back out a few changes I tweaked to determine what change made it work. I'll update this thread. |
The call to RawHID.write needs to be : RawHID.write(buffer, (sizeof(buffer)-1)); |
Then the bug is still inside the code or arduino core. Someone needs to look at it and fix it. I dont have time nor equipment now. |
My apologies; it does appear that this bug was fixed with the 1.8.2 release of Arduino. My build was still using the old USBCore.cpp. When doing the Arduino update the install updated the USBCore.cpp located here: C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\USBCore.cpp Instead of the one here: C:\Users\xxxxxxxx\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\cores\arduino\USBCore.cpp When I manually updated the file in the AppData directory, then the 64 byte transactions worked. Sorry for the boondoggle. |
Thank to authors ! I change c:\Users\Documents\Arduino\libraries\HID-Project\src\SingleReport\RawHID.h to |
Using the /examples/RawHID/RawHID/RawHID.ino sketch on a Leonardo clone board with a LED and Button attached. Using the test program in /extras/rawhid/ to communicate with it.
I am able to send data from the PC to the board - the USB LED and LED flash.
When I press the button the LED flashes but the USB LED doesn't flash and nothing is received by the PC. I have also used Wireshark to sniff the USB traffic and it show there is no communication when I press the Button.
The text was updated successfully, but these errors were encountered: