Access Point
50
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
WLAN
Examples of removing entry according to the entry index:
_i16 Status;
_u8
sta_index = 0;
Status
= sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_ACCESS_LIST_DEL_IDX, sizeof(sta_index), (_u8
*)&sta_index);
if
( Status )
{
/* error */
}
•
Get Number of Entries in the Black List
Get the number of denied stations in the current black list.
Example:
_i16 Status;
_u8 aclist_num_entries;
_u16 config_opt = SL_WLAN_AP_ACCESS_LIST_NUM_ENTRIES;
_u16 len =
sizeof
(aclist_num_entries);
Status
= sl_WlanGet(SL_WLAN_CFG_AP_ID, &config_opt, &len, (_u8 *)&aclist_num_entries);
if
( Status )
{
/* error */
}
•
Get the Black List
Get the AP black list from a specific index. The number of entries in the list is extracted from the
returned total length, divided by the address size.
Example:
_i16 Status;
_u8 aclist_mac[SL_WLAN_MAX_ACCESS_LIST_STATIONS][MAC_LEN];
unsigned char
aclist_num_entries;
unsigned short
config_opt;
unsigned short
len;
int
actual_aclist_num_entries;
unsigned short
start_aclist_index;
unsigned short
aclist_info_len;
int
i;
start_aclist_index = 0;
aclist_info_len = 2*MAC_LEN;
Status =
sl_WlanGet(SL_WLAN_CFG_AP_ACCESS_LIST_ID, &start_aclist_index, &aclist_info_len,
(_u8*)&aclist_mac[start_aclist_index]);
if
( Status )
{
/* error */
}
actual_aclist_num_entries = aclist_info_len / MAC_LEN;
/* number of stations in the list */
4.4.3 Set Network Configuration
4.4.3.1
Set AP IP Parameters
The SimpleLink Wi-Fi device lets users set the AP static IPv4 parameters (IPv6 is not supported in AP
mode). This configuration is persistent, and reset is required for changes to apply. The following
parameters can be configured:
•
IP – IPv4 static address
•
Subnet mask – IPv4 network mask address
•
Default gateway – IPv4 default gateway address