FORUM

SetLoRaSymbNumTimeout command

Hello,

what is the exact effect / functionality of the SetLoRaSymbNumTimeout command? In particular, what is the difference between the timeout which can be set by the SetRx command and the timeout set by the SetLoRaSymbNumTimeout command?

The SX1262 datasheet provides the following information on the SetLoRaSymbNumTimeout command:

9.6 Receive (RX) Mode note:

In LoRa® mode, the user can also use the command SetLoRaSymbNumTimeout(…) to perform a quick and immediate assessment of the presence (or not) of LoRa preamble symbols. If the user defined parameter SymbNum is different from 0, the modem will wait for a total of SymbNum LoRa® symbol to validate, or not, the correct detection of a LoRa® packet. If the various states of the demodulator are not lock at this moment, the radio will generate the RxTimeout IRQ. Otherwise, the radio will stay in Rx for the full duration of the packet.

The above paragraph is contradictory. On the one hand, it states that SetLoRaSymbNumTimeout can be used to to perform a quick and immediate assessment of the presence (or not) of LoRa preamble symbols. On the other hand, it states that the modem will wait for a total of SymbNum LoRa® symbols (i.e. LoRa preamble or data symbols).

13.4.9 SetLoRaSymbNumTimeout

This command sets the number of symbols used by the modem to validate a successful reception.

In LoRa® mode, when going into Rx, the modem will lock as soon as a LoRa® symbol has been detected which may lead to false detection. This phenomena is quite rare but nevertheless possible. To avoid this, the command SetLoRaSymbNumTimeout can be used to define the number of symbols which will be used to validate the correct reception of a packet.

When the SymbNum parameter is set the 0, the modem will validate the reception as soon as a LoRa® Symbol has been detected.

When SymbNum is different from 0, the modem will wait for a total of SymbNum LoRa® symbol to validate, or not, the correct detection of a LoRa® packet. If the various states of the demodulator are not lock at this moment, the radio will generate the RxTimeout IRQ.

According to my understanding of the above paragraphs, if the radio had been configured with SetLoRaSymbNumTimeout to e.g. 30 symbols timeout and then set into single Rx mode with a timeout of e.g. 1000 ms, then the modem would wait for a total of 30 LoRa symbols (preamble or data symbols). If 30 LoRa symbols had not been detected at the end of the 1000 ms timeout, the radio would stop the Rx mode. If the modem detected 30 LoRa symbols, but had not locked, it would generate the RxTimeout interrupt immediately (without staying in Rx for the rest of the 1000 ms). If the modem detected 30 LoRa symbols and had locked, it would stay in Rx with the timeout of 1000 ms kept running. Then the radio would stop the Rx mode at the end of the 1000 ms timeout unless a header (in LoRa®) had been detected. In case of a valid header detection, it would stop the 1000 ms timeout and receive the complete packet.

Best regards
Roman Jasmann

The explanation given in the datasheet is slightly misleading.

In your case, the chip will wait for the detection of a LoRa symbol during a time equivalent to 30 symbols, starting from the SetRx call. If no symbol is detected, the chip will raise a timeout. If a symbol is detected, the chip will then wait for a LoRa header (or the reception of the whole packet if there is no header) within 1000ms.

The function SetLoRaSymbNumTimeout is particularly useful in synchronized protocols like LoRaWAN class A,when Rx windows are open at a precise time. Since you know exactly when the gateway is supposed to send a packet (if any), there will be LoRa symbols being transmitted. It allows you to be more energy efficient.