Rak 5010 Wakeup not working

Issue: Hardware/Software

Setup:

Details: Hey guys so I was trying to write a command in my at.c file and I was trying to make the device sleep and then wake up but everytime I try to do this the device is able to sleep successfully sleep however during the wake up the LED light flash once and then no longer flash and the rest of the code doesn’t get executed. I tried to execute the at+set_config=device:sleep:1 and then at+set_config=device:sleep:0 commands to sleep and then wake up, even this case during the wake up the LEDs flash once and then stop flashing. I even tried to check if the code after my new at command was correct, hence I commented out the sleep and wake up commands and then re-ran the code and found that my code worked perfectly. Thats why I think something is wrong.

Hi,
Could you try to use a timer callback to run your task? And then put the API rui_device_sleep(0) at the begin and rui_device_sleep(1) at the end?

Thank you!! @nero Sorry I am kind of new to programming with rui api’s could you tell me what timer callback api’s should I use and how should I use them like what parameters and all.

You can refer to this example:

Hey @nero I actually had a similar question based on this. Actually I wanted to know how does rui_device_sleep(1) actually work and how does the board wake up when we put the command rui_device_sleep(0) for wake up right after that?

Hi, you can refer to the app_task.c. Though it works by AT command, it is still included in the firmware.

So @nero does that mean the board is not completely sleeping when we do rui_device_sleep(1)?

Define levels of sleep = even simple microcontrollers can have four levels from “interrupts + RTC counter” through to “require soft-reset”.