dormancy dilemma
Posted: Tue Dec 07, 2021 1:55 am
I'm using an rpi pico with an NB-IoT cell modem https://www.waveshare.com/w/upload/c/c2 ... NB-IoT.pdf The pico-modem interface is simple, just a uart connection for AT cmds & a single gpio line to turn the modem power supply on/off
My initial program worked
Then I tried to get clever by replacing the sleep with dormant https://github.com/ghubcoder/PicoSleepD ... -945177298 for lower power consumption. Now the connect to cell AT cmd fails after the first cycle. This was a big surprise since the pico-to-modem uart comms & gpio pwr on/off line post dormancy behave exactly the same as post sleep.
I finally got it going with a kludgy work around. I've got my 1mA dormancy Vs 18mA sleep but there are 2 things I don't understand, why the AT connect cmd fails after a dormancy & why resetting the pico post dormancy fixes it.
My initial program worked
Code: Select all
while 1:
modem on
check modem is attached to cellular
connect to cellular
upload data
modem off
time.sleep(600)
Then I tried to get clever by replacing the sleep with dormant https://github.com/ghubcoder/PicoSleepD ... -945177298 for lower power consumption. Now the connect to cell AT cmd fails after the first cycle. This was a big surprise since the pico-to-modem uart comms & gpio pwr on/off line post dormancy behave exactly the same as post sleep.
Code: Select all
while 1:
modem on
check modem is attached to cellular
connect to cellular
upload data
modem off
picosleep.seconds(600)
I finally got it going with a kludgy work around. I've got my 1mA dormancy Vs 18mA sleep but there are 2 things I don't understand, why the AT connect cmd fails after a dormancy & why resetting the pico post dormancy fixes it.
Code: Select all
modem on
check modem is attached to cellular
connect to cellular
upload data
modem off
picosleep.seconds(600)
machine.reset()