Access Point
48
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
WLAN
if
( Status )
{
/* error */
}
•
AP TX Power
The SimpleLink Wi-Fi device lets users set the TX power level in AP mode. The value is from 0 to 15,
as dB offset from maximum power (0 is MAX power).
Example:
_i16 Status;
_u8
ApPower = 3;
Status = sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_AP_TX_POWER,1,(_u8
*)& ApPower);
if
( Status )
{
/* error */
}
•
Set Info Elements
The SimpleLink Wi-Fi device lets users set up to four custom information (info) elements per mode,
AP, or Wi-Fi Direct GO. For AP mode, no more than 300 bytes
(SL_INFO_ELEMENT_MAX_TOTAL_LENGTH_AP) can be stored for all info elements (for example, 4
info elements of 75 bytes each). For Wi-Fi Direct GO mode, no more than 160 byes
(SL_INFO_ELEMENT_MAX_TOTAL_LENGTH_P2P_GO) can be stored for all info elements (for
example, 4 info elements of 40 bytes each). To delete an info element, use the relevant index with
length 0.
Example:
_i16 Status;
SlWlanSetInfoElement_t
InfoEle;
InfoEle.Index
= Index;
/* Index of the info element. range: 0 -
SL_WLAN_MAX_PRIVATE_INFO_ELEMENTS_SUPPROTED */
InfoEle.Role
= Role;
/* SL_WLAN_INFO_ELEMENT_AP_ROLE (0) or
SL_WLAN_INFO_ELEMENT_P2P_GO_ROLE (1) */
InfoEle.IE.Id
=
Id;
/* Info element ID. if
SL_WLAN_INFO_ELEMENT_DEFAULT_ID (0) is set, ID will be set to 221 */
/* Organization unique ID. If all 3 bytes are zero - it will be replaced with 08,00,28 */
InfoEle.IE.Oui[0] =
Oui0;
/* Organization unique ID first Byte */
InfoEle.IE.Oui[1] =
Oui1;
/* Organization unique ID second Byte */
InfoEle.IE.Oui[2] =
Oui2;
/* Organization unique ID third Byte */
InfoEle.IE.Length = Len;
/* Length of the info element. must be smaller than 253
bytes */
InfoEle (infoele.IE.Data, 0, SL_WLAN_INFO_ELEMENT_MAX_SIZE);
if
( Len < = SL_WLAN_INFO_ELEMENT_MAX_SIZE )
{
memcpy(InfoEle.IE.Data, IE, Len);
Status =
sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_INFO_ELEMENT,
sizeof
(SlWlanSetInfoElement_t),(_u8* )&InfoEle);
if
( Status )
{
/* error */
}
}
4.4.2.3
Get General AP Parameters
AP mode configuration can be retrieved by host commands. Each set parameter (discussed in the
previous section) can be retrieved with the following API, and the same configuration ID and configuration
option.
Example: