Access Point
49
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
WLAN
_i16 Status;
_i8 Ssid[33];
_u16 Len = 33;
_u16
Config_opt;
memset(ssid,0,33);
Config_opt = SL_WLAN_AP_OPT_SSID;
Status
= sl_WlanGet(SL_WLAN_CFG_AP_ID, &config_opt , &len, (_u8* )ssid);
if
( Status )
{
/* error */
}
4.4.2.4
Black List
The black list lets users filter the stations which can connect to the AP according to their MAC address.
The list contains up to eight entries and is persistent. Adding or removing a station to and from the list
includes file write. Adding a station to the black list, which is currently connected to the AP, does not
disconnect this station from the AP. The host application can enable and disable the black list without
erasing the list of stations. By default, the black list is enabled. Removing a station from a list can be done
by the MAC address or by the index of the entry.
•
Set Black List Mode
The SimpleLink Wi-Fi device allows enabling or disabling the black list mode.
Example:
_i16 Status;
_u8
access_list_mode = SL_WLAN_AP_ACCESS_LIST_MODE_DENY_LIST;
Status = sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_ACCESS_LIST_MODE,
sizeof
(access_list_mode),
(_u8 *)&access_list_mode);
if
( Status )
{
/* error */
}
•
Add MAC to the Black List
Add a station to the black list. Adding a station to the black list will not disconnect it.
Example:
_i16 Status;
_u8
sta_mac[6] = { 0x00, 0x22, 0x33, 0x44, 0x55, 0x66 };
Status
= sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_ACCESS_LIST_ADD_MAC,
sizeof
(sta_mac), (_u8 *)
&sta_mac);
if
( Status )
{
/* error */
}
•
Remove MAC from the Black List
Removing a station from the black list can be done using the MAC address or entry index (retrieve the
entry index with Get Black option, which is specified as follows).
Examples of removing entry according to the MAC address:
_i16 Status;
_u8
sta_mac[6] = { 0x00, 0x22, 0x33, 0x44, 0x55, 0x66 };
Status
= sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_ACCESS_LIST_DEL_MAC, sizeof(sta_mac), (_u8 *)
&sta_mac);
if
( Status )
{
/* error */
}