I am using RAK4631 Arduino version and in LoRaWan setup. I need to put the radio and controller in standby and sleep mode respectively. I want RAK4631 to be in deep-sleep until it receives a packet from TTNv3, after that it needs to do some operation. After the operation is complete i need to put it back to deep sleep.
What LoRaWAN class are you using?
In Class A the transceiver is set to sleep after TC/RX cycle is finished. But in Class C the transceiver stays in RX mode.
This is handled inside the LoRaWAN library.
What code are you using?
In Class C the transceiver stays in RX mode all the time, the LoRa transceiver never goes into sleep or standby mode. This is because the transceiver has to listen all the time if a packet from the LoRaWAN server arrives.
In Class A I get a sleep current of below 300uA (depending on the base board I use)
In Class C I get a current of 5mA between the transmissions with the nRF52 “sleeping”
I am using the code “LoRaWAN_OTAA_TTN_push” given by the RAK WISBLOCK example.
In Class C: Can I put the radio on standby mode to reduce power? I checked the file “sx126x.cpp”, there is an option SX126xSetStandby(STDBY_RC);. When I execute it after reception of a pkt the node current is ~660 uA. However, it fails to receive any further packets.
In Class A: I too get a sleep current of below 300uA after it joins the Gateway. However, the node never goes back to sleep after the first transmission. The correct is ~5mA.
Can you give me a link to that specific example? I do not know an example named LoRaWAN_OTAA_TTN_push.
Most of our examples are kept simple and do not fully support low power
If you put the radio into standby mode, you are breaking the Class C requirements. You would miss downlink messages from the LoRaWAN server. That makes Class C useless.
It would be the same as a Class A device, only the LoRaWAN server doesn’t know that it can send downlinks only after an uplink from the device.
Thanks a lot. I re-ran your code and it is working as you suggested. I commented out this line previously lmh_class_request(CLASS_C);. My mistake and sorry for wasting your precious time.
Can you please suggest one thing? In my application, I need to send data to rak4631 and initiate a process. After the process is over the node will tx results to the gateway. 30-40 sec latency between sending the instruction and initiating the process is fine. If I set my node to
Class C: It is always consuming 5 mA as it is always in Rx mode.
Class A: Set the SLEEP_TIME to 30 sec and after every 30 sec it transmits a blank packet and waits for an Rx packet. The node consumes 1.12 mA (averga).
Is it better to opt for Class A even though it sends a dummy packet to the gateway every SLEEP_TIME?
If you are targeting a battery powered solution, Class A is definitely the solution to choose.
But you have to check for regional limitations, some regions like EU868 have Duty Cycle limitations that might collide with a packet interval of 30 seconds. You might be ok with a 1 byte dummy packet, but I am not sure.
The low-power code was working fine, thanks to your help. However, when I initialize Serial1 (“Serial1.begin(115200);” ), RAK4631 does not go to sleep mode and consumes 1.1 mA current in the sleep period.