.Associationstate R/O Property

Top  Previous  Next

 

Function:

Returns current association state of the Wi-Fi interface.

Type:

Enum (pl_wln_association_states, byte)

Value Range:

0- PL_WLN_NOT_ASSOCIATED (default): The Wi-Fi interface is not associated with any wireless network.

1- PL_WLN_ASSOCIATED: The Wi-Fi interface is associated with a wireless network or running an ad-hoc network of its own.

See Also:

Associating With Selected Network, Disassociating From the Network, Detecting Disassociation or Power-down

 


Details

After the successful association, which is initiated through the wln.associate method, the value of this property changes to 1- PL_WLN_ASSOCIATED. The value is reset back to 0- PL_WLN_NOT_ASSOCIATED if disassociation occurs. Every time this happens, an on_wln_event event is generated with its wln_event argument set to 1- PL_WLN_EVENT_DISASSOCIATED.

Disassociation may happen for a number of reasons: it can be induced through the wln.disassociate method or forced by the access point. The disassociation will also happen if the access point goes offline or out of range, or if the Wi-Fi hardware is powered down, disconnected, or malfunctions.