Disabling the Wi-Fi Interface
You can disable the wln. object by calling wln.disable. After this, you can enable the wln. object again by resetting the Wi-Fi module and calling wln.boot.
Disabling the wln. object is not the same as shutting down the Wi-Fi module. Disabling the wln. object means that TiOS stops servicing it — the Wi-Fi module itself continues to run. To shut the Wi-Fi module down, put it in reset.
Note that the wln. object does not become disabled immediately upon invoking wln.disable. To detect when this actually happens, poll the value of wln.enabled until it becomes 0 — NO:
wln.disable
While wln.enabled<>NO
Wend
Alternatively, wait for the on_wln_event(0 — PL_WLN_EVENT_DISABLED) event — it is generated when the wln. object is disabled.