RAK4631 deep sleep without Lorawan

I have been using many variations of the Lorawan Deep Sleep example sucessfully and get the sleep and get expected currents using my PPK2.

I wanted to try a deep sleep app that didnt use any lorawan (or BLE).

Starting with the original arduino example, i striped out all the code for LORAWAN.
I add the timer period setup/start, that was originally at the end of lorawan_has_joined_handler(void), to the end of of the setup() method.
I added code to blink the green led in the timer event section of the loop.
Code works as expected.

Sleep current of the original lorawan example was 35uA.
Sleep current with no Lorawan, no other devices conected to the 19007 base, is 1.5mA!

I suspect the LORAWAN radio is still in some idle mode.
I cant see any code in the original example that specifically sleep the radio.

If not using either the BLE or LORA, is there a way to sleep them?

files
RAK4631_DeepSleep_Generic.ino (3.6 KB)
main.h (508 Bytes)

Hello John,

You are correct, without initialization, the SX1262 is in idle mode and not in sleep mode.

Just initialize the SX1262 and force it to sleep with

lora_rak4630_init();
Radio.Sleep();

That worked great! sleep dropped to 13uA.

If i initialize the BLE radio during a wake cycle, how do i put it to sleep when done with it?

In the LORAWAN Deep Sleep example, where is Radio.Sleep() called?
If the Radio.Sleep() is used, what is need to wake it up again? Does it need to be reintialized?

Basically just stop advertising

Bluefruit.Advertising.stop();

Not sure if you can disconnect a connected device (phone) from the application itself.

The Bluefruit library has no end() function as far as I know.

Calling Radio.Sleep() is only needed when you do not want to use the LoRa transceiver.

If you setup the module in LoRaWAN mode with lmh_init(), the LoRaWAN handler will put the transceiver into sleep mode whenever possible.

If you want to use the module in LoRa P2P mode, you can use Radio.Sleep() whenever you want. A Radio.TX or Radio.RX will wake up the transceiver.

ok thank you for the info.