Arduino-esp32: Slow RTT on Ping to ESP32

Created on 11 Jun 2018  路  14Comments  路  Source: espressif/arduino-esp32

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

stale

Most helpful comment

If you use WiFi.setSleep(false), you will need no additional libraries.

All 14 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
64 bytes from 192.168.1.97: icmp_seq=58 ttl=255 time=115 ms
64 bytes from 192.168.1.97: icmp_seq=59 ttl=255 time=36.0 ms
64 bytes from 192.168.1.97: icmp_seq=60 ttl=255 time=266 ms
64 bytes from 192.168.1.97: icmp_seq=61 ttl=255 time=184 ms
64 bytes from 192.168.1.97: icmp_seq=62 ttl=255 time=102 ms
64 bytes from 192.168.1.97: icmp_seq=63 ttl=255 time=22.2 ms
64 bytes from 192.168.1.97: icmp_seq=64 ttl=255 time=250 ms
64 bytes from 192.168.1.97: icmp_seq=65 ttl=255 time=170 ms
64 bytes from 192.168.1.97: icmp_seq=66 ttl=255 time=89.6 ms
64 bytes from 192.168.1.97: icmp_seq=67 ttl=255 time=319 ms
64 bytes from 192.168.1.97: icmp_seq=68 ttl=255 time=245 ms
64 bytes from 192.168.1.97: icmp_seq=69 ttl=255 time=164 ms
64 bytes from 192.168.1.97: icmp_seq=70 ttl=255 time=81.0 ms
64 bytes from 192.168.1.97: icmp_seq=71 ttl=255 time=311 ms
64 bytes from 192.168.1.97: icmp_seq=72 ttl=255 time=230 ms
64 bytes from 192.168.1.97: icmp_seq=73 ttl=255 time=154 ms
64 bytes from 192.168.1.97: icmp_seq=74 ttl=255 time=71.6 ms
64 bytes from 192.168.1.97: icmp_seq=75 ttl=255 time=299 ms
64 bytes from 192.168.1.97: icmp_seq=76 ttl=255 time=220 ms
64 bytes from 192.168.1.97: icmp_seq=77 ttl=255 time=141 ms
64 bytes from 192.168.1.97: icmp_seq=78 ttl=255 time=62.3 ms
64 bytes from 192.168.1.97: icmp_seq=79 ttl=255 time=288 ms
64 bytes from 192.168.1.97: icmp_seq=80 ttl=255 time=209 ms
64 bytes from 192.168.1.97: icmp_seq=81 ttl=255 time=131

Running Simple Wifi Server example sketch on Arduino.

ye
You and I have the same problem.

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
Because esp32 enters the power saving mode by default, just set it up.

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 esp_wifi_set_ps (WIFI_PS_NONE); you also need #include "esp_wifi.h" (worked for me in Arduino IDE).

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.
Why does the ESP32 WIFI not fuction in this way?

Hi all,

thank you a lot for the solution, was frustrating those 200ms ping...

yrs

toni

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.
Why does the ESP32 WIFI not fuction in this way?

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.
Maybe there is some solution?

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.

Was this page helpful?
0 / 5 - 0 ratings