chegewara / EspTinyUSB

ESP32S2 native USB library. Implemented few common classes, like MIDI, CDC, HID or DFU (update).
MIT License
473 stars 70 forks source link

ESP32-S2 HID sendRelease not working #144

Open khorght opened 1 year ago

khorght commented 1 year ago

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.

chegewara commented 1 year ago

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

khorght commented 12 months ago

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.