WLAN Security
65
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
WLAN
SecParams.Key = KEY;
SecParams.KeyLen = strlen(KEY);
SecExtParams.User = IDENTITY;
SecExtParams.UserLen = strlen(IDENTITY);
SecExtParams.AnonUser = ANONYMOUS;
SecExtParams.AnonUserLen = strlen(ANONYMOUS);
SecExtParams.EapMethod = SL_WLAN_ENT_EAP_METHOD_PEAP0_MSCHAPv2;
Status
= sl_WlanConnect((_i8*)SSID,strlen(SSID),0,&SecParams ,&SecExtParams);
if
( Status )
{
/* error */
}
4.6.3 WPS
The SimpleLink Wi-Fi device provides users the ability to create a secure connection by using Wi-Fi
Protected Setup (WPS). WPS is one of the provisioning ways to connect the device to the network (for
more information on provisioning, see
). WPS allows an easy and secure method to provision
devices without knowing the network name and without typing long passwords. The standard defines two
mandatory methods for WPS-enabled APs. The SimpleLink device support both methods:
•
Push-Button Connect (PBC) – Push the physical WPS button in the AP, or if the button is unavailable
start the WPS process using the GUI of the AP. The AP enters the WPS provisioning process for 2
minutes. During this period, the SimpleLink device also enters the provisioning process by calling the
sl_WlanConnect API with WPS parameters. If the connection successfully completes, a profile with the
network name and security parameters is automatically added.
•
Personal Identification Number (PIN) – Enter the PIN code generated by the host using the GUI of the
AP. The AP enters the WPS provisioning process for 2 minutes. During this period, the SimpleLink
device also enters the WPS provisioning process by calling the sl_WlanConnect API with WPS
parameters. If the connection successfully completes, a profile with the network name and security
parameters is automatically added.
When the WPS process successfully completes, a connection with the AP is established in the correct
security setting according to the configuration of the AP (WPA/WPA2). The connection parameters are
saved as a profile. According to the connection policy, allow a reconnection after a reset.
An example of initiating WPS with the PBC method:
_i16 Status;
SlWlanSecParams_t SecParams;
SecParams.Type = SL_WLAN_SEC_TYPE_WPS_PBC;
SecParams.KeyLen = 0;
SecParams.Key =
""
;
Status
= sl_WlanConnect(
"WPS_AP"
,strlen(
"WPS_AP"
),NULL,&SecParams ,NULL);
if
( Status )
{
/* error */
}
An example of initiating WPS with the PIN Code:
_i16 Status;
SlWlanSecParams_t SecParams;
SecParams.Type = SL_WLAN_SEC_TYPE_WPS_PIN;
SecParams.KeyLen = strlen(
"11361435"
);
SecParams.Key =
"11361435"
:
Status
= sl_WlanConnect(
"WPS_AP"
,strlen(
"WPS_AP"
),NULL, &SecParams ,NULL);
if
( Status )
{
/* error */
}