.associationstate R/O Property


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


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 network.

See Also:

Associating With a Network, Disassociating From a Network, Creating Own Network, Terminating Own Network, Detecting Disassociation or Offline State


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).

After the Wi-Fi interface succeeds in creating its own 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.