Associating With a Network
The association process is initiated using the wln.associate method. Association is a required step before your device is able to send and receive data over the Wi-Fi interface. Note that wln.associate is a task and there is a certain correct way of handling tasks .
Wln.associate works differently on GA1000 and WA2000 devices:
•Wln.associate on GA1000
•Wln.associate on WA2000
Wi-Fi security (WPA or WEP) must be set prior to associating.
When WPA or WPA2 security is used, this method only really achieves "pre-association." After this, the Wi-Fi interface must still execute the WPA handshake. If this fails, your device will be disassociated from the network and you a on_wln_event (1- PL_WLN_EVENT_DISASSOCIATED) event will be generated.