This article is only related to GPy, FiPy, and G01 boards
Note: The LTE modem updater is integrated in the latest stable SG-firmware release, make sure you update your device firmware first here
Before updating the modem firmware, check the current modem firmware version using:
import sqnsupgrade sqnsupgrade.info()
The bottom two lines explain the LTE firmware edition:
The firmwares for CAT-M1 and NB-IoT are fundamentally different and cannot be used interchangeable.
For security reasons, the modem firmware files are password protected. In order to download them,
If you currently have CAT-M1 firmware 33080, then make sure to update to 41065, before you go to any other version such as 48829!
Our newest products ship with the modem firmware version CAT-M1 5.4.1.0-50523. At the moment it is not possible to update the modem to that version.
There are several different ways to update the firmware of the LTE modem:
In case of any failure or interruption to the process of LTE modem upgrade you can repeat the same steps after power cycling to the board (i.e disconnecting and reconnecting power). Just pressing the reset button is not enough.
This update has to be done in two steps and is a full upgrade, meaning you can only use the steps for ‘SD Card’ or ‘USB’.
CATM1-5.2-48829-1.dup
load_fff=False
sqnsupgrade.run('/sd/CATM1-5.2-48829-1.dup', load_fff=False) wait until the LTE modem resets and prints out something similar to this:
sqnsupgrade.run('/sd/CATM1-5.2-48829-1.dup', load_fff=False)
wait until the LTE modem resets and prints out something similar to this:
Resetting............ Your modem has been successfully updated. Here is the current firmware version: UE5.0.0.0d LR5.1.1.0-39529 IMEI: xyz
CATM1-5.2-48829-2.dup
sqnsupgrade.run('/sd/CATM1-5.2-48829-2.dup') At the end reset the board.
sqnsupgrade.run('/sd/CATM1-5.2-48829-2.dup')
At the end reset the board.
Note: For Flash updates, we currently only support the use of upgdiff- files. If there is no upgdiff- file for your version available, try to use another method.
upload to device
Note: If the firmware does not sync to your device, open the CtrlR settings → project settings and add "dup" to the entry "sync_file_types". This will create a pymakr.conf file in your project and allow you to sync .dup files to the device using CtrlR.
"dup"
"sync_file_types"
pymakr.conf
.dup
import sqnsupgrade sqnsupgrade.run('upgdiff_old-to-new.dup')
Note: Do not disconnect power to the module during the updating process
SYSTEM VERSION
from machine import SD import os sd = SD() os.mount(sd, '/sd') # mount it os.fsformat('/sd') # format SD card fs = os.mkfat(sd) print(os.listdir('/sd')) # list its content
The last command should return an empty list.
.zip
Note: Do not forget to mount the SD card when re-inserting it.
import sqnsupgrade sqnsupgrade.run('/sd/upgdiff_old-to-new.dup') # if no upgdiff is available, run the following instead # sqnsupgrade.run('/sd/name.dup') # WARNING! If you are updating from version 33080, use the updater.elf file as well, this is not needed for the upgdiff file. # sqnsupgrade.run('/sd/name.dup', '/sd/updater.elf')
Note: Replace name.dup or upgdiff_old-to-new.dup with the actual filename. There are different versions for CAT-M1 and NB-IoT
name.dup
upgdiff_old-to-new.dup
CAT-M1
NB-IoT
If you do not have an SD card available, you can update the firmware over USB. For this you will need to install
import sqnsupgrade sqnsupgrade.uart(True)
<<< Welcome to the SQN3330 firmware updater [1.2.6] >>> >>> GPy with firmware version 1.20.3.b2 Preparing modem for upgrade... FFH mode is not necessary... ignoring! Do not specify updater.elf when updating! Attempting AT wakeup... Going into MIRROR mode... please close this terminal to resume the upgrade via UART
sqnsupgrade
$ python3 >>> import sqnsupgrade >>> sqnsupgrade.run('Serial_Port', '/path/to/upgdiff_old-to-new.dup') # If no upgdiff file is available, use the following # >>> sqnsupgrade.run('Serial_Port', '/path/to/name.dup') # WARNING! If you are updating from version 33080, use the updater.elf file as well, this is not needed for the upgdiff file # >>> sqnsupgrade.run('Serial_Port', '/path/to/name.dup', '/path/to/updater.elf')
If the updater script is stuck at Attempting AT wakeup... [921600], try again after setting import pycom; pycom.lte_modem_en_on_boot(True), and reboot after setting the flag.
Attempting AT wakeup... [921600]
import pycom; pycom.lte_modem_en_on_boot(True)
To update the modem firmware wirelessly, you can follow the Flash guide. Upload the files through the FTP Server and communicate through Telnet, or use Ctrl.