简体   繁体   中英

can I identify host name of all android connected with a wifi network?

In a WiFi network many android device are connected.

My phone also connected.Now I want to know all android device host name from my android device.Device name is like ANDROID-123464f3 .

I think that i know what you are asking, you mean that you are looking for all the devices connected to a WiFi network, well, you have to open your router typing in most of the cases: 192.168.1.1 (or sometimes 192.168.0.1) or even in the direction where you placed the router if you configured it previously. There would have to be a section of devices map or something like that, you can find there, in this page, the devices that are connected to the router. Hope this can help you.

Usually DHCP was used! and usually all devices are in the same IP range! for example, if your IP is 192.168.43.35, other devices, will have an IP address in form 192.168.43.x. so you can make a loop to search around your IP and find them all! and some notes for this loop: - DHCP normally starts IP from 33 by default - Search in a circular form! consider having IP address LIKE 192.168.1.45, loop on last part, "n" steps back and then "n" forward!

for n = 1:
192.168.1.44 , [192.168.1.45] , 192.168.1.46
for n = 2:
192.168.1.43 , [192.168.1.44 , 192.168.1.45 , 192.168.1.46] , 192.168.1.47

and so on ... but be careful not to search one IP again and again! If you couldn't solve it, ask me to write an example code!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM