Three ideas for scanning a network.
1.- Using the ping command:
ping -c 1 192.168.1.5
[-c 1 -------> sends 1 packet]
This method is slow, it takes about 4 seconds to check each IP, so 20 IPs would check them in 80 seconds.
- To use this command we need a terminal, we can also use this extension: com.KIO4_Terminal.aix from: http://kio4.com/appinventor/278_extension_shell.htm
2.- Command ip neighbour show
We obtain the IP and Mac of the devices, but devices have to be previously identified.
For example you run this command you get several IPs. You do a ping scan, and you run ip neighbor again, you will get more IPs since they have been recognized.
It needs the Terminal extension.
http://manpages.ubuntu.com/manpages/trusty/man8/ip-neighbour.8.html
- I'm not sure if this command works on Android10+ as it has limited access to arp tables.
https://stackoverflow.com/questions/62550498/permission-denied-for-access-proc-net-arp-arp-table-in-android-10
3.- Check if the IP is a web server.
Requesting a web file through the Web component. If the IP is a web server it will send us an error file of type text/html, if it is not a server we will get an "Unable to get".