-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support ESP32-S3 USB Host #2634
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
Comments
Would like to have the same, I hope to get USB CDC ACM (virtual com port) devices running on a ESP32 as USB Host. Preferably with Micropython, since Micropython uses tinyusb, I thought would be a good idea to look here if Host actually is supported 🫣 |
This PR updates the USB library, mainly bringing the tinyusb submodule up to date. Many fixes and small improvements but no impact to applications using the library itself. NB. Still no host support for esp32sx :-( See hathach/tinyusb#2634
Hi guys, in case you are still interested in USB Host applications, we have it supported on ESP32-S2 and ESP32-S3 in esp-idf Here's some documentation https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/api-reference/peripherals/usb_host.html And some CDC examples https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/cdc |
@tore-espressif Thanks, yes I use that when I am on esp-idf. I have some projects that are on Arduino (ex. https://www.sparkfun.com/products/21307), and it would be very valuable to have USB Host available in both frameworks. Is there a brief way to explain why this is especially challenging for the developers? The question comes up fairly frequently and I never know what to say. |
Hi Tomas, Does your usb stack support connecting a hub, and then connecting multiple HID devices to that hub (e.g., keyboard and mouse)? I see in this directory https://github.com/espressif/esp-idf/tree/master/components/usb that there are some files related to hubs, but I can't find any information about if hubs are actually supported. |
I checked with Arduino team and this is what I got: It should be technically possible, there are two approaches
External HUB support is work in progress in esp-idf, it should be ready beginning of October |
Is there any plan to implement this in tinyusb? I'm not too familiar with the inner workings, wondering if host in tinyusb is likely or whether the only option is esp-idf for the foreseeable. |
already implemented, you can try with stock host example with _freertos or host/device_info |
@hathach are you saying it is implemented in a way that works on esp32-s3 in Arduino? |
it is implemented by tinyusb in host controller driver (hcd). I am not sure which frame/lib you use with Arduino, but you can use the existing tinyusb host API to communicate with device. |
In the past I have used Adafruit_TinyUSB_Arduino. |
For Arduino, it depends on arduino-esp32 core, it may start up initizliaing usb stack as device mode in which case tusb stack need to be teardown/re-initialized to host mode (api may not available yet). Sum up, To use Adafruit_TinyUSB you need to make sure
|
@hathach wow that is incredible news thank you! |
I haven't paid attention to arduino-esp32 lately, but It is moving fast. My CI HIL pool actually test esp32-p4 host function each PR https://github.com/hathach/tinyusb/blob/master/test/hil/tinyusb.json#L10 same dwc2 as s3 (with different usbip configuration). You can try to run stock host examples with s3, it should work. |
That is a little beyond my skills, but I have opened an issue with core, asking for example Arduino code. |
Related area
I would like to have tinyUSB support USB Host on ESP32-S3
Hardware specification
ESP32-S3
Is your feature request related to a problem?
I have USB MIDI Host working under esp-idf, but I need to port my project to Arduino, and TinyUSB does not yet support ESP32-S3 host.
Describe the solution you'd like
Add host support, and ideally a MIDI example :)
I have checked existing issues, dicussion and documentation
The text was updated successfully, but these errors were encountered: