I wanted to know how I could return the MAC addresses connected to a router so I could get a count of how many users are connected to a specific AP? I've been doing research on this but I haven't found too much help. The one thing I did find is that you can get this information from parsing the /proc/net/arp file, however, from my understanding for this to work your phone must be acting as an AP itself. I am trying to write an Android app that is able to return the number of users on a specific router. This is part of a project for school. The app is just for learning purposes since I will be using it to scan routers that are not my own.
Asked
Active
Viewed 3,830 times
1 Answers
1
You have your answer if your Android is the AP. But if the AP is a router outside your own device and control this will mean connecting via a admin API to get at the router's information. As far as I know there are no standards for this kind of API so might be stuck doing interfaces to a few major manufacturers and models via whatever methods they may offer, if any. And don't forget that you will still need admin access (admin user id/password) to the router.

Community
- 1
- 1

Paul Sasik
- 79,492
- 20
- 149
- 189
-
Ok that makes sense. But then how do programs like this http://rorist.github.com/android-network-discovery/ work. I found this online, but I don't really understand the source on github – user2163605 Mar 13 '13 at 20:40
-
Host discovery and port scanning do not require any special access. All the work performed is basic socket-level communication. Your question deals with logically and technologically much higher levels of access. That project you linked to is pretty advanced. Start with snippets like this: http://stackoverflow.com/questions/2358840 and http://michieldemey.be/blog/network-discovery-using-udp-broadcast/ – Paul Sasik Mar 13 '13 at 20:49