-
I'm having an issue that's proving difficult to debug. (not a bug report because I'm not sure it is a bug) The issue in its essence is that the device fails to send some hid reports, in this project we have implemented a protocol through hid reports, the host sends a hid packet through the interrupt pipe, and the device responds appropriately, similar to the hid generic in out example, but the host times out waiting for the response, because apparently the device fails to send it. What i tried: I know there's not enough information here to identify the issue, but I'm a bit at a loss here so i don't even know what to provide. For reference here is the example i made to test (that works) (BOARD=stm32f103bluepill) and this is the code that doesn't work (also running on a stm32f103 bluepill) (might be hard to follow) Important details: I will attach built binaries for my project if someone wants to run them on a bluepill (swo enabled 6MHz on PB3, TUSB LOG 2) Testing the protocol is possible by running ratbagd on linux I'm not asking for someone to debug the project for me, just providing the means. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
@perigoso can you post the log=2 here (portion around the issue occurred) for analysis. Also you may want to check the return of tud_hid_report() to see if it queues transfer correctly. There maybe race condition between the hid_ready() check and when sending out report. Another question is, did the exact code work on other MCU e.g stm32f4 ? |
Beta Was this translation helpful? Give feedback.
-
Tusb Log, this is in response to a 8 byte request by the host, the data is the expected, the host di not receive a response.
This is a different request by the host, but the reply comes in a 8 byte report, the data is also the expected, this time the host received the response
|
Beta Was this translation helpful? Give feedback.
-
After banging my head for a good while, i finally found the issue, I had the endpoint configured to 32 bytes, setting it to 64 fixed it, (im not using the macros from tusb, making them by hand). That said, shouldn't it work? I was sending 32 byte reports (including ID) so it should've been fine no? @hathach |
Beta Was this translation helpful? Give feedback.
After banging my head for a good while, i finally found the issue, I had the endpoint configured to 32 bytes, setting it to 64 fixed it, (im not using the macros from tusb, making them by hand).
That said, shouldn't it work? I was sending 32 byte reports (including ID) so it should've been fine no? @hathach