Page 1 of 1

USB host device not reported on disconnect and reconnect

Posted: Sat Jul 27, 2024 4:29 am
by clydeps
I'm using the usb host library on an ESP32S3. If I reset the ESP with a USB device connected, or plug in a USB device after the ESP has started up, I get, as expected, a USB_HOST_CLIENT_EVENT_NEW_DEV message, and can connect to the device.

If I then unplug the device, I get, again as expected, a USB_HOST_CLIENT_EVENT_DEV_GONE message.

However, if I now plug the device in again, I get no messages, and thus can't connect to the device. Same if I plug in a different device, no message.

Any ideas?

Re: USB host device not reported on disconnect and reconnect

Posted: Sun Jul 28, 2024 4:17 am
by username
Without having any reference to you code how can we help ?

Re: USB host device not reported on disconnect and reconnect

Posted: Sun Aug 25, 2024 9:47 am
by clydeps
The code is similar to the example in the API docs, but what I did wrong was not calling `usb_host_device_close` after the device was removed. All working now.