
Changing Socket Properties
199
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Transceiver
Status = sl_SetSockOpt(soc, SL_SOL_SOCKET,
SL_SO_CHANGE_CHANNEL, &channel,
sizeof
(channel));
if
(Status)
{
/* Error */
}
NOTE:
The channel parameter has no default value, and therefore must be set when opening the
socket, through the sl_Send operation, or through sl_SetSockOpt, as specified in this
section.
13.6.2 Change Default PHY Data Rate
Change the WLAN transmit rate. The values can be one of the following:
•
SL_WLAN_RATE_1M = 1
•
SL_WLAN_RATE_2M = 2
•
SL_WLAN_RATE_5_5M = 3
•
SL_WLAN_RATE_11M = 4
•
SL_WLAN_RATE_6M = 6
•
SL_WLAN_RATE_9M = 7
•
SL_WLAN_RATE_12M = 8
•
SL_WLAN_RATE_18M = 9
•
SL_WLAN_RATE_24M = 10
•
SL_WLAN_RATE_36M = 11
•
SL_WLAN_RATE_48M = 12
•
SL_WLAN_RATE_54M = 13
•
SL_WLAN_RATE_MCS_0 = 14
•
SL_WLAN_RATE_MCS_1 = 15
•
SL_WLAN_RATE_MCS_2 = 16
•
SL_WLAN_RATE_MCS_3 = 17
•
SL_WLAN_RATE_MCS_4 = 18
•
SL_WLAN_RATE_MCS_5 = 19
•
SL_WLAN_RATE_MCS_6 = 20
•
SL_WLAN_RATE_MCS_7 = 21
Example:
_i16 Status;
_i16 rate = SL_WLAN_RATE_1M;
Status = sl_SetSockOpt(soc, SL_SOL_PHY_OPT,
SL_SO_PHY_RATE, &rate, sizeof(rate));
if (Status)
{
/* Error */
}
NOTE:
The PHY data rate parameter has no default value, and therefore must be through the
sl_Send operation or through sl_SetSockOpt, as specified in this section.