I have an ESP8266 module connected to my Arduino Mega 2560. I sketched a simple code to pass whatever command I typed from the Serial Monitor to ESP8266 and vice versa:

void setup() {

void loop() {
  if (Serial.available())

  if (Serial2.available())

So from here on I just type my AT commands inside Serial Monitor and receive the output also inside Serial Monitor. Managed to connect into a wifi network using the command:


And obtain my ESP8266 module's IP address using the command:




Problem is, whenever I run CMD and "ping" or "ping" from my PC which is connected to the same network, I will get "request timed out". Pinging my own PC's IP gets me a reply. What is wrong here? Totally clueless... :-/

EDIT My PC's IP address is

  • And are those IP addresses actually on the same subnet as your computer?
    – Majenko
    Sep 7, 2016 at 11:16
  • What is your computers IP address. You will not be able to ping one of the addresses unless you have set the subnet mast to 16(ish) bits ( Sep 7, 2016 at 12:07

2 Answers 2


The IP address is the default IP address used by the ESP8266 when it is running as an access point. You can ignore that, it doesn't actually exist.

You need to make sure that you are actually connected to the access point by issuing AT+CWJAP? which should respond with the access point name an OK if it is connected.

Secondly you need to make sure that you are on the same network segment as your ESP8266 - that is, the same subnet. If your computer isn't on an address in the range to, and your subnet mask is set to (what is usually the default), then you won't be able to communicate unless there is an appropriate route between the subnets.

Also some wireless routers impose client separation on the WiFi channel, which means that WiFi devices cannot talk to each other, and LAN devices cannot talk to the WiFi devices. This is usually something that can be disabled in the router's configuration.


First, you need to confirm that your PC's wireless connection is on the same IP subnet as the ESP8266. At the CMD prompt, type:

ipconfig /a

and look for the wireless adapter. Hopefully the IP address will start with 192.168.1.... It should but there's no harm in checking!

Second, check that your WiFi router hasn't disabled pinging between its clients - some do (mine did, until I threw it out...). Do you have a smartphone or other WiFi device? If so, find out its IP address (hopefully also 192.168.1....) and confirm that you can ping it.

Pinging your own address isn't very useful. Normally it detects the fact that it's its own address, and replies with no attempt at sending over the air.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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