-->
Page 1 of 2

Ping my Phone from ESP8266

PostPosted: Thu Feb 04, 2016 4:57 pm
by Tawhiz20
Hi,

Does anyone have some example which i can use in my Arduino IDE to have my ESP8266 ping a certain static IP-adress on my home-network?
(I would like the ESP to look for my phone on an interval)

THNX

Re: Ping my Phone from ESP8266

PostPosted: Thu Feb 04, 2016 7:39 pm
by quasidor-dux
That's an interesting question. I suppose you could open a socket and send ICMP echo requests to the phone IP address. That assumes your phone can send echo replies. I've never tried it but it would be a fun exercise.

Read this white paper http://images.globalknowledge.com/wwwim ... s_Ping.pdf

It is a good description of how ping works.

Re: Ping my Phone from ESP8266

PostPosted: Fri Feb 05, 2016 2:12 am
by Pablo2048
There is nothing like "socket" in ICMP. Maybe he need to dig into LWIP ICMP implementation - send ICMP request and receive ICMP reply. Igrr added this for enhancement ( https://github.com/esp8266/Arduino/issues/1208 ).

Re: Ping my Phone from ESP8266

PostPosted: Wed Feb 10, 2016 6:53 am
by Tawhiz20
Surely there must be something like the
AT+PING="192.168.1.1"
AT+PING="www.baidu.com"
commands (from the at-command set) but callable from C (Arduino- IDE).. does anyone have a clue?

THNX