Second board based on
RAK19007 ( WisBlock Base Board 2nd Gen)
RAK11200 (WisCore ESP32)
RAK13300/EU868 (LPWAN module)
RAK1921 (OLED display)
RAK12500 ( GNSS Location Sensor Module)
I setup a very simple test using OOB examples for each board, i.e.
For board 1:
For board 2:
Using this, I can receive one message on board 2, to be precise only the first message right after rebooting the board. All the rest are never received (get the rxtimeout)
Difficult to say, the examples are quite old and originally designed to work between two identical Core modules.
Can you share the log output of the transmitter as well?
Hi Bernd,
Thanks a lot for your help. I reviewed the code example you pointed to.
It caught my attention that in the example I use, radio reception timeout is set to RX_TIMEOUT_VALUE (3000): Radio.Rx(RX_TIMEOUT_VALUE);
while in the code you provided is set to 0 (“continuous” according to the function doc): Radio.Rx(0);
I changed all occurrences in the example code I’m using to Radio.Rx(0) and now I receive messages all the time. In any case, I’ll try the code you provided.
Thanks again,
Jaime
Setting a timeout for RX is only required for power savings. E.g. in case you don’t need to listen all the time, you can use the RX timeout to listen only for a specific time. This could be that after sending a packet the device expects a response from the other node. If the response doesn’t come within the time-out the device could repeat sending its packet.
But in this examples, the RX can be kept active all the time. While transmitting a packet, the LoRa transceiver will switch its mode. After TX finished, the RX is enabled again.
Thanks Bernd,
In my case the idea is that the RAK11200 (powered by mains) will act as “base station” receiving data from several RAK4631 (running on batteries) acting as “mobile clients”. Most of the time communication will be unidirectional from the mobile clients to the base station (the idea is not to implement an “ACK”). In that scenario, I understand that Radio.Rx(0) for the base station is the best approach.
What I still don’t understand in the “old” example is that, when any event happens (OnRxDone, OnRxError, OnRxTimeout), the associated function handling the event ends up calling Radio.Rx(RX_TIMEOUT_VALUE), for example:
My understanding of this code was that when a timeout event happens, the device is set again in Rx mode for another RX_TIMEOUT_VALUE ms, so actually it should not miss any message (it would be a kind of “continuous” reception mode with the exception of these timeout events). However, based on the observed behavior, that is not the case.
It would be nice to understand the exact behavior.
If you use Radio.Rx() with a timeout value you have to restart RX every time after an event.
On any radio event the LoRa Transceiver will be set to sleep.