HE910 Watchdog timer

6 thoughts on “HE910 Watchdog timer

  1. Hello Telit, 

     

    Using AT#ENHRST=1,1 command in a python script as a watchdog timer.

     

    Is it correct solution?

    What are the limitations for using this command ?

     

     Additional question.)

     

    Can it be that module will not accept this command by some reason? 

  2. There are chances that reseting the module so often will upset the network operator.

    Not clear , what you mean by "reseting module so often"….

     

    #ENHRST – "Set command enables/disables the unit reset after  minutes."

     

    This command does not reset anything , it’s just set timer to reset.

     So module will not reset "so often" at least not supposed to.

     

    Maybe it’s not clear .. , I am not using this opertation for restarting module every minute =) It’s used as a watchdog timer.

     

     

     

    1. So your procedure is to send AT#ENHRST=1,1 at intervals no longer than one minute, I understand? Sounds OK then, just take care that some commands can, by default, take longer to return than that and their timeouts must be tweaked.

      1. So your procedure is to send AT#ENHRST=1,1 at intervals no longer than one minute, I understand? Sounds OK then, just take care that some commands can, by default, take longer to return than that and their timeouts must be tweaked.

        I am making reset in this part of code:

         

         

        def resetWatchdog():

            global last_reset_time

            if time.time() – last_reset_time > 10:

                last_reset_time = time.time()

                MDM2.send(‘AT#ENHRST=1,1r’, 10)

                MDM_recieveErrorOk(2)

         

         

        I am wondering if is it possible that time.time() become to count from the 0, so this function will be a reason of module restart.

        Theoretically it’s possible and I need to put here also checking that time.time()>last_reset_time. But can it happen 2-3 time per day ? What value shows time.time() ?