summaryrefslogtreecommitdiff
path: root/files/common/openwrt/list-stations
blob: 6cd216716706845bbef8cebda97c1113dd62c06a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

interfaces=$(iw dev  | grep "Interface " | cut -d ' ' -f2 | sort)

for interface in $interfaces; do
  bssid=$(iw $interface info | grep "addr " | cut -d ' ' -f2)
  essid=$(iw $interface info | grep "ssid " | cut -d ' ' -f2-)
  channel=$(iw $interface info | grep "channel " | cut -d ' ' -f2-)
  echo "$interface ($bssid, ssid: '$essid', channel: $channel)"
  iw $interface station dump | grep "^Station" | awk '{ print(" - "$2) }'
  echo ""
done

exit 0