Hi
How can i find the IPs of the devices on the network with esp8266 module?
How can i find the IPs of the devices on the network with esp8266 module?
Last edited:
I am in Arduino IDEThe typical way to get a list of IP addresses on a network is with a sequential ARP request to each IP in the subnet. This is not a guaranteed method, though, and success will depend on your network topology (e.g.: if your router is doing proxy arp) though it is mostly successful.
Alternatively, you can use a progressive ICMP echo request, usually called "ping" to do something similar, Sometimes it is helpful to do both, redundantly, since not all TCP/IP stacks follow the rules and might respond to one but not the other. In any case, you can miss things.
A third way is passive listening. By listening to all of the traffic on the network you can slowly accumulate the IP addresses of active stations when they make broadcasts. That is, when they frames to the network address instead of the unicast address of a particular station.
This requires that the stations actually do something you can hear like an ARP or DHCP request, and takes time. You can combine this with the other methods to fill in the list where they might fail.
How you will do this depends on the programming envrionment you are using. If you are using the Arduino IDE, there are projects using the ESP for things like WiFi "deauthers", which are obnoxious and stupid things but demonstrate some of the programming. If you are using Python there are other examples.
Search for "ESP 32 arp" and "ESP 32 sniffing" for some clues.
[EDIT: ESP 32 and ESP 8266 use the same libraries, I just used the wrong part number in the text.]
I am more than happy to help you work out the code and debug it but I am not inclined to write it for you. Maybe someone else will jump in, but if not you can start and we can help.I am in Arduino IDE
I need its code
by Aaron Carman
by Jake Hertz
by Jake Hertz
by Aaron Carman