I am working on a low power device and I have noticed that I must wait at least 3 seconds between a successful AT+SEND command and AT+SLEEP, otherwise the sleep will not occur or only be very brief.
Given that the SEND returns OK, it seems like I should be able to sleep straight away. Is there anyway to query the device to make sure it can enter sleep?I have found 3 seconds to work well but that might be because I am testing right next to my gateway. When I deploy this in the field the time required might increase.
The current sent of commands which works well is as follows
The module won’t be able to sleep immediately because it has to open its RF based on the LoRaWAN RX1 and RX2 delay (if working on class A). I am not sure what network server you are using but the standard will allow up to 15seconds RX1 delay (usually this is way less - timeout in TTN V3 is 5 sec) plus the RX2 delay which is 1 second after.
I understand your concern about this that’s why on our next firmware release, we will have the automatic low power mode like the legacy firmware where the module will go back to sleep automatically after execution of commands.
The RAK3172 goes to sleep mode immediately after AT+SEND. It will prepare to get any packets on RX1 and RX2 delays but after than immediately goes to sleep again.
This behavior is consistent to all AT Commands as long as AT+LPM (low power mode) is set to 1. If the value of AT+LPM is 0, the module will not automatically go to sleep and will require AT+SLEEP command.
We have this issue/s before (very early days of RUI3) but this was fixed already long time ago and will not show on latest RUI3 firmware.
I personally do not see this errors now. I haven’t check specifically the fix/patch on code but we have no reports of any missed AT commands in sleep mode.