Setting WPA Mode and Key

The wln.setwpa method allows you to specify the WPA mode and key. Note that wln.setwpa is an immediate task and there is a certain correct way of handling tasks.

The wln.setwpa method will be rejected (return 1 — REJECTED) if the Wi-Fi add-on module is not booted property (wln.enabled = 0 — NO).

Tibbo devices only support the "personal" WPA modes WPA-PSK and WPA2-PSK.

The wln.setwpa method works differently on the GA1000 and WA2000.


GA1000

The GA1000 is unable to handle WPA and WPA2 security completely on its own. The module requires help in the calculation of the so-called pre-shared key. The algorithm for this calculation is very complex and we are not going to explain it here. All this complexity is handled nicely by our WLN library.


WA2000

The WA2000 handles everything related to WPA and WPA2 security internally. To set the WPA mode, call wln.setwpa, like this:

Tibbo BASIC
...
'ap_password is the password of the access point
wln.setwpa(PL_WLN_WPA_WPA2_PSK,PL_WLN_WPA_ALGORITHM_AES,ap_password,PL_WLN_WPA_CAST_MULTICAST)
...

A tip note icon.If you are switching from an access point using WPA security to another access point with no security or WEP security, you still need to execute wln.setwpa(PL_WLN_WPA_DISABLED,0,"",0)!


Setting WPA Mode and Key

GA1000

WA2000