rESP8266Ping is based on: https://github.com/dancol90/ESP8266Ping
It is an ESP8266 only library.
It implements a ping feature which can be useful to test whether a remote server is reachable.
Example:
It is an ESP8266 only library.
It implements a ping feature which can be useful to test whether a remote server is reachable.
Example:
B4X:
Sub Process_Globals
Public Serial1 As Serial
Private wifi As ESP8266WiFi
Private ping As ESP8266Ping
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
If wifi.Connect("dlink") Then
Log("Connected to network")
Else
Log("Failed to connect to network")
Return
End If
Log("google.com: ", ping.PingHost("google.com", 2))
Log(ping.AverageTime)
Log("nonexistdomain234.com: ", ping.PingHost("nonexistdomain234.com", 2))
Log("local ip: ", ping.PingIP(Array As Byte(192, 168, 0, 6), 2))
Log(ping.AverageTime)
End Sub