Skip to main content

Sequans Modem

note

For an API reference, see API Reference/Sequans Controller

How to Send AT Commands to the Sequans Modem

The AVR-IoT Cellular Library doesn't expose all the functionality provided by the Seuqans GM02S modem directly. If you'd like to use any other functionality, this can be done with AT commands. The AT command reference with a dedicated pdf document can be found here.

An example of how this is done can be found in the custom_at_commands.ino example sketch.

How to Upgrade the Sequans Modem Firmware

In order to get access to new firmware and the firmware upgrade utility, an account has to be made at Sequans' portal. Remember to use microchip as part of your username/login name or write in the confirmation email that you are using the AVR-IoT Cellular Mini. If not, you might not gain access. Register at cloud.sequans.com. This is a manual process and it might take some days.

Preliminary Steps

  1. The Sequans Firmware Upgrade (SFU) tool has to be downloaded and installed. Navigate to the main page of cloud.sequans.com once you have got an account. On the main page, scroll all the way down to the folders (past the images) and go into the GM02S - Cat M1 - Cat NB1 folder (the one without GNSS).
  2. Go into Tools -> SFU
    • If you are on Windows: right click on the sfu_SFU executable file and download it.
    • If you are on Linux: download SEQUANS_BIN_HOST-LINUX archive, extract it and its subfolders.
  3. Install SFU
    • If you are on Windows: run the executable to install SFU.
    • If you are on Linux: either use the binaries in the bin folder directly (no need for installation) or install the .deb files for your flavour of Debian or Ubuntu: apt-get install ./sequans* from the installers folder.
  4. Connect the AVR-IoT Cellular Mini board. Find which COM port (on windows) or ttyACM port (on linux) the AVR-IoT Cellular Mini is assigned to by using device manager on Windows and looking at PORTS (COM & LPT) or by checking the diagnostic messages on Linux: dmesg | grep tty.

Single Mode to Dual Mode (from LTE-M to NB-IoT + LTE-M)

Pay close attention to the steps ⚠

Only use this method for upgrading from single mode (only LTE-M) to dual mode (LTE-M + NB-IoT). You can check if you are on the dual mode firmware by running the provision.ino example sketch and checking the operating mode. For regular firmware upgrades, see How to Do Regular Firmware Upgrade

Pay close attention to the steps in the firmware upgrade. Failing to do so could render the modem in an irrecoverable state. The firmware upgrade is done at the user's own risk.

  1. Make sure you have done the preliminary steps above.
  2. Download the UART bridge and drag and drop the avr-iot-cellular-mini-bridge.production.hex to the CURIOSITY drive in your file explorer.
  3. Navigate to cloud.sequans.com. On the landing page, scroll all the way down to the folders (past the images) and go into the GM02S - Cat M1 - Cat NB1 folder (the one without GNSS).
  4. Navigate from the modem page to Software -> Dual Mode -> latest version (should be on the form of LR8.2.x.x-xxxxx). Right click on HW rev2 and download the folder.
  5. Extract the downloaded file. A folder named HW rev2 should appear.
  6. Go into the HW rev2 folder and extract the file which has a .img.tgz extension.
  7. Go into the extracted folder and extract the file there with the .img.tar extension. At this point the folder structure should be the following:
HW rev2/
├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx_TO_LR8.2.x.x-xxxxx.dup
├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx.dup.tgz
├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx.img.tgz
├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx.img/
│ ├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx.img.tar
│ ├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx.img/
│ ├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx-cs0.img
├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx.tgz

  1. Next, go back to the top to the HW rev2 folder, extract the file with the .tgz extension (not the .dup.tgz or the already extracted .img.tgz file).
  2. Navigate into the newly extracted folder and extract the GM02RB6Q-DM_LR8.2.x.x-xxxxx.tar archive.
  3. The folder structure should be the following now:
HW rev2/
├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx_TO_LR8.2.x.x-xxxxx.dup
├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx.dup.tgz
├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx.img.tgz
├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx.img/
│ ├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx.img.tar
│ ├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx.img/
│ ├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx-cs0.img <--- WE ARE USING THIS FILE
├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx.tgz
├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx/
│ ├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx.tar
│ ├─ GM02RB6Q-DM_LR8.2.x.x-xxxxx/
│ ├─ SEQUANS-SDK/
│ ├─ platform/
│ ├─ sequans/
│ ├─ gm02rb6q-dm/
│ ├─ mtools/
│ ├─ SQN3430/
│ ├─ mtools.elf <--- WE ARE ALSO USING THIS FILE
│ ├─ mtools.elf.map
│ ├─ mtools.ic
│ ├─ ...
│ ├─ share/

Now it is time to update the modem firmware.

  1. Open up the Sequans SFU application
    • On Windows: search for the application by pressing the Windows key and searching for Sequans SFU.
    • On Linux: Open the sfug application.

Step 11, opening up Sequans SFU

  1. Click on raster and do the following:
    • Select the port for the AVR-IoT Cellular Mini.
    • Navigate to the mtools.elf file for the ffh field (click on the three dots on the right side). Navigate to the cs0.img file for the raster field (click on the three dots on the right side).
    • Navigate to the HW rev2 folder for the backup field.
    • Enable hash and select zcrc32.

Step 12, configuring general pane

  1. Click on UART options and do the following:
    • Enable the baudrate and set the value to 115200.
    • Enable zip and set the value to 2.

Step 13, configuring UART options

  1. Click on restore options and do the following:
    • Enable the keep-all field.

Step 14, configuring restore options

  1. Click execute in the lower right corner. Grab some coffee ☕, this will take some time. Do not disconnect your kit.

  2. After the modem firmware has been upgraded, run the provision.ino example sketch and use the text-based menu system to switch from LTE-M to NB-IoT or vice versa.

Command line instructions (if using the graphical application is not an option) 🐧

These instructions replace step 11 and onwards for the graphical application approach:

  1. Open up your favourite terminal (PowerShell is recommended for Windows).
  2. Navigate to the HW rev2 folder in the terminal.
  3. Run the following command:
    • If you are on Windows: & 'C:\Program Files (x86)\Sequans Communications\SFU\sfu.exe' raster <COM_PORT_YOU_FOUND_IN_STEP_4> <PATH_TO_MTOOLS.ELF> <PATH_TO_CS0.IMG_FILE> . --keep-all -b 115200 -z 2 --hash zcrc32
    • If you are on Linux: ./<PATH_TO_SFU_TOOL> raster /dev/<TTY_ACM_PORT_YOU_FOUND_IN_STEP_4> <PATH_TO_MTOOLS.ELF> <PATH_TO_CS0.IMG_FILE> . --keep-all -b 115200 -z 2 --hash zcrc32
  4. Grab some coffee ☕, this will take some time. Do not disconnect your kit.
  5. After the modem firmware has been upgraded, run the provision.ino example sketch and use the text-based menu system to switch from LTE-M to NB-IoT or vice versa.
Modem settings

The modem settings will be restored to their factory defaults after this upgrade. To provision the standard settings for the AVR-IoT Cellular Mini after the upgrade, download the ioprovision tool and run the following in your terminal of choice: iotprovision-bin -c aws -m sandbox.

How to Do Regular Firmware Upgrade (Using Sequans Firmware Upgrade Tool)

Pay close attention to the steps ⚠

These steps are only from single-mode to single-mode (LTE-M) or dual-mode to dual-mode (LTE-M + NB-IoT to LTE-M + NB-IoT), not single-mode to dual-mode as above.

Pay close attention to the steps in the firmware upgrade. Failing to do so could render the modem in an irrecoverable state. The firmware upgrade is done at the user's own risk.

  1. Make sure you have done the preliminary steps above.
  2. Download the UART bridge and drag and drop the avr-iot-cellular-mini-bridge.production.hex to the CURIOSITY drive in your file explorer.
  3. Navigate to cloud.sequans.com. On the landing page, scroll all the way down to the folders (past the images) and go into the GM02S - Cat M1 - Cat NB1 folder (the one without GNSS).
  4. Navigate from the modem page to Software.
    • For dual mode (LTE-M + NB-IoT) Dual Mode -> latest version (should be on the form of LR8.x.x.x-xxxxx). Right click on HW rev2 and download the folder.
    • For single mode (LTE-M) Single Mode -> latest version (should be on the form of 8.x.x.x). Right click on HW rev2 and download the folder.
  5. Extract the downloaded file. A folder named HW rev2 should appear.
  6. Go into the HW rev2 folder and extract the file which has a .dup.tgz extension.
  7. Go into the extracted folder and extract the file there with the .dup.tar extension. At this point the folder structure should be the following:
HW rev2/
├─ GM02RB6Q-DM_LR8.x.x.x-xxxxx.dup.tgz
├─ GM02RB6Q-DM_LR8.x.x.x-xxxxx.dup/
│ ├─ GM02RB6Q-DM_LR8.x.x.x-xxxxx.dup.tar
│ ├─ GM02RB6Q-DM_LR8.x.x.x-xxxxx.dup/
│ ├─ GM02RB6Q-DM_LR8.x.x.x-xxxxx.dup <--- WE ARE USING THIS FILE
│ ├─ GM02RB6Q-DM_LR8.x.x.x-xxxxx.dup.version
├─ ...

Now it is time to update the modem firmware.

  1. Open up the Sequans SFU application
    • On Windows: search for the application by pressing the Windows key and searching for Sequans SFU.
    • On Linux: Open the sfug application.

Step 8, opening up Sequans SFU

  1. Click on upgrade and do the following:
  • Select the port for the AVR-IoT Cellular Mini.
  • Navigate to the .dup file for the FFF field (click on the three dots on the right side).

Step 9, configuring general pane

  1. Click on FFH options and keep all the items unchecked.

Step 10, configuring FFH options

  1. Click on UART options and do the following:
  • Enable the baudrate and set the value to 115200.
  • Enable zip and set the value to 2.

Step 11, configuring UART options

  1. Click execute in the lower right corner. Grab some coffee ☕, this will take some time. Do not disconnect your kit.
Command line instructions (if using the graphical application is not an option) 🐧

These instructions replace step 8 and onwards for the graphical application approach:

  1. Open up your favourite terminal (PowerShell is recommended for Windows).
  2. Navigate to the HW rev2 folder in the terminal.
  3. Run the following command:
    • If you are on Windows: & 'C:\Program Files (x86)\Sequans Communications\SFU\sfu.exe' upgrade -z 2 -b 115200 <COM_PORT_YOU_FOUND_IN_STEP_4> <PATH_TO_DUP_FILE>
    • If you are on Linux: ./<PATH_TO_SFU_TOOL> upgrade -z 2 -b 115200 /dev/<TTY_ACM_PORT_YOU_FOUND_IN_STEP_4> <PATH_TO_DUP_FILE>
  4. Grab some coffee ☕, this will take some time. Do not disconnect your kit.

How to Do Regular Firmware Upgrade (Using pysequansutils 🐍)

  1. Install pysequansutils with pip: pip install pysequansutils.
  2. Do step 1 to 7 from How to Do Regular Firmware Upgrade (Using Sequans Firmware Upgrade Tool).
  3. Do pysequans upgrade full --firmware <PATH_TO_DUP_FILE>.
  4. Grab some coffee ☕, this will take some time. Do not disconnect your kit.