SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
STA mode is activated with default configurations. Reconfiguring these settings is possible, but not mandatory. The following configurations are available. These configurations require reset and are always persistent with no dependency on the system-persistent configuration.
Sets the TX power which controls the transmission power level, and can increase or decrease the value, relative to the maximum TX power. The value represents steps from 0 to 15 which reflect as dBm offsets from maximum power (0 means maximum power) according to Figure 5-1.
Tx Power can only be set on 2.4-GHz channels.
Example:
_i16 Status;
_u8 StaPower = 3;
Status = sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_STA_TX_POWER,1,(_u8 *)& StaPower);
if( Status )
{
/* error */
}
Sets the country code for STA mode. This setting enables scanning, and connection only to an AP which operates on the chosen channel set.
Table 5-3 shows the basic supported country codes.
Country Code | Supported Channels |
---|---|
US | 1-11 |
EU | 1-13 |
JP | 1-13 |
The CC3135, CC3235S, and CC3235SF support a wider set of country codes due to the variety of channels range between countries in the 5-GHz band. The full list of supported countries could be found in Section C.
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 */
}
For CC3135, CC3235, and CC3235SF devices, this setting enables or disables 5-GHz channels in STA mode. By default, 5-GHz channels are enabled in the system and the scanning time might be longer due to the total number of enabled channels. In deployments that do not use these channels, disabling the channels might improve the scan time and power consumption.
The mode can be changed by setting 0 to disable 5-GHz channels and 1 to enable.
Example:
_i16 Status;
_u8 Mode = 0; //0 disable 5GHz mode
Status = sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, WLAN_GENERAL_PARAM_OPT_ENABLE_5G, 1, (_u8 *)&Mode);
if( Status )
{
/* error */
}
PS POLL is used in power save policy to pull buffered frames from the AP after a beacon with unicast traffic is indicated. Using PS POLL is the standard way of power save operation.
1. Disable - (default mode) - station sends PS-Poll ctrl frame to receive buffered frames from the AP when unicast traffic is indicated in the beacon.
2. Enable - Station transition from power save to Active (send NULL data frame) whenever unicast traffic is indicated in the beacon (this mode is for interoperability issues with access points that doesn't fully support PS-Poll).
Example:
SlWlanNoPSPollMode_t NoPsPollMode;
NoPsPollMode.Enable = 1; // enable no PS-Poll mode (work without PS-Poll frames)
sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_NO_PS_POLL_MODE,sizeof(SlWlanNoPSPollMode_t),(_u8 *)& NoPsPollMode);