[英]How to Find the Number of Users Connected to a Wifi AP (Android)
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? 我想知道如何返回连接到路由器的MAC地址,以便计算连接到特定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. 我找到的一件事是你可以从解析/ proc / net / arp文件中获取这些信息,但是,根据我对此的理解,你的手机必须充当AP本身。 I am trying to write an Android app that is able to return the number of users on a specific router. 我正在尝试编写一个能够返回特定路由器上的用户数量的Android应用程序。 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. 该应用程序仅用于学习目的,因为我将使用它来扫描不属于我自己的路由器。
You have your answer if your Android is the AP. 如果你的Android是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. 但是,如果AP是您自己设备之外的路由器并且控制这将意味着通过管理API连接以获取路由器的信息。 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. 据我所知,这种API没有标准,因此可能会因为它们可能提供的任何方法(如果有的话)而与几个主要制造商和模型进行接口。 And don't forget that you will still need admin access (admin user id/password) to the router. 并且不要忘记您仍然需要管理员访问(管理员用户ID /密码)到路由器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.