.Associationstate R/O Property

Top  Previous  Next

Function:

Indicates whether the Wi-Fi interface is idle, associated with another network, or running its own ad-hoc network.

Type:

Enum (pl_wln_association_states, byte)

Value Range:

0- PL_WLN_NOT_ASSOCIATED (default): The Wi-Fi interface is idle.

1- PL_WLN_ASSOCIATED: The Wi-Fi interface is associated with a wireless network.

2- PL_WLN_OWN_NETWORK: The Wi-Fi interface is running its own ad-hoc network.

See Also:

Associating With Selected Network, Disassociating From the Network, Creating Own Ad-hoc Network, Terminating Own Ad-hoc Network, Detecting Disassociation or Offline State

 


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 (on_wln_event will be generated too).

Disassociation can be induced through the wln.disassociate method or forced by the access point. Disassociation will also happen if the access point goes offline or out of range, or if the GA1000 is powered down, reset, disconnected, or malfunctions.

After the Wi-Fi interface succeeds in creating its own ad-hoc network (see wln.networkstart), the value of this property becomes 2- PL_WLN_OWN_NETWORK. The value is reset back to 0- PL_WLN_NOT_ASSOCIATED when the ad-hoc network is terminated with wln.networkstop.