AP-DISABLED event

Jörg Krause joerg.krause
Thu Mar 12 12:14:43 PDT 2015


On Mi, 2015-03-11 at 23:17 +0100, J?rg Krause wrote:
> Hi all,
> 
> I'm using wpa_supplicant 2.3 for configuring a wireless module as access
> point. The wpa_supplicant.conf file contains:
> 
>         ctrl_interface=/var/run/wpa_supplicant
>         update_config=1
>         ap_scan=1
>         network={
>         	ssid="myAP"
>         	mode=2
>         	key_mgmt=NONE
>         	id_str="ap"
>         }
> 
> If I enable the network with wpa_cli I get the following event messages:
> 
>         > list_networks
>         network id / ssid / bssid / flags
>         0	myAP	any	[DISABLED]
>         > enable_network 0
>         OK
>         <3>CTRL-EVENT-SCAN-STARTED 
>         <3>CTRL-EVENT-SCAN-RESULTS 
>         <3>WPS-AP-AVAILABLE 
>         <3>AP-ENABLED 
>         <3>CTRL-EVENT-CONNECTED - Connection to xx:xx:xx:xx:xx:xx
>         completed [id=0 id_str=ap]
> 
> Everything is fine here. Important for me is the AP-ENABLED and the
> CTRL-EVENT-CONNECTED event. The CONNECTED event is consumed by the
> wpa_action shell script. However, if I disable the network, I do not get
> any event message:
>         
>         > disable_network 0
>         OK
> 
> I wonder why wpa_supplicant does not throw a AP-DISABLED and
> CTRL-EVENT-DISCONNECTED event message. Is there any way to generate
> these events when disabling the network?

I answer myself to my mail. I did some debugging and studied the
sources. For hostapd AP_EVENT_DISABLED is propagated in
hostapd_disable_iface() after receiving a 'DISABLE' command.

In case of wpa_supplicant after receiving a 'DISABLE_NETWORK' for an AP
network at a certain point wpa_supplicant_mark_disassoc() is called
which in return calls wpa_supplicant_ap_deinit(). And I think somewhere
here the event messages AP-DISABLED and CTRL-EVENT-DISCONNECTED should
be propagated.

What do you think? Where should the wpa_msg for AP-DISABLED and
CTRL-EVENT-DISCONNECTED be placed?

Best regards
J?rg Krause




More information about the Hostap mailing list