ESP32-S3 USB OTG - USB Hub support?

maaamc
Posts: 7
Joined: Tue Feb 13, 2024 2:28 pm

Re: ESP32-S3 USB OTG - USB Hub support?

Postby maaamc » Wed Feb 28, 2024 9:10 am

Is there any news ?

ulflar2
Posts: 1
Joined: Wed Apr 03, 2024 5:47 am

Re: ESP32-S3 USB OTG - USB Hub support?

Postby ulflar2 » Tue Apr 09, 2024 8:39 am

Hi everyone,

Seeking any news regarding support for USB hub.
We are developing a product where it is required. The limitations mentioned in earlier posts are not a showstopper for us.
But we would like to see the beta branch for public testing mentioned by tore-espressif. It would certainly help and be interesting to explore.
Any news on that one?

s0urceror
Posts: 3
Joined: Wed Apr 03, 2024 5:05 pm

Re: ESP32-S3 USB OTG - USB Hub support?

Postby s0urceror » Tue Apr 23, 2024 6:37 am

Looking forward for a beta release.

I have experience developing a USB stack for MSX computers via a CH376 in low-level mode. Will contribute my findings and use it in a new ESP32 S3 project.

Btw. in my previous project I had a 8 port hub connected with various devices. But the user could choose which ones it wanted to communicate with to go around the I/O limits of the CH376.

s0urceror
Posts: 3
Joined: Wed Apr 03, 2024 5:05 pm

Re: ESP32-S3 USB OTG - USB Hub support?

Postby s0urceror » Wed May 29, 2024 9:47 am

Okay, little update, I managed to connect to a USB HUB, retrieve the Hub descriptor, power-on and check which ports have devices attached, and reset each and every device.

From that moment on I'm a bit stuck because messages send/from a reset hub port attached device are not being returned. Per specification after RESET you can continue to communicate to EP0 on address 1 where the hub will forward the communication to EP0 of the connected device. Instead I still wrongly get (cached?) answers from the Hub.

One of those messages would be the SET_ADDRESS command to tell the device (and hub) that from that moment on it is at for example address 2.

After this you can communicate to address 1 for hub related messages and address 2 to N for the other devices messages.

maaamc
Posts: 7
Joined: Tue Feb 13, 2024 2:28 pm

Re: ESP32-S3 USB OTG - USB Hub support?

Postby maaamc » Wed Jul 17, 2024 8:05 am

any news ?

g3gg0.de
Posts: 6
Joined: Wed Oct 04, 2023 10:47 am

Re: ESP32-S3 USB OTG - USB Hub support?

Postby g3gg0.de » Mon Jul 22, 2024 5:32 pm

tore-espressif wrote:
Fri Dec 29, 2023 7:17 pm
2. Small Receive FIFO - 512 bytes: 512 bytes is borderline enough for one streaming (high-bandwidth) FullSpeed device. It will not be possible to stream from 2 USB camera at the same time on S2/3 (at reasonable definition of the video).

I am trying to read data from a isochronous device, the InfiRay TS2+ thermal camera.
It uses a MPS of 524 instead of 512, which is 12 bytes too short.
that seems to be [UVC header] + [256 pixels per line * 2 byte]

My question:
Its this limit of 512 a physical limitation, where there is no way to work around?
Or might it be possible with a hack to throw away 12 bytes of every transfer.
I would be even happy with receiving 512 byte, throwing away the last 6 pixels (12 byte).

Best regards

maaamc
Posts: 7
Joined: Tue Feb 13, 2024 2:28 pm

Re: ESP32-S3 USB OTG - USB Hub support?

Postby maaamc » Mon Sep 30, 2024 9:02 am

Hello everyone,
Any news ?
Thanks.

chegewara
Posts: 2375
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32-S3 USB OTG - USB Hub support?

Postby chegewara » Thu Oct 10, 2024 6:45 am

Hi,
im not sure i am the one who should post this, but i believe that USB hub support is added in master now.
And bu USB hub support i mean we can connect usb hub to esp32S2/S3/P4 and USB host API should access devices connected to hub.

Good job espressif

tore-espressif
Posts: 19
Joined: Thu Oct 07, 2021 8:11 am

Re: ESP32-S3 USB OTG - USB Hub support?

Postby tore-espressif » Thu Oct 31, 2024 4:07 pm

Hello everyone interested in USB HUBs!

First of all, I'm sorry for the misinformation about the beta branch. After internal discussion we decided to wait and provide a stable HUB support. This is now available in esp-idf master branch!

Since ESPs are embedded systems there are some notable limitations (I mentioned some of them in previous posts)
* ESP32-S2/S3 has 8 channels, this practically means 1 HUB + 2 devices active at the same time. P4 has 16 channels
* Low-Speed devices through HUB do not work yet
* More in official docs (already merged internally, should be public within days)
Its this limit of 512 a physical limitation, where there is no way to work around?
The physical limitation is 1024 bytes for all transfers. Maximum for RX is 600 when you select USB_HOST_HW_BUFFER_BIAS_IN in menuconfig

Who is online

Users browsing this forum: Google [Bot] and 44 guests