|
.Setwpa Method |
Top Previous Next |
Function: |
Causes the Wi-Fi interface to commence setting new WPA mode and key. |
Syntax: |
wln.setwpa(wpamode as pl_wln_wpa_modes, algorithm as pl_wln_wpa_algorithms, byref wpakey as string, cast as pl_wln_wpa_unicast_multicast) as accepted_rejected |
Returns: |
One of accepted_rejected constants: 0- ACCEPTED. 1- REJECTED. |
See Also: |
Part |
Description |
wepmode |
WPA mode to set: 0- PL_WLN_WPA_DISABLED: WPA is to be disabled. 1- PL_WLN_WPA_WPA1_PSK: WPA1-PSK is to be used. 0- PL_WLN_WPA_WPA2_PSK: WPA2-PSK is to be used. |
algorithm |
Encryption algorithm to be used: 0- PL_WLN_WPA_ALGORITHM_TKIP: TKIP algorithm. 1- PL_WLN_WPA_ALGORITHM_AES: AES algorithm (also referred to as CCMP). |
wpakey |
A string containing new WPA key. Supposed to be 16 characters long. |
cast |
Type of key: 0- PL_WLN_WPA_CAST_UNICAST: unicast key. 1- PL_WLN_WPA_CAST_MULTICAST: multicast key. |
Details
WPA/WPA2 security is very complex. We recommend using the WLN library.
Changing WPA mode and keys is an immediate task and there is a certain correct way of handling tasks. "Immediate" means you don't have to wait for the task to complete -- it is finished as soon as wln.setwpa is done executing. The on_wln_task_complete event is still generated.