intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
449 stars 242 forks source link

How to determine no of work station(sta) devices connected in an access point(ap)? #315

Closed arghasen10 closed 4 years ago

arghasen10 commented 4 years ago

I would like to know if it is possible to determine the number of sta devices connected in an ap and also their name, IP or mac? I know from the station with a command like >sta1 iw dev sta1-wlan0 link I can get details like on which ap the sta is connected. Is there any possible commands or any functions for the ap that will help to get details of connected sta.

ramonfontes commented 4 years ago

You can use hostapd_cli

arghasen10 commented 4 years ago

Thank you Sir for your quick response. With a command like this, I can get the numbers of sta connected to a particular access point

ap_name hostapd_cli -i ap_name-wlan1 all_sta | grep ^..: | wc -l

sta MAC can also be found as follows

ap_name hostapd_cli -i ap_name-wlan1 all_sta | grep ^..: