Changing Socket Properties
200
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Transceiver
13.6.3 Change Tx Power
Setting the Tx power lets the user change the transmission power relative to the maximum Tx power. The
values represent steps 0 to 15, which reflect as dBm offset from maximum power (0 means MAX power).
For more information, see
.
Example:
_i16 Status;
_u32 TxPower = 1;
/* valid range is 1-15 */
Status = sl_SetSockOpt(soc, SL_SOL_PHY_OPT,
SL_SO_PHY_TX_POWER, &TxPower,
sizeof
(TxPower));
if
(Status)
{
/* Error */
}
NOTE:
The Tx power parameter has no default value, and therefore must be through the sl_Send
operation or sl_SetSockOpt, as specified in this section.
13.6.4 Change Number of Frames to Transmit (Internal Packet Generator)
The RAW socket packet generator sets the number of frames to transmit in the internal packet generator.
Example:
_i16 Status;
_u32 NumFrames = 10;
Status = sl_SetSockOpt(soc, SL_SOL_PHY_OPT, SL_SO_PHY_NUM_FRAMES_TO_TX, &NumFrames,
sizeof
(NumFrames));
if
(Status)
{
/* Error */
}
13.6.5 Change 802.11b Preamble
Set Long or Short WLAN PHY preamble for 802.11b rates only. Set 1 for short preamble or 0 for long.
Example:
_u32 preamble = 1;
/* set short preamble */
_i16 Status;
Status = sl_SetSockOpt(soc, SL_SOL_PHY_OPT, SL_SO_PHY_PREAMBLE, &preamble,
sizeof
(preamble));
if
(Status)
{
/* Error */
}
NOTE:
The 802.11b preamble parameter has no default value, and therefore must be through the
sl_Send operation or sl_SetSockOpt, as specified in this section.
13.6.6 Set CCA Threshold
The CCA threshold can be configured to set the specific threshold when the channel is considered as
occupied. The following values can be set:
•
SL_TX_INHIBIT_THRESHOLD_MIN (–88 dBm)
•
SL_TX_INHIBIT_THRESHOLD_LOW (–78 dBm)
•
SL_TX_INHIBIT_THRESHOLD_DEFAULT (–68 dBm)
•
SL_TX_INHIBIT_THRESHOLD_MED (–58 dBm)