EspTinyUSB icon indicating copy to clipboard operation
EspTinyUSB copied to clipboard

ESP32-S2 HID sendRelease not working

Open khorght opened this issue 1 year ago • 2 comments

MCU - ESP32-S2 IDE - Arduino IDE 2.1.0 Library - EspTinyUSB 2.0.2

dev.sendRelease() not working, keycode keeps appearing on Host PC Notepad forever after dev.sendKey(HID_KEY_A);

Tryed to investigate a bit more - looks like it all about HID can't send more than one report, any first report is sent successfully, after that any further reports is failing.

khorght avatar Jun 30 '23 14:06 khorght

You have to add small delay between send and release, like 10ms or so.

chegewara avatar Jul 03 '23 00:07 chegewara

Hi, chegewara. I've tryed delay from 1 ms to 50 ms with no luck. Issue is not in sendRelease itself, only first report send is working and returning true and appears in wireshark, any other attempt to send report regardless of delay between them returns false, wireshark shows nothing. I'll try to investigate further, maybe, currently i've jumped to native esp-idf environment project, works as expected with esp-idf 5.1. Anyway thanx for your hard work.

khorght avatar Jul 04 '23 05:07 khorght