I have connected ESP32, ESP-12 and ESP8266 Nodemcu to the Wi-Fi router. I have also connected my raspberry pi 4 to this network through wifi.
The scenario is when my device raspberry pi comes in any network it will start detecting the other things connected to the same network and gets their IP and then sends a JSON simple data to turn on the type to them. And in the future, it can also send multiple data to work on different applications.
So I want to learn how to make Raspberry PI scan and get other IP addresses of Systems to do work with?
So far I have searched I have got the result regarding getting my rpis IP or setting it to static or global etc.
Update with info from comment:
What my application is (Which is I think Not possible) that when I connect my raspberry pi to any Wi-Fi network it should catch every device IP and if possible with name and will broadcast JSON data on them and the end devices which can work on this data will run. Data will be of different kinds e.g. like turn on, off, etc. So I don't want to hardcode them. I tried nmap and it is listing the IPs but it is showing more than 64 active Host I don't know why and can't see devices IP with name.