A configuration structure for the LBT transmit algorithm.
One of RAIL's schemes for polite spectrum access is an implementation of a Listen-Before-Talk (LBT) algorithm, loosely based on ETSI 300 220-1.
Currently, however, it is constrained by the EFR32's CSMA-oriented hardware so is turned into an equivalent sl_rail_csma_config_t configuration and passed to the CSMA engine:
if (lbt_max_bo_rand == lbt_min_bo_rand) {
// Fixed backoff
csma_min_bo_exp = csma_max_bo_exp = 0;
if (lbt_min_bo_rand == 0) {
cca_backoff_us = lbt_backoff_us;
} else {
cca_backoff_us = lbt_min_bo_rand * lbt_backoff_us;
}
cca_duration_us = lbt_duration_us;
} else {
// Random backoff: map to random range 0 .. (lbt_max_bo_rand - lbt_min_bo_rand)
csma_min_bo_exp = csma_max_bo_exp = ceiling(log2(lbt_max_bo_rand - lbt_min_bo_rand));
cca_backoff_us = round((lbt_backoff_us * (lbt_max_bo_rand - lbt_min_bo_rand))
/ (1 << csma_mi_nb_oexp));
cca_duration_us = lbt_duration_us + (lbt_min_bo_rand * lbt_backoff_us);
}
csma_tries = lbt_tries;
cca_threshold_dbm = lbt_threshold_dbm;
csma_timeout_us = lbt_timeout_us;
Public Attributes#
The minimum backoff random multiplier.
The maximum backoff random multiplier.
The number of LBT iterations that can fail before reporting SL_RAIL_EVENT_TX_CHANNEL_BUSY.
The LBT RSSI threshold, in dBm, above which the channel is considered 'busy'.
The backoff unit period, in RAIL's microsecond time base.
The minimum desired LBT check duration in microseconds.
An overall timeout, in RAIL's microsecond time base, for the operation.
Public Attribute Documentation#
lbt_max_bo_rand#
uint8_t sl_rail_lbt_config_t::lbt_max_bo_rand
The maximum backoff random multiplier.
It must be greater than or equal to lbt_min_bo_rand.
If both backoff multipliers are identical, a non-random fixed backoff of lbt_backoff_us times the multiplier (minimum 1) duration results.
lbt_tries#
uint8_t sl_rail_lbt_config_t::lbt_tries
The number of LBT iterations that can fail before reporting SL_RAIL_EVENT_TX_CHANNEL_BUSY.
Typically ranges from 1 to SL_RAIL_MAX_LBT_TRIES; higher values are disallowed. A value 0 always transmits immediately without performing LBT, similar to calling sl_rail_start_tx().
lbt_threshold_dbm#
int8_t sl_rail_lbt_config_t::lbt_threshold_dbm
The LBT RSSI threshold, in dBm, above which the channel is considered 'busy'.
lbt_backoff_us#
uint16_t sl_rail_lbt_config_t::lbt_backoff_us
The backoff unit period, in RAIL's microsecond time base.
It is multiplied by the random backoff multiplier controlled by lbt_min_bo_rand and lbt_max_bo_rand to determine the overall backoff period. For random backoffs, any value above 32768 microseconds for the 'EFR Series 2' and 8192 microseconds for the 'Series 3' will be truncated for a single backoff period. Up to 255 backoff periods are supported. For fixed backoffs it can go up to 65535 microseconds.
lbt_duration_us#
uint16_t sl_rail_lbt_config_t::lbt_duration_us
The minimum desired LBT check duration in microseconds.
Note
Depending on the radio configuration, due to hardware constraints, the actual duration may be longer. Also, if the requested duration is too large for the radio to accommodate, sl_rail_start_cca_lbt_tx() will fail returning SL_RAIL_STATUS_INVALID_PARAMETER.
lbt_timeout_us#
sl_rail_time_t sl_rail_lbt_config_t::lbt_timeout_us
An overall timeout, in RAIL's microsecond time base, for the operation.
If the transmission doesn't start before this timeout expires, the transmission will fail with SL_RAIL_EVENT_TX_CHANNEL_BUSY. This is important for limiting LBT due to LBT's unbounded requirement that if the channel is busy, the next try must wait for the channel to clear. A value 0 means no timeout is imposed.