简体   繁体   中英

Is it possible to scan for wireless clients using the Android SDK?

A understand that the WifiManager returns a list of access points after a scan, but is it possible to also retrieve a list of wireless clients and their strengths?

Update:

To clarify what I mean by a "wireless client", in a typical WiFi network there is a WiFi "access point" and one or more wireless clients that communicate with it.

Some comments are saying it is not technically possible without querying the Access Point, which makes sense.

I have used a tool such as airmon-ng to list all access points and every client within range. You can see there is a client, signal strength (PWR) and which access point (STATION) they're connected to in this screenshot:

airmon-NG

I don't have the exact answer on how to do it but I seen app in Play store that does exactly what you're asking which mean it can be developed. Quick search show this one - https://play.google.com/store/apps/details?id=de.android.telnet

For this to be possible there are a few things required. Firstly your device needs to have ' monitor ' mode support. This is because all network interfaces will ignore traffic not intended for them unless otherwise told to do so, this is not needed for normal operation so not all devices support it.

Secondly you will need a rooted device as shell commands need to be executed with root (administrative) access. If your phone is not unlocked and rooted this will also not be possible for you.

Thirdly, you will require either a kernel that supports monitoring and snooping on your wireless chipset, or a kernel module that will add this support. This is a technical detail that I will not go in to here, but Googling it will help you.

Last you require a toolset such as airmon (Like you've used on your PC) for Android, there is one on the Play Store here: AirMon .

A word of warning, expect to be on your own out there. Finding a developer that writes these kind of kernel modules or hacking/penetration related tools is usually not open to hand-holding. You will have to Google and help yourself for the most part, or ask more questions on StackOverflow of course.

So the Cliff Note, TL;DR. It's possible, very possible. But you might not be able to do it on your device.

Also, I'm not aware of your skill-set but the hours and skills spent getting this sort of thing to work on a PC let alone a phone are long and vast, so it's best to use the tools others have provided, developing them yourself is going to have a steep learning curve.

i had this issue a while back but unfortunately the only solution really is to query the router. now it depends if your router can do this. i wonder if 3rd party router roms like ddwrt can spit log files which then you can parse

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