Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

"Cannot determine modem state" after firmware upgrade #599

Open
JolonB opened this issue Jun 4, 2022 · 0 comments
Open

"Cannot determine modem state" after firmware upgrade #599

JolonB opened this issue Jun 4, 2022 · 0 comments

Comments

@JolonB
Copy link

JolonB commented Jun 4, 2022

  • FiPy
  • (sysname='FiPy', nodename='FiPy', release='1.20.1.r2', version='v1.11-06dfad0 on 2019-11-30', machine='FiPy with ESP32', lorawan='1.0.2', sigfox='1.0.1', pybytes='1.3.0')

This issue occurred when I attempted to update the LTE modem firmware using the SD card method.
I was attempting to change the firmware to NB-IoT and then realised that I actually needed Cat-M1 and tried to change back.

The exact steps I performed are as follows.
Note that all firmware versions were downloaded from the official pycom download page.
I used NB1-41019 and CATM1-5.2-48829 for the following commands.

Changing to NB-IoT firmware

>>> import sqnsupgrade
>>> sqnsupgrade.info()
[...]
UE5.0.0.0d                                                               
LR5.1.1.0-46470 
[...]
>>> from machine import SD; import os
>>> sd = SD()
>>> os.mount(sd, '/sd')
>>> sqnsupgrade.run('/sd/NB1-41019.dup')
<<< Welcome to the SQN3330 firmware updater [1.2.6] >>>
>>> FiPy with firmware version 1.20.1.r2
Firmware file is too big to load via FFF method. Using ON_THE_FLY
Attempting AT wakeup...
Session opened: version 1, max transfer 8192 bytes
Sending 5835531 bytes: [########################################] 100%
Waiting for modem to finish the update...
<<<=== DO NOT DISCONNECT POWER ===>>>
Resetting................................
Your modem has been successfully updated.
Here is the current firmware version:

UE6.0.0.0
LR6.0.0.0-41019

IMEI: [...]
True

This upgrade appeared to work.
I only tried running lte.send_at_cmd("AT+SQNCTM=?") and got a valid output.

After this, I realised that I actually did need Cat-M1, so went to switch back:

>>> from machine import SD; import os
>>> sd = SD()
>>> os.mount(sd, '/sd')
>>> sqnsupgrade.run('/sd/CATM1-5.2-48829-1.dup', load_fff=False) # as instructed to do so here: https://docs.pycom.io/updatefirmware/ltemodem/
<<< Welcome to the SQN3330 firmware updater [1.2.6] >>>
>>> FiPy with firmware version 1.20.1.r2
Attempting AT wakeup...
Session opened: version 1, max transfer 8192 bytes
Sending 416448 bytes: [########################################] 100%
Waiting for modem to finish the update...
<<<=== DO NOT DISCONNECT POWER ===>>>
Resetting.........................................................................................
..................................................................................................
..................................................................................................
...............................................................................................Tra
ceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "sqnsupgrade.py", line 1018, in run
  File "sqnsupgrade.py", line 905, in upgrade
  File "sqnsupgrade.py", line 725, in __run
  File "sqnsupgrade.py", line 150, in wait_for_modem
OSError: Timeout waiting for modem to respond!

At no point did the FiPy lose power.
I didn't even touch the FiPy during this process.
After this, it is no longer possible to communicate with the modem:

>>> import sqnsupgrade
>>> sqnsupgrade.info(debug=True)
<<< Welcome to the SQN3330 firmware updater [1.2.6] >>>
>>> FiPy with firmware version 1.20.1.r2
The current delay is 1000
Response (+++ #1): b'\x00\x00'
Response (AT #1) None
Response (AT #3) b'\x80\x00'
Response (AT #4) None
Response (AT #1 @ 115200) b'\xc1'
Response (AT #2 @ 115200) None
The current delay is 2000
Response (+++ #1): b'\xc0\x00'
Response (AT #1) None
Response (AT #3) b'\x00\x00'
Response (AT #4) b'\x00\x00'
Response (AT #1 @ 115200) b'\xf0'
Response (AT #2 @ 115200) b'\xc1'
The current delay is 3000
Response (+++ #1): None
Response (AT #1) b'\xfe\x00'
Response (AT #2) None
Response (+++ #2): None
Response (AT #3) b'\x00\x00\xf0\x00'
Response (AT #4) b'\x80\x00'
Response (AT #1 @ 115200) b'\xe1\xe0'
Response (AT #2 @ 115200) b'\xe0'
The current delay is 4000
Response (+++ #1): b'\x00'
Response (AT #1) None
Response (AT #3) b'\x00\x00\x00'
Response (AT #4) b'\x00\x00\x00\x00'
Response (AT #1 @ 115200) b'\xe0\xc1'
Response (AT #2 @ 115200) b'\xc5\xc1'
The current delay is 5000
Response (+++ #1): None
Response (AT #1) b'\x00\x00'
Response (AT #2) None
Response (+++ #2): None
Response (AT #3) b'\x80\x00\x00\x00\x00'
Response (AT #4) b'\x00\x00\x00'
Response (AT #1 @ 115200) b'\xc1\xe1\xc1'
Response (AT #2 @ 115200) b'\xf0\xc1'
Modem state: None
Cannot determine modem state!
>>> from network import LTE
>>> lte = LTE
>>> lte = LTE()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: Couldn't connect to Modem!

>>> # Attempting to do a USB upgrade instead
>>> sqnsupgrade.uart(True)
<<< Welcome to the SQN3330 firmware updater [1.2.6] >>>
>>> FiPy with firmware version 1.20.1.r2
Could not detect your modem!
Please try to power off your device and restart in safeboot mode.
Preparing modem for upgrade...
FFH mode is not necessary... ignoring!
Do not specify updater.elf when updating!
Attempting AT wakeup...

What went wrong here?
Is it possible to recover my modem?

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant