Cannot ping ESP8266's IP address from a computer on the same network 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() {
  Serial.begin(115200);
  Serial2.begin(115200);
}

void loop() {
  if (Serial.available())
  {
    Serial2.write(Serial.read());
  }

  if (Serial2.available())
  {
    Serial.write(Serial2.read());
  }
}


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:

AT+CWJAP="SSID","password"


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

AT+CIFSR

+CIFSR:APIP,"192.168.4.1"
+CIFSR:APMAC,"5e:cf:7f:c2:ce:30"
+CIFSR:STAIP,"192.168.1.103"
+CIFSR:STAMAC,"5c:cf:7f:c2:ce:30"

OK


Problem is, whenever I run CMD and "ping 192.168.4.1" or "ping 192.168.1.103" 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 192.168.56.1
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.