[riot-notifications] [RIOT-OS/RIOT] netdev/lora: fix size of NETOPT_RX_SYMBOL_TIMEOUT (#16604)

José Alamos notifications at github.com
Fri Jul 2 14:38:46 CEST 2021


> Can you explain more?

The number of symbols used for RX Timeout is given by the following function in Semtech LoRaMAC (windowTimeout):
```c
void RegionCommonComputeRxWindowParameters( double tSymbol, uint8_t minRxSymbols, uint32_t rxError, uint32_t wakeUpTime, uint32_t* windowTimeout, int32_t* windowOffset )
{
    *windowTimeout = MAX( ( uint32_t )ceil( ( ( 2 * minRxSymbols - 8 ) * tSymbol + 2 * rxError ) / tSymbol ), minRxSymbols ); // Computed number of symbols
    *windowOffset = ( int32_t )ceil( ( 4.0 * tSymbol ) - ( ( *windowTimeout * tSymbol ) / 2.0 ) - wakeUpTime );
}
```

`minRxSymbols` (mapped to `CONFIG_LORAMAC_DEFAULT_MIN_RX_SYMBOLS` and `rxError` (mapped to `CONFIG_LORAMAC_DEFAULT_SYSTEM_MAX_RX_ERROR`) should be configured in a way that the windowTimeout doesn't exceed 255. Otherwise sx127x radios won't work and even if the NETOPT returns an error, the stack has no way to recover.

The default values (12 for minRxSumbol and 50 for rxError) ensure this is true.

For GNRC LoRaWAN we are only using one value (`GNRC_LORAWAN_MIN_SYMBOLS_TIMEOUT`) . This value is lmited by Kconfig to less than 255.

BTW, maybe I can remove this config from GNRC LoRaWAN since it's already included in the generic LoRaMAC configurations.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16604#issuecomment-872966542
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210702/29147671/attachment.htm>


More information about the notifications mailing list