Specific hidden network scan failure

Nicola Smaldone nicola.smaldone
Tue Aug 18 15:01:36 PDT 2015


Dear all,
I'm trying to use the wpa_cli and the wpa_supplicant 2.4 without a predefined configuration file and by a dynamic interface adding. So, I create the necessary configuration dynamically on the base of a user specification.
All seems working properly except for the hidden network active scan. This means that I'm not able to scan and retrieve information when the user asks for scanning a hidden network by specifying its ssid and, optionally, its channel.

This is the sequence that I use to initialize the supplicant:
1. wpa_supplicant -g/var/run/wpa_supplicant-global -B -d
2. wpa_cli -g/var/run/wpa_supplicant-global interface_add wlan0 "" nl80211 /var/run/wpa_supplicant

And this is the scan sequence for a specific hidden ssid, let's say "mynet" on channel 3:
1. wpa_cli -iwlan0 remove_network 0
2. wpa_cli -iwlan0 add_network
3. wpa_cli -iwlan0 set_network 0 scan_freq 2422
4. wpa_cli -iwlan0 set filter_ssids 1
5. wpa_cli -iwlan0 ap_scan 1
6. wpa_cli -iwlan0 set_network 0 ssid '"mynet"'
7. wpa_cli -iwlan0 set_network 0 scan_ssid 1
8. wpa_cli -iwlan0 scan
9. wpa_cli -iwlan0 scan_results

This sequence always fails to retrieve information on that specific hidden ssid that I properly setup before doing my test. Important to know that a generic scan action with no ssid and/or channel specification is able to retrieve information about all hidden networks. Of course, I cannot use that information because the hidden ssid is not reported. I repeat, the scenario is for a user requesting to scan for a specific hidden ssid (and channel).
Another important information to know is that I'm able to connect to that hidden networks (!). Only the supplicant is not able to scan and retrieve info on it.

So, is my commands sequence wrong? Do I miss something in your opinion?
Is there someone able to perform such scan successfully?

Thanks in advance.

Nicola SMALDONE
www.tierratelematics.com





More information about the Hostap mailing list