This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Reset Modem

Hi,

When using CFUN=0, the modem stores settings (such as system mode and successful network connection information) to the flash from what I can gather, but it then needs to be power cycled to function again. How do you go about doing that in the application firmware? Is there a way to manually power the modem off and on?

On the same vein, if the modem becomes unresponsive to AT commands or enters an unknown state, how would you power cycle it to reset it using the application firmware?

Kind regards,

Thomas

Parents
  • Hi Thomas,

    If you turn off the modem (CFUN=0) there is no other way to turn it on other than to do a power cycle.
    You can do this from the application by enabling it from the prj.conf file (or menuconfig ):

    CONFIG_REBOOT=y

    and add #include <misc/reboot.h> in your application where you can call the function:

    sys_reboot(SYS_REBOOT_COLD);

    This will reboot your device and also the modem.

    note: Add a delay after the AT+CFUN=0 so the modem can do a graceful shutdown from the network and store data in the modem flash.

  • Hi Martin, 

    I tried to implement the same functionality, but the system reboot is not carried out. 

    I wanted to let the system reboot when a timer interrupt is called.

    The timer interrupt is triggered and I set CONFIG_REBOOT=y in prj.conf

    But the system is not rebooting it does nothing anymore after sys_reboot();

    Can you help me? 

    Kind regards.

Reply Children
Related