toc LTE Modem Firmware Update more_vert What's in this document more_vert Update Firmware > LTE Modem

LTE Modem Firmware Update

This article is only related to GPy, FiPy, and G01 boards

Note: The LTE modem updater is integrated in the latest stable pybytes-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:

  • LR5.xx is for CAT-M1
  • LR6.xx is for NB-IoT

The firmwares for CAT-M1 and NB-IoT are fundamentally different and cannot be used interchangable. For security reasons, the modem firmware files are password protected. In order to download them, head to https://forum.pycom.io and become a member (if you aren’t already) and go here for the credentials. (On the forum: Announcements & News → Announcements for members only → the Firmware Files) You can find the firmwares listed here.

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:

  1. Flash (slow)
  2. SD card (fastest)
  3. USB (medium)
  4. Wireless (slowest)

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.

Note on Updating to CAT-M1 5.2-48829

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’.

  1. update with CATM1-5.2-48829-1.dup

    For the first update you have to also specify load_fff=False. Using the SD cad method, it would be like 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
    
  2. update with CATM1-5.2-48829-2.dup

    sqnsupgrade.run('/sd/CATM1-5.2-48829-2.dup')
    

    At the end reset the board.

Flash

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.

  1. Copy the firmware update file you want to use in your project folder and click upload to device in the Pymakr plugin. Make sure the first 5 numbers match the current version of your modem firmware. Uploading might take a while because of the large filesize.

    Note: If the firmware does not sync to your device, open the Pymakr 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 pymakr.

  2. After uploading the file, you can run the following commands
    import sqnsupgrade
    sqnsupgrade.run('upgdiff_old-to-new.dup')
    
  3. The update takes about 5 minutes. Note that the update may seem to ‘stall’ around 7-10% and again at 99%. This is completely normal.

    Note: Do not disconnect power to the module during the updating process

  4. The updater will show the new SYSTEM VERSION when it is done, and return control to REPL.

SD Card

  1. Format the SD card using your computer, or the following commands:

    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.

  2. Copy all the files from the .zip archive to the SD card. You can either use the FTP server or insert the SD card in your computer and copy the files through there.

    Note: Do not forget to mount the SD card when re-inserting it.

  3. Once the files are on the SD card, you can flash the LTE modem using one of the following commands:

    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

  4. The command will now make sure the firmware is updated. This takes about 5 minutes. Note that the update may seem to ‘stall’ around 7-10% and again at 99%. This is completely normal.

    Note: Do not disconnect power to the module during the updating process

  5. The updater will show the new SYSTEM VERSION when it is done, and return control to REPL.

USB

If you do not have an SD card available, you can update the firmware over USB. For this you will need to install

  1. On the Pycom module run the following command to allow direct UART communication to the LTE modem:

    import sqnsupgrade
    sqnsupgrade.uart(True)
    
  2. You will see a response similar to this:

    <<< 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
    
  3. Take note of the Serial port used and close the REPL.

  4. On the computer go to the directory where you saved the sqnsupgrade script and run the following commands in the command line / terminal. Replace the paths and name.dup with the actual files.

    $ 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.

  5. The update is now running. Note that the update may seem to ‘stall’ around 7-10% and again at 99%. This is completely normal.

    Note: Do not disconnect power to the module during the updating process

  6. The updater will show SYSTEM VERSION when it is done, and return control to REPL.

Wireless

To update the modem firmware wirelessly, you can follow the Flash guide. Upload the files through the FTP Server and communicate throught Telnet, or use Pybytes Pymakr

 

Previous Next