dancol90 / ESP8266Ping

Ping library for ESP8266 Arduino core
GNU Lesser General Public License v2.1
261 stars 134 forks source link

Average ping time giving strange results #30

Open johnerrington opened 4 years ago

johnerrington commented 4 years ago

I have a NodeMCU running a program based on your example. Its pinging several different targets using your library. I have set it to run 5 pings with a time out of 200ms. One of the targets - 192.168.1.14 - returns long ping times and sometimes misses pings.

Here is one output from pinger.OnEnd

Ping statistics for 192.168.1.14: Packets: Sent = 5, Received = 4, Lost = 1 (20.00% loss), Approximate round trip times in milli-seconds: Minimum = 21ms, Maximum = 142ms, Average = 323.00ms Destination host data: IP address: 192.168.1.14 MAC address: 78:32:1b:c6:dd:a9

I dont understand how an average of 323 can be true when the timeout is 200ms? Sorry, my programming skills are not good enough to analyse or debug your code, so I'm just raising it as an issue.