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 ?
Can it be that module will not accept this command by some reason?
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.
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:
if time.time() – last_reset_time > 10:
last_reset_time = time.time()
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() ?
Hit enter to search or ESC to close
Knowledge Base & Download Zone