8266 wifi ping problems

The problem: I have a NODEMCU (8266) connecting to my router via WiFi and logging ping responses from devices on my home network, using the
esp8266-ping library.
Its working fine with all 6 devices on the ethernet, (giving similar results to tests from my wifi laptop);
however its NOT EVER getting a response from another (ESP32) arduino unit, which also connects via WiFi.
However I CAN ping that unit from my laptop, connecting via WiFi (Using "Network Pinger" - which shows an average ping time of around 100ms with an occasional excessively long or missed ping.).

Any suggestions?

more details of the unit on my website here

The sketch is on that page as a zip archive as each functional section is on a seperate tab in the IDE; http://www.skillbank.co.uk/arduino/netmonitor/netmonitor.zip

What IP addresses do the two devices have? What about the laptop?

Hi WildBill; all fixed IP addresses with IP & data held in a struct array as shown below

struct host {
  byte IP[4];
  int tPing;  //total time for pingNumber pings
  int nLost;  //number of lost pings
  char ipString[18]; // ip address for printing
  float tAvPing, nAvPing; //averages over hour

//create data set of type host, &  initialise our struct for all cases
host host1[7] = {
  {{192, 168, 1, 1}, 0, 0, "" , 0, 0} , //0; router
  {{192, 168, 1, 11}, 0, 0,  "" , 0 , 0} , //1: RYZEN5
  {{192, 168, 1, 21}, 0, 0, "" , 0 , 0} , //2: FILES
  {{192, 168, 1, 22}, 0, 0, "" , 0 , 0} , //3: LP
  {{192, 168, 1, 34}, 0, 0, "" , 0, 0} , //4: Solar logger
  {{192, 168, 1, 24}, 0, 0, "" , 0, 0} , //5: NAS
  {{107, 162, 133, 62}, 0, 0, "" , 0 , 0} //6: TalkTalk

The laptop does not have a fixed IP, connects via DNS.
I get the same results from my android tablet at - host unreachanble
although I can ping any of the other targets - eg

I can think of two generic reasons for a ping failure: Address (IP or MAC) is not unique in the network or target is configured to ignore ping.

Not the second obviously. I'd fire up a sniffer (Wireshark) and go sniffing.

You haven't said yet which device IP isn't responding.

Oops! its the Solar Logger

I think you mean DHCP.

WildBill is correct, conflicting IP addresses will cause this. I've run into this when in the past when I used fixed IP addresses in my devices. As my device count (as seen on an IP scan) is now approaching 100, fixed IP management would be a nightmare. DHCP is your friend. Using DHCP eliminates your IP management issues. You let all devices get their IP address from the DHCP server. If you must have an unchanging IP address, on a server, for example, just tell the DHCP server (usually incorporated in your router) to give the device a permanent lease. Most routers call it a fixed IP address. (Probably because "static lease" would confuse the average consumer).

Does your solar device ever go into deep sleep?

Thanks Steve; yes DHCP & the fixed ip's are assigned in the router.
I've tried and given up on trying to assign a fixed IP on an ESP32 or 8266, its easy enough on the router.

No the solar device doesnt sleep, no need as its recording pulses from the solar panel enegry meter and powered from mains with a USB adapter.

I just checked from my android tablet I cant ping the solar logger (running on ESP32), but I CAN ping a weather station (running on 8266).

Download the free program Advanced IP Scanner.

Run this and tell me if you can see the missing device.
You can ping from there- right click, tools, ping.

Angry Ip Scanner displays

FYI is identical hardware running an identical sketch - but I see Adv port scanner shows the mfr for that one but NOT for 1.34

I can ping both from AIpS from this PC which has an ethernet connection to the router.
I get the same display and can ping both from my laptop, whether connected via EITHER Ethernet OR WiFi
My Android Tablet identifies as and pinging from there I get "destination host unreachable" or "connection timeout" to or

It looks like .28 and .34 have the same hostname. Turn one off and see if the other pings OK.

Good thought Steve, but no its the same when .28 is off. Also I've now given .28 its own hostname.
Advanced IP Scanner is not reporting hostnames, but here is the report from my router

Host Name User Alias Device Type IP Address MAC Address
RYZEN5 RYZEN5 MSFT 5.0 00:D8:61:C8:B4:B5
dlinkap dlinkap -- 78:32:1B:C6:DD:A9
ESP-EF6CA4 ESP-EF6CA4 -- A4:CF:12:EF:6C:A4
-- -- -- A4:CF:12:EF:61:62
ALIVE-A6 ALIVE-A6 MSFT 5.0 54:04:A6:F0:E4:77
esp32-ardu...... esp32-arduino -- 7C:9E:BD:3A:04:7C
ESP32-Sola...... ESP32-SolarLogger-Test -- 24:0A:C4:60:05:78

My analysis so far:
its not the ESP32 because they do respond to a PING from ethernet or wifi (laptop)
Its not the router - because I can ping via wifi from the laptop so why not from the network monitor?
Its not the network monitor - because it pings other targets successfully and connects to the router via wifi
Having eliminated EVERYTHING ...

"it" tells me nothing. You know what "it" is, but I'm not sure.
Don't make me go back to deconstruct your pronouns. Rewrite what you are observing without the pronouns.

Something like: "from the laptop on, I can ping ...34 and ...38".

I thought that ...28 was the problem, what is "the same" when ...28 is off?

Yes at 13 replies I guess its time to rewrite the issue as I now have more information.
The "network monitor" is a NodeMCU that communicates with LAN via wifi to the router.
Its IP address is
It ( "network monitor") pings other devices on the LAN;
some connected via ethernet - eg
& some via wifi. eg .31 a NODE weather station - which HAS BEEN successful; (and now fails)
.34 - which is NOT.

I have tried making changes to fixed IP addresses in my router.
If I reassign as
the ping to WORKS.
But AFTER it propagates it fails.

Clearly an issue with settings in my router.

What is the router's range of dynamic IPs it can give out?

Then, leave it at ...34 Why change it if it works?

Here's how I do it:

The library lets you ping the hostname, but I've never tried it:


I had to read this a few times to grok.

Are you now saying that it's only the ESP32's that are failing, and randomly?

Have you tried changing the sequence in the IP list?
Have you tried a short delay between pings?

The .34 in this diagram is not a "real" Espressif product. If you look at the OUI reserved for Espressif, the 7C:9E:BD is not on the list


That is why Adv Scanner doesn't show the manufacturer for that ESP32.

I finally looked at the sketch you are running. They are using a different library than I am.

Why don't you try my sketch? All you need to do is change the local IPs in iplist.h, and add your WiFi credentials in setup_WiFi.ino

It should work without the LEDs because the status is shown in Serial.print statements.

Hi Steve; I've put the ESP32 back to 192...1.34 connecting via WiFi
the other solar logger is now at also connecting via WiFi

I looked at your sketch, and considered running it - but couldnt find ping.h
thought about making a MUCH REDUCED sketch just to ping that one address; however

Testing from my laptop makes things simpler - it eliminates the network monitor as a source of these problems.
With the laptop connected with ethernet - (IP I can ping both units.
With the laptop connected with WiFi - (IP I can ping .42 but NOT .34.

@wildbill - I have wireshark up and captured some pings but dont know how to make sense of results?
pings to solarlogger (fail) & SolarLoggerTest (now at)

pinga34b42.zip (1.9 KB)

There's a bunch of ARP packets that apparently indicate that 26 doesn't know where 34 is. I think (and I'm no expert) that it doesn't know which MAC address has that IP. Pings to 42 come straight back with no need for ARP because its MAC is known to 26.

I think that either you're reusing a MAC address or your router has a conflict between DHCP and the static IP addresses you have assigned.

What is the first IP address your router can issue through DHCP?