-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
USB Host sometimes freezes randomly (IDFGH-14198) #14996
Comments
Hi @alex-k8, Could you please attach the Thanks. |
Hey @roma-jam I only have access to two of them at the moment, so I'll attach those. CharaChorder Lite:
Logitech G403 Hero Mouse:
Let me know if you need anything further. I've been trying to troubleshoot this for months but unfortunately I couldn't figure it out. Thank you! |
Hi @alex-k8 , Thanks for the prompt response. I‘ll try to find a way to reproduce the problem. Meanwhile, could you try to reproduce it with Thanks. |
Thank you @roma-jam |
Hey @roma-jam I managed to reproduce it on v5.1.2. I reproduced it twice in about 10 minutes with my mouse. I think it's running either at 500 or 1000hz. Mouse data is definitely faster than keyboard data so if my theory is correct, it makes sense because the keyboard cannot send data that fast compared to the mouse. So if you have a gaming mouse or something laying around, I suspect you will be able to reproduce it. Unfortunately I don't have another high polling rate mouse to test it. I tested it with a cheap aliexpress mouse and I couldn't reproduce it, at least in the 30 minutes that I tried. |
Answers checklist.
IDF version.
v5.3.1
Espressif SoC revision.
ESP32-S3
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
PowerShell
Development Kit.
ESP32-S3-DevKitC-1 & Custom Board
Power Supply used.
USB
What is the expected behavior?
I expected the USB Host functionality to work without randomly freezing.
What is the actual behavior?
Randomly, either after 5 minutes or 5 hours, the USB Host does not receive any more data from the connected device. I press keys on my keyboard, or move my mouse, and I don't see any logs. I either have to replug the device, or restart the ESP board. This happens only on a few keyboards and mice. I suspect it has something to do with higher polling rate devices, since I never experienced it on my older keyboard.
Steps to reproduce.
Debug Logs.
More Information.
The only change I made to the code was that I use
hid_class_request_set_protocol(hid_device_handle, HID_REPORT_PROTOCOL_REPORT)
instead ofhid_class_request_set_protocol(hid_device_handle, HID_REPORT_PROTOCOL_BOOT)
in order to receive all the data that I need. This happens on a custom board as well as the ESP32-S3-DevKitC-1. It happens in both USB power and battery power. I've logged the available memory and there's no memory leak. Seems to be software related and not hardware. It happens in both the ESP-IDF through VS Code, and in the Arduino IDE port.Specific devices that I have noticed this issue is happening: UHK keyboard with pointer module, All CharaChorder keyboards, Logitech G430 Hero
The text was updated successfully, but these errors were encountered: