For CC3235MODSF, how do I assign a Wi-Fi channel in the 5 GHz band that I want to communicate on? E.g. I want to communicate on channel #161. Second, how do I choose transmit power level at that channels? Say, I want to transmit at 0 dBm.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
For CC3235MODSF, how do I assign a Wi-Fi channel in the 5 GHz band that I want to communicate on? E.g. I want to communicate on channel #161. Second, how do I choose transmit power level at that channels? Say, I want to transmit at 0 dBm.
You should use the sl_WlanSet command.
For a station you can define the scanned channels:
- SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS: \code SlWlanScanParamCommand_t ScanParamConfig; _u16 Option = SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS; _u16 OptionLen = sizeof(ScanParamConfig); // 2.4G channels bits order: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ScanParamConfig.RssiThreshold = -70; ScanParamConfig.ChannelsMask = 0x1FFF; sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, &Option, &OptionLen, (_u8 *)&ScanParamConfig); \endcode <br> - SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS_5G: \code SlWlanScanParam5GCommand_t ScanParamConfig5G; _u16 Option = SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS_5G; _u16 OptionLen = sizeof(SlWlanScanParam5GCommand_t); // 5.0G channels bits order: 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, // 136, 140, 144, 149, 153, 157, 161, 165, 169, 184, 188, 192, 196 ScanParamConfig5G.ChannelsMask = 0x0000000F; // Select ChannelsMask for channels 36, 40, 44, 48 ScanParamConfig5G.RssiThreshold = -70; sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, Option, OptionLen, (_u8 *)&ScanParamConfig5G); \endcode <br>
For an AP you can define the operational channel:
- SL_WLAN_AP_OPT_CHANNEL: \code _u8 val = channel; sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_CHANNEL, 1, (_u8 *)&val); \endcode <br>
The TX power can be controlled with:
- SL_WLAN_GENERAL_PARAM_OPT_STA_TX_POWER: \code _u8 stapower=(_u8)power; sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_STA_TX_POWER,1,(_u8 *)&stapower); \endcode <br> - SL_WLAN_GENERAL_PARAM_OPT_AP_TX_POWER: \code _u8 appower=(_u8)power; sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_AP_TX_POWER,1,(_u8 *)&appower); \endcode <br>
Note that both parameter are dependent on the regulatory domain setting.
More info can be found in the programmer's guide (www.ti.com/.../swru455l.pdf) or in the SDK doc folder (<SDK-ROOT>/docs/wifi_host_driver_api/html/group___wlan.html).
Br,
Kobi