-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Slow RTT on Ping to ESP32 #1484
Comments
Just started playing with an ESP32 and have similar performance ( 50 cm from wifi router ) 64 bytes from 192.168.1.97: icmp_seq=57 ttl=255 time=194 ms Running Simple Wifi Server example sketch on Arduino. |
ye I and espressif official trench admit that esp32 has this problem through them. But I don't have time to wait for the official solution. Can anyone offer good advice |
I solved this problem WiFi.mode (WIFI_STA); Esp_wifi_set_ps (WIFI_PS_NONE); WiFi.begin (ssid3, password3); |
I can confirm adding the Esp_wifi_set_ps (WIFI_PS_NONE); line of code worked. Thanks!!! |
If it is fixed, please close the issue. |
it worked but it consumes more power ;) in essence you are keeping the esp awake and wifi on all of the time |
To use |
If you use WiFi.setSleep(false), you will need no additional libraries. |
I noticed I have this issue also, confirmed that turning off the power save fixes the issue, but it seems like a bit of a hack. I note that on my ESP8266 the Wifi power save is automatically turned off when the ESP8266 is communitcing over the WIFI and then turned back on again, which make sense to me, and is how most Wifi devices work. |
Hi all, thank you a lot for the solution, was frustrating those 200ms ping... yrs toni |
One year past, but ESP32 still very slow when power saving not disabled. When disabled, it consumes twice more power! esp8266 doesn't have such problem... It is very sad. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
It turns out that this resoled actually ALL of the issues connected to the WebServer random connection drops. So - link this topic to all of such issues. It most likely if not solve totally it will at lease easy the problem. |
before: ``` $ ping 192.168.1.17 PING 192.168.1.17 (192.168.1.17) 56(84) bytes of data. 64 bytes from 192.168.1.17: icmp_seq=1 ttl=255 time=82.1 ms 64 bytes from 192.168.1.17: icmp_seq=3 ttl=255 time=81.0 ms 64 bytes from 192.168.1.17: icmp_seq=5 ttl=255 time=1410 ms 64 bytes from 192.168.1.17: icmp_seq=6 ttl=255 time=386 ms ``` after: ``` $ ping 192.168.1.17 PING 192.168.1.17 (192.168.1.17) 56(84) bytes of data. 64 bytes from 192.168.1.17: icmp_seq=1 ttl=255 time=159 ms 64 bytes from 192.168.1.17: icmp_seq=2 ttl=255 time=9.77 ms 64 bytes from 192.168.1.17: icmp_seq=3 ttl=255 time=5.81 ms 64 bytes from 192.168.1.17: icmp_seq=4 ttl=255 time=48.0 ms 64 bytes from 192.168.1.17: icmp_seq=5 ttl=255 time=6.70 ms 64 bytes from 192.168.1.17: icmp_seq=6 ttl=255 time=6.36 ms ``` see also: espressif/arduino-esp32#1484
WORKS LIKE A CHARM! Thannk you so much. |
The correct way to do this is The wifi energy saving options are:
|
That's using the Arduino WiFi library. I am not using Arduino, but rather ESP-IDF. For ESP-IDF, the correct call is |
Well, this is the arduino-esp32 repository, thus my comment is directed to Arduino users. If you have a problem with IDF, you better submit an issue in the IDF repository (https://github.com/espressif/esp-idf) |
@gonzabrusco ha indeed. I've been working with several esp32 related repositories lately and got my wires crossed a little! My apologies. Under the hood, as it were, the Arduino library probably calls the esp-idf API. Definitely not an Arduino specific issue |
No need to apologize! Yes, actually Arduino calls the IDF function you menctioned. arduino-esp32/libraries/WiFi/src/WiFiGeneric.cpp Line 1162 in ce2cd11
But now that I see, the function that accepts a boolean (as mentioned previously) actually exists too! arduino-esp32/libraries/WiFi/src/WiFiGeneric.cpp Line 1148 in ce2cd11
But it let's you only chose between two types of energy savings (off or minimal). |
Hi, is there any reason why I have such a slow Round Trip Time on a ping to my ESP32. It varies from 1ms to 700ms and sometime timeouts. Anyone else with this problem?
Reply from 10.168.3.181: bytes=32 time=119ms TTL=255
Reply from 10.168.3.181: bytes=32 time=25ms TTL=255
Reply from 10.168.3.181: bytes=32 time=67ms TTL=255
Reply from 10.168.3.181: bytes=32 time=87ms TTL=255
Reply from 10.168.3.181: bytes=32 time=103ms TTL=255
Reply from 10.168.3.181: bytes=32 time=102ms TTL=255
Reply from 10.168.3.181: bytes=32 time=115ms TTL=255
Reply from 10.168.3.181: bytes=32 time=24ms TTL=255
Reply from 10.168.3.181: bytes=32 time=43ms TTL=255
Reply from 10.168.3.181: bytes=32 time=49ms TTL=255
Reply from 10.168.3.181: bytes=32 time=63ms TTL=255
Reply from 10.168.3.181: bytes=32 time=84ms TTL=255
Reply from 10.168.3.181: bytes=32 time=112ms TTL=255
Reply from 10.168.3.181: bytes=32 time=94ms TTL=255
Reply from 10.168.3.181: bytes=32 time=142ms TTL=255
Reply from 10.168.3.181: bytes=32 time=21ms TTL=255
See the averages:
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 1037ms, Average = 64ms
If I compare to my ESP8266:
Reply from 10.168.3.114: bytes=32 time=4ms TTL=128
Reply from 10.168.3.114: bytes=32 time=13ms TTL=128
Reply from 10.168.3.114: bytes=32 time=6ms TTL=128
Reply from 10.168.3.114: bytes=32 time=3ms TTL=128
Reply from 10.168.3.114: bytes=32 time=3ms TTL=128
Reply from 10.168.3.114: bytes=32 time=4ms TTL=128
Reply from 10.168.3.114: bytes=32 time=8ms TTL=128
Reply from 10.168.3.114: bytes=32 time=5ms TTL=128
Reply from 10.168.3.114: bytes=32 time=17ms TTL=128
Reply from 10.168.3.114: bytes=32 time=4ms TTL=128
Approximate round trip times in milli-seconds:
Minimum = 3ms, Maximum = 17ms, Average = 6ms
The text was updated successfully, but these errors were encountered: