My sketch doesn't use ping.h. It uses ESP8266Ping.h
On my router, I can't configure static IP addresses specifically, so I set the start address to 192.168.1.100 and I give static addresses to anything that needs one in the 90-99 range by configuring the individual devices.
Obviously I overestimated the number of static addresses I would need.
If yours is the same, you have the potential for DHCP to give out 34 and cause a clash.
Thanks WildBill, having seen that I may change my network IP assignments and do the same - set the minimum higher than my static IP addresses.
Thanks to both of you for yor help, I've learnt a lot. The problem persists but I cant find a resolution; maybe its down to the board not being "genuine" but all the other features are working so I'll excuse this flaw, much as I hate being beaten. I've changed the addresses being monitored and the display is a bit more useful now.
I've lost track a bit; did you ever try swapping the IPs of the two nodes?
No. Where do you see ping.h in my sketch?
What router. Is there a link to the user manual for it?
Yes I did, the problem stayed with the board. Very confused that when changing the fixed IP the node DID respond - for a short time.
Sorry Steve, cross purposes; your ESP8266Ping.h is from here?
I'll give your sketch a try on my "test" ESP32 when I get time.
That is not the esp8266ping library that I am using, but I have intended to test it when I get time. I don't recall where I found the library.
But, try the 'simple ping' example in this library- it's only 50 lines or so.
More confused than ever
I tried simple ping from a NODE (obviously connecting via wifi to my LAN) to 192.168.1.34 - and it WORKS.
I tried ping from windows CMD on my laptop (connect via wifi to my LAN) to 192.168.1.34 - and it FAILS.
pings from windows CMD on my laptop to 192.168.1.11 and 192.168.1.14( which are PC's on my network), and pings to 192.168.1.31 (a NODE "weather station") connected via wifi all work
Cant afford to lose any more hair.
That is weird. Can you sniff those two scenarios?
Also, what does the status page on your router have to say about each of those devices?
Can you turn everything else off and retry?
There must be some way to get the laptop to throw away its stored data - something in ipconfig perhaps. Forcing it to rebuild from scratch would be nice. Do you have a hosts file on it?
At frame 0 192.168.1.34 sends an ARP broadcast;
then at frame 11 the windows laptop 192.168.1.26 sends an ARP broadcast "who is ...1.34? no response until ..
(host was unreachable)
a bit later I did a ping to 192.168.1.31(a NODE "weather station"
which was fine.wifipinga34b31.zip (15.1 KB)
I tried again from a new linux installation on another laptop. and ...
This is the device that doesn''t ping, correct?
Post the code for this device.
What board does this device use?
Its an ESP32 Steve; but an (almost) identical system, with the same code (presently at 192.168.1.42) DOES ping;
the board provides a webpage using server side events; and keeps a log of pings and mains failures that I can access via FTP. It all works fine.
The SimplePing example on an ESP8266 (at 192.168.1.59) DOES ping it; and I've added a line
int avg_time_ms = Ping.averageTime();
to show the time - around 50 - 150ms; and put the ping in the loop() to do it repeatedly at 10 sec intervals. rock solid, no fails.
but as already said testing yesterday a laptop, a linux box, and my android tablet connecting via wifi all get "device unobtainable".
I cant make ANY sense of any of all that!
arp - a on the (wifi) laptop doesnt even SHOW .34, but .42 is there.
Testing again just now on the linux box (at 192.168.1.48)
ping 192.168.1.34 I get a few good pings - then "from 192.168.1.48 - device unobtainable"
The solar logger counts interrupts but at present there are none ('cos its dark) so I can rule that out.
netmonitor.zip (10.0 KB)
Testing from my PC connected via ethernet
Interface: 192.168.1.11 --- 0x9
Internet Address Physical Address Type
192.168.1.1 d0-c6-5b-cc-34-c4 dynamic
192.168.1.14 54-04-a6-f0-e4-77 dynamic
192.168.1.24 00-18-97-00-b5-ac dynamic
192.168.1.26 24-fd-52-f3-80-c0 dynamic
192.168.1.30 a4-cf-12-ef-6c-a4 dynamic
192.168.1.31 a4-cf-12-ef-61-62 dynamic
192.168.1.34 7c-9e-bd-3a-04-7c dynamic
192.168.1.36 78-32-1b-c6-dd-a9 dynamic
192.168.1.42 24-0a-c4-60-05-78 dynamic
192.168.1.48 70-1a-04-51-a4-38 dynamic
192.168.1.59 d8-bf-c0-11-23-9d dynamic
192.168.1.75 22-31-3b-a0-47-bc dynamic
192.168.1.255 ff-ff-ff-ff-ff-ff static
192.168.2.1 d0-c6-5b-cc-34-c4 dynamic
18.104.22.168 01-00-5e-00-00-16 static
22.214.171.124 01-00-5e-00-00-fb static
126.96.36.199 01-00-5e-00-00-fc static
188.8.131.52 01-00-5e-7f-ff-fa static
255.255.255.255 ff-ff-ff-ff-ff-ff static
C:\Program Files (x86)\Advanced Port Scanner>ping 192.168.1.34
Pinging 192.168.1.34 with 32 bytes of data:
Reply from 192.168.1.34: bytes=32 time=32ms TTL=255
Reply from 192.168.1.34: bytes=32 time=43ms TTL=255
Reply from 192.168.1.34: bytes=32 time=65ms TTL=255
Reply from 192.168.1.34: bytes=32 time=91ms TTL=255
Ping statistics for 192.168.1.34:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 32ms, Maximum = 91ms, Average = 57ms
Nothing in the ARP jumps out at me. It looks pretty normal.
That's not the code I asked to see. I want the code from the failing node.
Have we overlooked the obvious? RSSI?
Can you move the .34 device closer to the router?
Tried that Steve
SLogMK2.18.zip (11.1 KB)
I didn''t realize this was a Rui Santos project. Send your problem to him at RNT. He is very good about helping people with problems with his code.
Have you tried a simpler ping program?