Open rtrbt opened 2 years ago
Some additional tests with two ESPs as clients running the ESP-IDF 4.4.1 IPerf example as before and another ESP running the arduino-esp32 softAP example.
arduino-esp32 1.0.6
Interval Bandwidth
0- 3 sec 2.37 Mbits/sec
3- 6 sec 0.11 Mbits/sec
6- 9 sec 0.34 Mbits/sec
9- 12 sec 0.37 Mbits/sec
12- 15 sec 0.96 Mbits/sec
15- 18 sec 0.40 Mbits/sec
18- 21 sec 0.55 Mbits/sec
21- 24 sec 1.02 Mbits/sec
24- 27 sec 0.11 Mbits/sec
27- 30 sec 0.89 Mbits/sec
0- 30 sec 0.71 Mbits/sec
arduino-esp32 2.0.0 RC1
Interval Bandwidth
0- 3 sec 0.33 Mbits/sec
3- 6 sec 0.19 Mbits/sec
6- 9 sec 0.03 Mbits/sec
9- 12 sec 0.82 Mbits/sec
12- 15 sec 0.09 Mbits/sec
15- 18 sec 0.03 Mbits/sec
18- 21 sec 0.08 Mbits/sec
21- 24 sec 0.28 Mbits/sec
24- 27 sec 0.06 Mbits/sec
27- 30 sec 0.64 Mbits/sec
0- 30 sec 0.25 Mbits/sec
arduino-esp32 2.0.0
Interval Bandwidth
0- 3 sec 0.74 Mbits/sec
3- 6 sec 0.05 Mbits/sec
6- 9 sec 0.04 Mbits/sec
9- 12 sec 0.42 Mbits/sec
12- 15 sec 0.05 Mbits/sec
15- 18 sec 0.47 Mbits/sec
18- 21 sec 0.01 Mbits/sec
21- 24 sec 0.84 Mbits/sec
24- 27 sec 0.03 Mbits/sec
27- 30 sec 0.02 Mbits/sec
0- 30 sec 0.27 Mbits/sec
arduino-esp32 2.0.1
Interval Bandwidth
0- 3 sec 0.05 Mbits/sec
3- 6 sec 0.09 Mbits/sec
6- 9 sec 0.05 Mbits/sec
9- 12 sec 0.03 Mbits/sec
12- 15 sec 0.04 Mbits/sec
15- 18 sec 0.06 Mbits/sec
18- 21 sec 0.04 Mbits/sec
21- 24 sec 0.08 Mbits/sec
24- 27 sec 0.03 Mbits/sec
27- 30 sec 0.08 Mbits/sec
0- 30 sec 0.06 Mbits/sec
For comparision: with a "proper" WiFi router as AP:
Interval Bandwidth
0- 3 sec 11.91 Mbits/sec
3- 6 sec 14.11 Mbits/sec
6- 9 sec 14.50 Mbits/sec
9- 12 sec 15.12 Mbits/sec
12- 15 sec 15.38 Mbits/sec
15- 18 sec 15.18 Mbits/sec
18- 21 sec 15.35 Mbits/sec
21- 24 sec 15.11 Mbits/sec
24- 27 sec 15.76 Mbits/sec
27- 30 sec 15.42 Mbits/sec
0- 30 sec 14.78 Mbits/sec
Saw something similiar right now. When ESP32 is running in AP mode, like for a captive portal, transferring files from the ESP32 to the wifi client is very very slow (the captive portar load after 20-30 seconds, if not timeout). The exact same sketch but with ESP32 connected to a wifi network and the same client reaching the esp32 via the wifi network , is very fast, the page loads almost in no time.
+1
Facing the same problem, any solution? Thanks!
i was able to solve only using ESP Arduino 1.x
This will require some time. But it is in the list for investigation and fixing.
I have the same problem.
I use AsyncTCP and ESPAsyncWebServer with PlatformIO. I use currently Espressif 32 3.5.0. With it SoftAP is pretty fast and usable. I have been trying to move to Espressif 32 6.1.0, but there SoftAP can not be used.
I'm facing the same issue. I'm using esp32 wrover module with custome board and the speed rate is very low on AP mode but It's good in station mode. Another thing to mention is that this problem disappears whenever I touch the antenna ! (doesn't matter if It's external or internal) is it related to software or hardware?
As it works well with 3.5.0, sounds strange that touching antenna has anything to do with it.
I too am having this same issue. Multiple different sketches I've written over the last 12-18 months for ESP32's using PlatformIO and espressif32 all have one thing in common; Intermittent / random massive slowdowns in WiFi performance.
Sometime's they work fine, sometimes they drop packets heavily, sometimes a reboot or a power cycle fixes it, sometimes it does not.
I never got to the bottom of this. I see the same performance issues depending on whether I'm connecting to it (access point) or if it's connected to my WiFi network.
I don't know if this information will be of any use but it may help narrowing down the cause;
Platform: M5Stack Stamp Pico (ESP32-PICO-D4) Codebase: Espressif 32 (5.0.0) with the following dependency graph...
PACKAGES:
- framework-arduinoespressif32 @ 3.20003.220619 (2.0.3)
- tool-esptoolpy @ 1.30300.0 (3.3.0)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
Dependency Graph
|-- FastLED @ 3.5.0
|-- ESP Async WebServer @ 1.2.3+sha.f71e3d4
|-- AsyncTCP @ 1.1.1+sha.ca8ac5f
|-- ArduinoJson @ 6.21.2
|-- LittleFS @ 2.0.0
|-- ArduinoOTA @ 2.0.0
|-- DNSServer @ 2.0.0
|-- WiFi @ 2.0.0
platformio.ini
[env]
platform = espressif32
framework = arduino
monitor_speed = 115200
build_flags = -Wno-write-strings
lib_deps =
fastled/FastLED
https://github.com/me-no-dev/ESPAsyncWebServer
https://github.com/me-no-dev/AsyncTCP
bblanchon/ArduinoJson
extra_scripts =
pre:scripts/prebuild.py
[env:m5stack-pico]
board = pico32
board_build.partitions = scripts/stamp_partition_layout.csv
monitor_port = COM1
upload_speed = 921600
upload_port = COM1
monitor_filters = esp32_exception_decoder
[env:m5stamp-ota]
board = pico32
board_build.partitions = scripts/stamp_partition_layout.csv
upload_protocol = espota
upload_port = pico32.lan
Init routine
// Initialises WiFi as an AP and sets up captive portal DNS
void initWiFi() {
Serial.print("Starting WiFi SoftAP... ");
WiFi.useStaticBuffers(true);
WiFi.setHostname(WIFI_HOSTNAME);
WiFi.hostname(WIFI_HOSTNAME);
WiFi.mode(WIFI_MODE_APSTA);
IPAddress SOFTAP_IP(169, 254, 200, 1);
IPAddress SOFTAP_NM(255, 255, 255, 0);
IPAddress SOFTAP_GW(169, 254, 200, 1);
WiFi.softAP(WIFI_AP_SSID, WIFI_AP_PASS);
delay(200);
WiFi.softAPConfig(SOFTAP_IP, SOFTAP_GW, SOFTAP_NM);
dnsServer.start(DNS_PORT, "*", SOFTAP_IP);
WiFi.onEvent(WiFiStationGotIP, ARDUINO_EVENT_WIFI_STA_GOT_IP);
Serial.printf("done.\nYou can connect with the following details:\nSSID: %s\nPass: %s\n", WIFI_AP_SSID, WIFI_AP_PASS);
}
void setup()
{
initWiFi();
// Usual ArduinoOTA init code here..
// My setup code here..
}
void loop() {
ArduinoOTA.handle();
dnsServer.processNextRequest();
// My loop code here..
}
Board
ESP32-Ethernet-Kit V1.2, Tinkerforge ESP32 Brick (all flashed as ESP32 Dev Module)
Device Description
ESP32 Ethernet Kit: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-ethernet-kit.html#get-started-esp32-ethernet-kit-v1-2
ESP32 Brick: https://www.tinkerforge.com/en/doc/Hardware/Bricks/ESP32_Brick.html ESP32 Ethernet Brick: https://www.tinkerforge.com/en/doc/Hardware/Bricks/ESP32_Ethernet_Brick.html
Hardware Configuration
Nothing else is attached to the boards.
Version
other
IDE Name
Arduino IDE
Operating System
Arch Linux
Flash frequency
80 MHz
PSRAM enabled
no
Upload speed
921600
Description
The WiFi performance of clients connected to an ESP running as softAP is extremely bad in my tests. I'm using the following test setup:
Both clients are connected to the access point, one runs as Iperf server, one as client with the following results: (Server)
(Client; note that the connection error after 30 seconds happens only because the server iperf command misses -t 30)
If I run exactly the same test, but don't use the arduino-esp32 WiFiAccessPoint example, but instead the ESP-IDF 4.4.1 wifi/getting_started/softAP example https://github.com/espressif/esp-idf/tree/master/examples/wifi/getting_started/softAP the throughput is still not great, but way better than before: (Server)
(Client; TCP error for the same reason as above)
If I use another Tinkerforge ESP32 Brick or ESP32 Ethernet Brick, as the softAP (instead of the ESP Ethernet Kit by Espressif), the performance stays the same.
If I use two linux PCs as Iperf server and client, both connected to a ESP softAP, the performance is as follows: (Running the ESP-IDF softAP example)
(Running the arduino-esp32 softAP example)
So the performance is much better in this case, however the ESP-IDF softAP is still faster by a factor of 6.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide