![Texas Instruments CC3220 Скачать руководство пользователя страница 46](http://html.mh-extra.com/html/texas-instruments/cc3220/cc3220_programmers-manual_1094609046.webp)
Access Point
46
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
WLAN
if
(ROLE_AP != Role)
{
/* Role Error */
}
4.4.2.2
Set General AP Parameters
AP mode is activated with default configuration, and reconfiguration is not mandatory, although this option
exists. The following settings are available, require reset, and are persistent with no dependency on the
system-persistent configuration.
•
SSID
The SimpleLink Wi-Fi device default SSID is ‘mysimplelink-xxyyzz’ where ‘xxyyzz’ are the last six digits
of the device MAC address. Because the MAC address is unique, the SSID is also unique. Still, the
SSID configuration exists with maximum length of 32 characters.
Example:
_i16 Status;
_u8
Ssid[] =
"Test_AP"
;
Status=sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_SSID, strlen(Ssid), Ssid);
if
( Status )
{
/* error */
}
•
Hidden SSID
The device can be configured and not broadcast the SSID inside the Beacon frame. This configuration
is disabled by default.
Example:
_i16 Status;
_u8
hidden = TRUE;
Status =
sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_HIDDEN_SSID, 1, (_u8 *)& hidden);
if
( Status )
{
/* error */
}
•
Set Country Code / Regulatory Domain
Set the country code for AP mode. Possible values are US, EU, JP, and all others are considered an
error. Each country code sets different channel ranges:
–
US: 1–11
–
EU, JP: 1–13
Example:
_i16 Status;
_u8
Str[] =
"US"
;
Status =
sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_COUNTRY_CODE, 2,
Str);
if
( Status )
{
/* error */
}
•
Channel
Set the SimpleLink Wi-Fi device AP Operational Channel. Possible values from 1 to 13. Any other
value is considered as error. The default channel in AP mode is 6.
Example:
_i16 Status;
_u8
channel = 1;
Status =
sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_CHANNEL, 1, (_u8 *)& channel);