No AP mode operation with ap_scan=1 if no matching network is found
joerg.krause at embedded.rocks
Mon Jul 11 05:37:58 PDT 2016
On Mo, 2016-07-11 at 12:21 +0200, Jörg Krause wrote:
> i have an issue with AP scanning and selection. After power-up the
> device should scan for a known ssid and if it does not find it,
> initialize an new network in AP mode operation. This is well the
> behaviour as described for the 'ap_scan=1' config option.
> This is my corresponding wpa_supplicant.conf:
> If the access point with the ssid "HOME_NETWORK" is not found, the
> device should go into AP mode operation, as far as I understand the
> 'ap_scan=1' config option. Unfortunately, it does not.
> Running wpa_supplicant in debug mode I can see that the supplicant
> scans for the ssid "HOME_NETWORK" three times and always ends up with
> "No suitable network found". However, instead of starting to operate
> AP mode, the supplicant initiates a sched_scan:
> No suitable network found
> Beginning of SSID list
> Add wildcard SSID to sched_scan
> add to filter ssid: HOME_NETWORK
> Starting sched scan: interval 10 (no timeout)
> Did I miss something?
I figured out that wpa_supplicant does not go into AP mode operation
because the network is marked as "disabled".
This is because of the command "select_network" I switch to the network
I configured before.
So do I have to run "enable_network 0" (id=0 for sssid AP_MODE) every
time after running "select_network"?
More information about the Hostap