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.]
|Thread starter||Similar threads||Forum||Replies||Date|
|Y||ESP8266 wifi module SPI interface problem||Microcontrollers||9|
|M||Battery for ESP8266 ESP-12S A9G GSM (IoT Node v1.0 module)||General Electronics Chat||1|
|Can I use only esp8266 wifi module in place of nodeMCU||Microcontrollers||2|
|'Borrowing' power from a 12v supply to power my 3.3v ESP8266 module - Terminology and where to start||Microcontrollers||5|
|Esp8266 -01 wifi module not stops working after every 5 minutes||Microcontrollers||3|
|ESP8266 wifi module SPI interface problem|
|Battery for ESP8266 ESP-12S A9G GSM (IoT Node v1.0 module)|
|Can I use only esp8266 wifi module in place of nodeMCU|
|'Borrowing' power from a 12v supply to power my 3.3v ESP8266 module - Terminology and where to start|
|Esp8266 -01 wifi module not stops working after every 5 minutes|
by Ikimi .O
by Jake Hertz
by Ikimi .O