Closed fink-at-trmc-dk closed 1 year ago
Hi @fink-at-trmc-dk,
It seems that you have just queued the data but did not actually launched the sending process. But that is just a guess.
May I ask you to share the part of the code that you use to send the data through HID IN endpoint exactly?
Thanks and best wishes, RJ
Hi, Yes, this was also my initial guess, but I can't see where the actual sending should be triggered. The application code (minimal project) is attached in the initial post. BR Fink
Hi @fink-at-trmc-dk,
Thanks for attaching the application code. From the first glance we have a line "USBD Xfer Complete on EP 81 with 5 bytes" in log which means that the transfer with EP 81 has been completed. To say more, it needs to be investigate deeply to see what is happening.
Meanwhile, you can try to solve the problem on your own with the following steps:
I will return to this issue ASAP. Feel free to ask questions.
Regards, RJ
Hi again, Thanks for taking your time on this! The descriptors are copied from the old project, so I assume the endpoints being used are the same. I do not know if that assumption is safe, but I will investigate. This could potentially be an easy fix :-) The result was the same if I tried sending 64 bytes, so I do not think that this would be the problem. I will do my homework on your inputs regarding EP81/EP0 an return back later :-) //Fink
Update: After using (USB analyzer) I can clearly see that the data are indeed returned to the host. They are, however, not picked up by the application even though they are the same type (Interrupt, EP81, size etc.) This is quite weird but I do not think I can blame the ESP32 for this one. I hereby humbly close the issue while thanking you for your time and pointers :-) BR Fink
Hi @Rasmus-Fink, Happy to help.
If there will be more strange or questioning behavior feel free to open an issue.
Good luck.
RJ
Hi again,
Device: ESP32-S3 ESP-IDF: ESP-IDF v5.1-dev-3296-g76433e4cb2
Porting an application from STM32 to ESP32 I need to have the ESP32 behave as a Custom HID Device and talk to it via a C# program on windows.
IT enumerates fine and the host loads the driver and the PC application sends a message the ESP32 HID Device. This is visible in the log below.
My problem is that it seems that the device does not send a response back. In the log below is seen that the response is queued as expected, but I cannot see the response in the PC Application at a breakpoint on incoming data (the original STM32 based device sends a response back and this is detected at this breakpoint in the C# application)
Any help on this matter is highly appreciated :-)
Below is the log showing this and the source for this application is attached.
BR Fink
tusb_hid.zip