How to get a list of connected clients on dumb AP?

I used to get info (not IP/hostname, just # if them) on connected/associated devices via

iwinfo wlan0 ass
iwinfo wlan1 ass

Now it's phyX-apY

Is there a better way to get # of all devices connected to radio1/radio0/wlan0... ?
Oneliner preferebly.

[ https://openwrt.org/faq/how_to_get_a_list_of_connected_clients ]

To be clear, you're seeking a [better] alternative method - not documented already on the linked Wiki?

Better meaning smaller/quicker.

I used that Wiki script and throw out info that i don't need. This is ok for me:

#!/bin/sh
echo -e "\033[1;32mDEV\tMAC address\033[0m"
for interface in `iwinfo | grep ESSID | cut -f 1 -s -d" "`
do
 echo -e "\033[1;32m$interface \033[0m"
 maclist=`iwinfo $interface assoclist | grep dBm | cut -f 1 -s -d" "`
  for mac in $maclist
   do
    echo -e "\t$mac"
   done
done

A quicker version:

#!/bin/sh
echo -e "\033[1;32m\tMAC address\033[0m"
for interface in `iw dev | grep Interface | cut -f 2 -s -d" "`
do
 iw dev $interface station dump|grep Station
done

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.