Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm wanting to make a system using neo-pixels, an arduino and an ESP8266 module to ping IP addresses on my network to determine if certain people are on our wifi (I'll be pinging mobile phones).

I'm finding it hard to find any help as to how to ping IP addresses from an arduino using the ESP8266 module. I did find the ICMP Ping library, but it uses the ethernet shield, and I'm quite new to arduino so I don't even know if I could modify the library in any way.

If anyone could help me on my way, that'd be great!

share|improve this question
1  
I'm not sure the AT firmware has ICMP facilities. You may need to write your own firmware. – Majenko Jan 16 at 12:46
    
AT+PING? cdn.sparkfun.com/assets/learn_tutorials/4/0/3/…, 16. AT+PING – Function Ping, pp. 55. – Mikael Patel Jan 16 at 14:11
up vote 0 down vote accepted

From what I could find, it seems theres a command for pinging a server. It returns the number of milliseconds taken for the server to respond. The command is: AT+PING="web site" or AT+PING=<ip addr>, from 2 separate sources. You'll have to test them to see which (if not both) is correct.

share|improve this answer

Not all devices (including) phones respond to ICMP Ping. This may differ for each (mobile) OS and version and phone make and model. But assuming your phone does respond to ping...

If you use the ESP with just the default firmware (a waste of a perfectly capable microcontroller), then indeed use the AT+PING command from the other answers.

If you use the ESP directly, you may be out of luck. Both the nocemcu lua firmware and the arduino api for esp seem to lack icmp ping functionality.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.