Unable to update GPy modem firmware
-
@combaindeft Yup. Documentation is wrong. Ill get it updated to clarify.
-
Hmmm, says the opposite on your docu - https://docs.pycom.io/tutorials/lte/firmware.html ...
Important: When upgrading your modem for the first time, even if you have updated it in the past with the old firmware update method, you MUST use the "recovery" upgrade method described below. Otherwise you will risk breaking your module.
Please also use the file upgdiff_33080-to-39529.dup (1.2M) from the archive.
import sqnsupgrade sqnsupgrade.run('upgdiff_33080-to-39529.dup', 'updater.elf')
and then it says, you must run it a 2nd time ...
sqnsupgrade.run('NB1-40343.dup', debug=True)
... and this is the the 1st time you ever update the modem firmware ...
-
sqnsupgrade.run('upgdiff_33080-to-40343.dup', 'updater.elf', debug=True)
Diff's dont need the updater.elf param so its just
sqnsupgrade.run('upgdiff_33080-to-40343.dup', debug=True)
The full upgrade does how ever need it:
sqnsupgrade.run('NB1-40343.dup', 'updater.elf', debug=True)
Ill ask someone more qualified than me to look into this as the process @ktleh took should have worked.
>>> from machine import SD >>> sd = SD() >>> os.mount(sd, '/sd') >>> os.listdir('/sd') ['CATM1-38638.dup', 'updater.elf'] >>> import sqnsupgrade >>> sqnsupgrade.run('/sd/CATM1-38638.dup', '/sd/updater.elf')
should have run just fine.
-
Hi guys,
We bought a bunch of FiPy's ... and one one of them, had the same issue.
lte.reset() lte.disconnect() lte.dettach()
Do the PyCom-thingie (detach Lipo batter, unplugg usb ... ergo HARD Reset, not soft or button ...)
pycom.lte_modem_en_on_boot(0)
Last but not least, comes the little-bit-unsure ... as I trued 1st
sqnsupgrade.run('upgdiff_33080-to-40343.dup', 'updater.elf', debug=True)
as it's a new board we are updating all the firmware on
but that didn't work, so I just ran
sqnsupgrade.run('NB1-40343.dup', debug=True)
I'm going out on a limb, and guessing, that maybe in the factory when they test all the boards before shipping ... somehow ... maybe it happened that they forgot to "reset", "discennect" and "dettach" it from the LTE Base station ... and the modem thinks it's still in use ... ergo, the updater won't work ... as it modem is "enabled" ...
-
@bqpd Hi yes.
I Agree the docs around modem firmware updates are indeed misleading. a rewrite of them is high on my todo list.
thanks for trying it without the updater.elf.
-
thanks for the quick response and info!
The related code example in the documentation at https://docs.pycom.io/tutorials/lte/firmware.html is a bit misleading then, as you already stated.
It says right on top in the red warning box:Important: When upgrading your modem for the first time, even if you have updated it in the past with the old firmware update method, you MUST use the "recovery" upgrade method described below. Otherwise you will risk breaking your module.
Please also use the file upgdiff_33080-to-39529.dup (1.2M) from the archive.import sqnsupgrade sqnsupgrade.run('upgdiff_33080-to-39529.dup', 'updater.elf')
Sadly for me, the update still wont work, even if i leave out the 'updater.elf' file parameter.
I get the following output after about 10 minutes of processing:>>> os.listdir('/sd') ['NB1-40343.dup', 'updater.elf', 'upgdiff_33080-to-40343.dup', 'upgdiff_38729-to-40343.dup'] >>> import sqnsupgrade >>> sqnsupgrade.run('/sd/upgdiff_33080-to-40343.dup') <<< Welcome to the SQN3330 firmware updater [1.2.1] >>> >>> FiPy with firmware version 1.18.1.r7 Attempting AT wakeup... Session opened: version 1, max transfer 8192 bytes Sending 2280296 bytes: [ ] 0%SRSP header too small: 0 Code download failed, aborting! >>> sqnsupgrade.info(True) <<< Welcome to the SQN3330 firmware updater [1.2.1] >>> >>> FiPy with firmware version 1.18.1.r7 Trying to detect modem state [1/5] Your modem is in application mode. Here is the current version: SYSTEM VERSION ============== FIRMWARE VERSION Bootloader0* : 5.1.1.0 [33080] Bootloader1 : NA Bootloader2 : NA NV Info : 1.1,0,0 Software : 5.1.1.0 [33080] by robot-soft at 2017-10-27 07:49:11 UE : Unknown COMPONENTS ZSP0 : 1.0.98-12323 ZSP1 : 1.0.98-12295 LTE autostart disabled.
I am seeing that this seems to be a known issue (https://github.com/pycom/pycom-libraries/issues/81)
Maybe a little info about my system may help: i use Windows 7 using VisualStudio Code (alternatively i could try Linux Mint using Atom, but so far i had no reason to believe, that this is an OS related problem)
The FiPy is powered over a PySense Board with updated Firmware and the FiPy is connected to my local WLAN network and i use this connection to interface and programm the board.
I use a small 2GB Fat32 SD card from SanDisk. Seeing that theos.listdir('/sd')
command worked well, i don't think that the SD card is an issue either. I also tested writing to and reading from the SD card, which was working absolutely fine.Thanks for any help so far!
-
@bqpd I've pointed the relevant engineer at this thread and can confirm they are looking into it. One thing they did mention I should clear up.
If your doing a "diff upgrade" and using the diff files. You do NOT need to provide the path to a relevant updater.elf as a second param to the sqnsupgrade.run() call.
-
First of all thanks a lot for your reply and help!
I tried to follow the steps @rskoniec suggested, sadly without any results. I try to share my output, maybe it helps @Paul-Thornton recreating the Error
First of all i set
pycom.lte_modem_en_on_boot(0)
because it was initially set totrue
After a replug i tried your steps on 3 different versions of the fipy Firmware (FiPy 1.18.1.r1, FiPy 1.18.1.r4 and the new stable release FiPy 1.18.1.r7)
All giving me similar results:When i create an LTE Object first, send some test commands and then
lte.deinit()
this object before attempting to upgrade the Sequans Firmware (using the differential upgradesqnsupgrade.run('/sd/upgdiff_33080-to-39529.dup', '/sd/updater.elf')
), the upgrade process doesn't even reach the AT Wakeup stageFiPy 1.18.1.r1
>>> sqnsupgrade.run('/sd/CATM1-39529.dup', '/sd/updater.elf') <<< Welcome to the SQN3330 firmware updater >>> Attempting AT wakeup... Unable to upgrade bootrom. Unable to load updater from /sd/updater.elf
FiPy 1.18.1.r4
>>> sqnsupgrade.run('/sd/upgdiff_33080-to-39529.dup', '/sd/updater.elf') <<< Welcome to the SQN3330 firmware updater [1.2.0] >>> >>> FiPy with firmware version 1.18.1.r4 Could not detect your modem! Please try to power off your device and restart in safeboot mode.
FiPy 1.18.1.r7
>>> sqnsupgrade.run('/sd/upgdiff_33080-to-39529.dup', '/sd/updater.elf') <<< Welcome to the SQN3330 firmware updater [1.2.1] >>> >>> FiPy with firmware version 1.18.1.r7 Could not detect your modem! Please try to power off your device and restart in safeboot mode.
If i replug the device and start the upgrade process without creating an
lte = LTE()
Object first OR if i create an LTE Object but dontlte.deinit()
it, then i get the following results:FiPy 1.18.1.r1
>>> sqnsupgrade.run('/sd/upgdiff_33080-to-39529.dup', '/sd/updater.elf') <<< Welcome to the SQN3330 firmware updater >>> Attempting AT wakeup... Starting STP (DO NOT DISCONNECT POWER!!!) Session opened: version 1, max transfer 8192 bytes Sending 54854 bytes: [########################################] 100%Sending 54854 bytes: [########################### ] 67% Bootrom updated successfully, switching to upgrade mode Attempting AT auto-negotiation...
the device is then getting stuck in AT auto-negotiation, failing after a few minutes
ERROR sending AT command... no response? b''
FiPy 1.18.1.r4
>>> sqnsupgrade.run('/sd/upgdiff_33080-to-39529.dup', '/sd/updater.elf') <<< Welcome to the SQN3330 firmware updater [1.2.0] >>> >>> FiPy with firmware version 1.18.1.r4 Attempting AT wakeup... Session opened: version 1, max transfer 8192 bytes Sending 55498 bytes: [########################################] 100% Received ERROR from AT+SMSWBOOT=0,1! Aborting! Unable to upgrade bootrom. Unable to load updater from /sd/updater.elf
FiPy 1.18.1.r7
>>> sqnsupgrade.run('/sd/upgdiff_33080-to-39529.dup', '/sd/updater.elf') <<< Welcome to the SQN3330 firmware updater [1.2.1] >>> >>> FiPy with firmware version 1.18.1.r7 Attempting AT wakeup... Session opened: version 1, max transfer 8192 bytes Sending 54854 bytes: [########################################] 100% Received ERROR from AT+SMSWBOOT=0,0! Aborting! Unable to upgrade bootrom. Unable to load updater from /sd/updater.elf
So basically Version FiPy 1.18.1.r7 and FiPy 1.18.1.r4 are giving me two different ERROR logs:
Received ERROR from AT+SMSWBOOT=0,0! Aborting!
andReceived ERROR from AT+SMSWBOOT=0,1! Aborting!
However the LTE Modem is still working and responding:
>>> from network import LTE >>> lte = LTE() >>> lte.send_at_cmd('AT') # few AT commands to check if modem is alive and responsive '\r\nOK\r\n' >>> lte.send_at_cmd('ATI') '\r\nSEQUANS Communications\r\nVZM20Q\r\nUEUnknown\r\n\r\nOK\r\n' >>> lte.send_at_cmd('ATZ') '\r\nOK\r\n'
During the whole process, i got an antenna attached and a SIM card inserted.
-
Hey sure, The difference in scripts is intended and not the cause of the issues. :)
-
@paul-thornton Btw, could you comment my observation about
updater.elf
file size in thread https://forum.pycom.io/topic/3995/fipy-firmware-upgrade-failed-cat-m1/26What I've noticed is that updater.elf file in the previous CAT-M1/NB1 releases is the same and with a size of aprox. 300KB, but for the latest they are different for CAT-M1 (420KB) and NB1 (364KB).
-
Hi,
We are currently looking into this and trying to reproduce it internally. One thing I should point out that the docs dont make clear yet (a rewrite is coming that should make things much clearer).
Is that if there's a diff upgrade available from your current firmware to the latest you should use that and not the full firmware update.
-
@ktleh, @wtrocel, @bqpd Can you try this procedure (worked on FiPy 1.18.1.r1 with similar problem, so maybe it would be helpful to downgrade your GPy from r4 -> r1 before you'll take next steps):
- Check settings with these REPL commands:
import pycom pycom.lte_modem_en_on_boot() # to check, should be False pycom.lte_modem_en_on_boot(0) #set to False if above command is True pycom.lte_modem_en_on_boot() # to check again if change was made
- Fresh "cable" power on - replug (not button/software reset).
- Use these REPL commands:
from network import LTE lte = LTE() lte.send_at_cmd('AT') # few AT commands to check if modem is alive and responsive lte.send_at_cmd('ATI') lte.send_at_cmd('ATZ') lte.deinit() # I suspect that this is/was the clue to resolve the upgrade issue
- Normal modem REPL upgrade procedure:
from machine import SD sd = SD() os.mount(sd, '/sd') os.listdir('/sd') ['CATM1-38638.dup', 'updater.elf'] import sqnsupgrade sqnsupgrade.run('/sd/CATM1-38638.dup', '/sd/updater.elf')
-
I got the same problems on the FiPy as well,
I tried it using an older firmware on my FiPy (1.18.1.r1), giving me an error after a few minutes
AT auto-negotiation failed! Exiting.
and with the newest firmware version on the FiPy (v1.18.1.r4) i got the results as cited down below.
I also tried, as recommended in another post to downgrade my firmware again. Sadly without any results.
(https://forum.pycom.io/topic/3995/fipy-firmware-upgrade-failed-cat-m1/26)Going back to the newest firmware, I tried updating the firmware of the Sequans LTE modem using "upgdiff_33080-to-40343.dup" as well as "NB1-40343.dup" for the NB-IoT upgrade using the "updater.elf" file from the NB-IoT folder.
I then tried to update the module, using "CATM1-39529.dup" and "upgdiff_33080-to-39529.dup" using the "updater.elf" file from the CATM1 folder.Neither of them worked, what lead me to the conclusion, that the problem is probably situated within the "updater.elf" file or the fact, that i use the recovery mode for updating.
sqnsupgrade.run('/sd/upgdiff_33080-to-40343.dup', '/sd/updater.elf', debug=True)
<<< Welcome to the SQN3330 firmware updater [1.2.0] >>> >>> FiPy with firmware version 1.18.1.r4 ile /sd/updater.elf has size 372163 File /sd/upgdiff_33080-to-40343.dup has size 2280296 Modem state: 2 Checking bootrom & application Checking line Checking line SYSTEM VERSION Checking line ============== Checking line FIRMWARE VERSION Checking line Bootloader0* : 5.1.1.0 [33080] old_br: True Checking line Bootloader1 : NA Checking line Bootloader2 : NA Checking line NV Info : 1.1,0,0 Checking line Software : 5.1.1.0 [33080] by robot-soft at 2017-10-27 07:49:11 old_sw: True Checking line UE : Unknown Checking line COMPONENTS Checking line ZSP0 : 1.0.98-12323 Checking line ZSP1 : 1.0.98-12295 Checking line Checking line OK Checking line Returning: True mirror? False recover? False resume? False direct? False atneg_only? False bootrom? True load_fff? False Initial prepartion complete... Loading built-in recovery bootrom... Attempting AT wakeup... b'\r\nOK\r\n' Entering upgrade mode... AT+SMOD? returned 2 AT+SMSWBOOT=3,1 returned: b'\r\nOK\r\n' Response after reset: b'\r\nERROR\r\n' Starting STP <<<=== DO NOT DISCONNECT POWER ===>>> Sending AT+SMSTPU="ON_THE_FLY" Starting STP code upload magic=0x74736166, op=0x80, sid=0x0, plen=0x0, tid=0x0, hcrc=0x0, pcrc=0x0 Correct SRSP signature: 0x74736166 Session opened: version 1, max transfer 8192 bytes Sending 55498 bytes: [########################################] 100%Sending 55498 bytes: [###################### ] 55% Bootrom updated successfully, switching to recovery mode AT+SMSWBOOT=0,1 returned b'\r\nERROR\r\n' Received ERROR from AT+SMSWBOOT=0,1! Aborting! Success1? False Unable to upgrade bootrom. Success2? False Unable to load updater from /sd/updater.elf
I am now unsure, whether or not i should try the upgrade process without using the recovery process.
sqnsupgrade.run('/sd/CATM1-38638.dup')
Does anybody know, what the worst case scenario would be? The documentation (https://docs.pycom.io/tutorials/lte/firmware.html) tells me the following:
Important: When upgrading your modem for the first time, even if you have updated it in the past with the old firmware update method, you MUST use the "recovery" upgrade method described below. Otherwise you will risk breaking your module.
But seeing the recovery mode failing for me, i don't quite see what other choice i have.
Thanks in advance for any hints.
-
@ktleh said in Unable to update GPy modem firmware:
lte.send_at_cmd('AT!="showCaps"')
Hi there..
I am having exactly the same problem, did you managed to fix this issue?