-
Notifications
You must be signed in to change notification settings - Fork 14
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
Extremely slow RNDIS throughput with esp-tinyusb (IEC-137) #46
Comments
@wuyuanyi135 The main difference between tinyusb Would you please try again with |
@leeebo Hello, Thanks for your tips! I have tried your suggestion by commenting out This is way slower than the implementation in |
Hi,
results are satysfying, over 34mbit/s when esp32 is a server and 26mbit/s when its a client. |
IIRC P4 has high speed USB 2.0, while S3 only has full speed (12mbps) interface right? |
Thats correct |
Answers checklist.
Which component are you using? If you choose Other, provide details in More Information.
device/esp_tinyusb
ESP-IDF version.
v5.2
Development Kit.
ESP32-S3-WROOM-1-N8R8
Used Component version.
1.4.4 (Dirty)
More Information.
In my project, a USB dongle made of ESP32-S3 are used as communication gateway that creates an RNDIS interface on the PC for connecting with the other devices.
Observations
Current setup
I have been using the tinyusb and additions from esp-iot-bridge and the throughtput was satisfactory (max ~7Mbps). Because of the USB refactoring work, the esp-iot-bridge solution does not compile on esp-idf > 5.2.
Code difference
The iot-bridge's
[tinyusb_install_driver](https://github.com/espressif/esp-iot-bridge/blob/master/components/usb/usb_device/additions/src/tinyusb.c)
uses tons of hal code but theesp-tinyusb
counterpart uses new API that is compatible withesp-idf>5.2
.However, from my observation, with esp_tinyusb, the throughtput was only about 400 Kbps, which is much slower than what I could get from esp-iot-bridge. Looking at the implementation of ECM_RNDIS in tinyusb, it seems there isn't any significant change from the versions.
Benchmark
Note:
Conclusions
From my analysis, I found that
esp-tinyusb
will lead to very chopy network (ping vary from <1ms to seconds or timeout) and will no longer respond after heavy traffic.I guess the slowdown was not caused by tinyusb. Most probably the way how tinyusb driver are installed (see Code difference) caused the issue. But these code involves too much implementation details of USB peripheral so I am not able to further track down.
Can you please compare the network throughtput when using this project and see if the speed confirms my observations?
The text was updated successfully, but these errors were encountered: