esp-iot-solution icon indicating copy to clipboard operation
esp-iot-solution copied to clipboard

The download speed of large files ( >=1.7MB ) based on 'ESP32S3 & USB-4G & PPP' Internet access scheme is very slow. (AEGHB-862)

Open sky-gan opened this issue 1 year ago • 2 comments

Answers checklist.

  • [X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • [X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • [X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

cpu: esp32s3 modem: air780eg ( usb 4g modem )

The USB 4G Modem PPP dial-up Internet access scheme based on ESP32S3 encounters the following problems:

  1. Turn off the WIFI routing function, and realize an HTTP OTA upgrade function on esp32s3. During the test, it is found that the download speed of HTTP files is extremely slow, and it is easy to trigger the receiving timeout in the middle.
  2. Turn on the WIFI routing function, connect ESP32S3 with mobile phone WIFI, and then download the file of the same size in 'problem 1' with mobile phone, which is faster.

Is it because esp32s3 is too busy to handle the scheduling of PPP and TCP IP protocol stacks at the same time, which leads to the jam? Can you provide a solution or suggestion?

Thanks.

sky-gan avatar Nov 05 '24 11:11 sky-gan

Are you referring to the following two scenarios?

  1. Connecting to a 4G module and downloading a file via the 4G connection.
  2. Connecting to a mobile hotspot and downloading a file through the hotspot.

If in the first scenario the speed is limited by the USB connection, then Wi-Fi should be significantly faster than USB. So, in theory, the second scenario should be faster than the first. From our tests, the download speed for the first scenario is around 4.2 Mbps down and 2.2 Mbps up.

lijunru-hub avatar Nov 12 '24 08:11 lijunru-hub

Are you referring to the following two scenarios?

1. Connecting to a 4G module and downloading a file via the 4G connection.

2. Connecting to a mobile hotspot and downloading a file through the hotspot.

If in the first scenario the speed is limited by the USB connection, then Wi-Fi should be significantly faster than USB. So, in theory, the second scenario should be faster than the first. From our tests, the download speed for the first scenario is around 4.2 Mbps down and 2.2 Mbps up. My test result is lower than yours , could you provide your sample code ? Thanks !

sky-gan avatar Nov 12 '24 08:11 sky-gan

Setting CONFIG_LWIP_TCP_WND_DEFAULT to 2760 significantly improves HTTP download performance.

Please close @leeebo

lijunru-hub avatar Jun 03 '25 11:06 lijunru-hub