Closed mrweaver closed 2 months ago
Hi @mrweaver thank you for reporting the issue and for providing all the logs. We will have a look and let you know.
Hi @peter-marcisovsky, thanks very much for that, I really appreciate it. Please let me know if you need more details.
Hi @mrweaver ,
Thanks for the detailed logs.
I have tried adding various delays in the code
There are three configurable parameters available with the menuconfig. More details here:
DEBOUNCE_DELAY
RESET_HOLD_DELAY
RESET_RECOVERY_DELAY
Have you tried to change them? Could you increase the RESET_HOLD
and RESET_RECOVERY
for, lets say, 500 ms (default values are 30 ms) and try to connect the device again?
The problem should be the same with hid
example and usb_host_lib
, so you can use the last one to eliminate the hid logic from verification to simplify the output.
Do you have any option to use USB analyzer to capture the transfer log with the device you are trying to use?
Hey @roma-jam,
Thanks for getting back to me. I did see those parameters, but for some reason I (rather foolishly, in hindsight) assumed that the device should follow the standard USB timings and so I didn't change them.
Anyway, I recompiled it with some different values and found that for the case of this particular device, configuring the parameter RESET_RECOVERY
to 80ms+ (while leaving the others as default) seems to do the trick and it resolves the issue - that is the device is discovered on boot.
Thanks so much for your help, I really appreciate it.
Cheers, Michael.
Answers checklist.
IDF version.
v5.2.2
Espressif SoC revision.
ESP32-S3 (QFN56) (revision v0.1)
Operating System used.
Windows
How did you build your project?
Command line with CMake
If you are using Windows, please specify command line type.
PowerShell
Development Kit.
Custom board
Power Supply used.
USB
What is the expected behavior?
Run
hid_host_example.c
and have the USB HID remote (G20s Pro) automatically detected and functional on boot.What is the actual behavior?
Scenario 1 - Logitech Mouse [Success]
When a Logitech wireless mouse (MX Anywhere 2) is plugged into the USB port, then the example is run, the device is correctly detected immediately and inputs from the device are received as expected.
Scenario 2 - USB Remote [Failure]
When the same is performed as above, expect instead of the Logitech device, the G20s Pro remote ( Chinese air mouse), the device will not be detected on the initial boot. If the device is unplugged, then plugged back in, the device is correctly detected and functions as expected (see logs)
Not sure if this is expected for the device in question based on the descriptors, or if this is some unwanted behaviour. I have tried adding various delays in the code, but none seem to have any affect. @roma-jam - I was wondering if you'd have any input on this.
Steps to reproduce.
hid_host_example.c
Debug Logs.
Scenario 2 - USB Remote [Failure]
DEBUG
level outputUSB Remote - Device Descriptor using
usb_host_lib
example