4

I have a Linux machine operating as an access point using hostapd and dnsmasq. The AP is working fine (the device is wlan0), but I am having difficulty finding the SSID of the AP for monitoring purposes. I am really using the nl80211 Netlink interface, but iw is a useful proxy here.

The output of iw dev wlan0 link is:

Interface wlan0
    ifindex 2
    type AP
    wiphy 3

And iw dev wlan0 link is:

Not connected.

However, I'd like to find out the SSID of the running AP on this device (without having to ask the program that set it up in the first place).

Inductiveload
  • 297
  • 1
  • 3
  • 10
  • Does `iwlist wlan0 scan` also not show it? – slm Feb 18 '14 at 13:39
  • Also can you not just get the SSID from the configuration file for hostapd? http://wireless.kernel.org/en/users/Documentation/hostapd – slm Feb 18 '14 at 13:51
  • @slm Afraid not: `iwlist wlan0 scan` gives `wlan0 no scan results`. I could look in `/etc/hostapd/hostapd.conf`, and that will be my fallback, I was just hoping for a more direct method, since then I would also have to make sure hostapd is running OK. – Inductiveload Feb 18 '14 at 16:47
  • I'll keep looking. I was wondering if hostapd had any cli i/f for querying into it. I've not used it but if it was installed using a pkg mgr app you might want to poke into what was installed with it. – slm Feb 18 '14 at 17:15
  • @Inductiveload Did you find a way to query the active SSID? I have the same issue and it looks like iw does not manage the AP. I tried running iwevent and no events show up if a user connects to the AP. – Fostah Apr 28 '14 at 20:56

0 Answers0