on_wln_event Event

Function:

Generated when the wln. object detects disassociation from the wireless network, the Wi-Fi interface is disabled by calling wln.disable, or the Wi-Fi hardware is disconnected, powered down, reset, or has malfunctioned.

Declaration:

on_wln_event(wln_event as pl_wln_events)

See Also:

Detecting Disassociation or Offline State.


Part

Description

wln_event

  • 0 — PL_WLN_EVENT_DISABLED: wln.disable was invoked or the Wi-Fi hardware has been disconnected, powered down, or has malfunctioned.
  • 1 — PL_WLN_EVENT_DISASSOCIATED: Wi-Fi interface has been disassociated from the wireless network.

On the WM2000 and WS1102, the following value is also available:

2 — PL_WLN_EVENT_ASSOCIATED: Wi-Fi interface has associated with the wireless network and has executed the WPA handshake successfully.


Details

Multiple on_wln_event events may be waiting in the event queue. For this reason, the doevents statement will be skipped (not executed) if encountered within the event handler for this event or the body of any procedure in the related call chain.


On the WM2000 and WS1102, if wln.autoconnect is set to 1 — YES, association with a wireless network will trigger the generation of the on_wln_event handler with PL_WLN_EVENT_ASSOCIATED as the value of the wln_event parameter. If wln.autoconnect is set to 0 — NO, association with the network will not trigger the event handler's generation.


on_wln_event Event

Details