Station (STA)
43
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
WLAN
Index = 2;
Status = sl_WlanProfileGet(Index, Name, &NameLength, MacAddr, &SecParams, &SecExtParams,
&Priority);
if
( Status )
{
/* error */
}
•
Edit Profile
Adding a profile with an existing SSID, BSSID (if applicable), and security type updates the existing
entry. If one of these values is different, it is considered a new profile and is saved as a new entry.
•
Suspend Profiles
Specific profiles can be suspended without deletion. This setting is not persistent, and it is deleted after
reset.
An example of suspending a profile with index 1, 4, 6 follows:
_u32
SuspendedProfilesMask;
_i16 Status;
SuspendedProfilesMask = INDEX1 | INDEX4 | INDEX 6 ;
/* 0x29 */
Status
= sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_SUSPEND_PROFILES,
sizeof
(suspendedProfilesMask),(_u8*)&suspendedProfilesMask);
if
( Status )
{
/* error */
}
•
Enterprise Profile
Only one enterprise profile is supported. Before adding the profile, write certificate files to the following
system files:
–
/sys/cert/ca.der - CA for the server authentication
–
/sys/cert/client.der - Optional, if server requests client authentication
–
/sys/cert/private.key - Optional, if server requests client authentication
An example of adding an enterprise profile follows:
SlWlanSecParams_t SecParams;
SlWlanSecParamsExt_t SecExtParams;
_i16 Index;
SecParams.Type = SL_WLAN_SEC_TYPE_WPA_ENT;
SecParams.Key =
"123456789"
;
SecParams.KeyLen = strlen(SecParams.Key);
SecExtParams.User =
"Ent_user"
;
SecExtParams.UserLen = strlen(
"Ent_user"
);
SecExtParams.EapMethod = SL_WLAN_ENT_EAP_METHOD_TTLS_TLS;
Index
= sl_WlanProfileAdd(
"Test_Ent_AP"
,strlen(
"Test_Ent_AP"
),0, &SecParams ,& SecExtParams,7
/*
Priority*/
,0);
4.3.3.3
Manual Connection
Manual connection triggers an immediate connection scan, and tries to establish connection to a specific
AP. The connection scan continues until a connection completes or a disconnect command is issued.
Manual connection is in higher priority than any other connection type. The connection can be established
according to SSID, or SSID and BSSID. The connection command can be applied only by the host driver
and returns immediately, before the connection is established. The host application should wait for the
connection asynchronous events as in all other connection methods.