Update an XBee module cellular component using FOTA

You can update an XBee 3 Cellular LTE-M/NB-IoT module from A2.00 or A2.01 to L0.00.00.05.08,A.02.04 (maintenance release) using FOTA and the script described in this section.

Prerequisites

Script usage

The arguments and default values for the script are shown below. By default, Digi hosts the update files on a public FTP server and the script attempts to apply the appropriate update files based on intelligence built into the script. The optional arguments should only rarely need to be changed and generally only if the Digi FTP server is not accessible on a private APN, or by direction of Digi Technical Support.

usage: fota.py [-h] [--type {auto,es2,ip}] [--ftp_server FTP_SERVER]
[--ftp_port FTP_PORT] [--ftp_user FTP_USER]
[--ftp_password FTP_PASSWORD] [--ftp_basedir FTP_BASEDIR] <IMEI> [<IMEI> ...]
Perform Over The Air Firmware update (FOTA) on XBee Cellular LTE-M/NB-IoT
positional arguments:
<IMEI> IMEI of device on which to perform update.
optional arguments:
-h, --help show this help message and exit
--type {auto,es2,ip} Type of modules (default: auto)
--ftp_server FTP_SERVER
FTP server (default: ftp1.digi.com)
--ftp_port FTP_PORT FTP port (default: 21)
--ftp_user FTP_USER FTP username (default: anonymous)
--ftp_password FTP_PASSWORD
FTP password (default: fota@digi.com)
--ftp_basedir FTP_BASEDIR
FTP base directory (default: /support/ublox) Script version: 2.0

Run the update script

The IMEI values for the modules you want to update are entered as arguments when you run the script. See Script usage for information about the arguments.

  1. Download the script.
    1. Go to the Digi XBee 3 Cellular LTE-M support page.
    2. Scroll down to the Firmware Updates section.
    3. Locate and click u-blox Module Over the Air Update Script to download the zip file: over-the-air.zip.
    4. Unzip the downloaded file.
  2. Go to a command line and navigate to the directory containing the script.
  3. Run pip install --user -r requirements.txt in the directory containing the script.

    Note If using virtualenv, run pip install -r requirements.txt instead.

  4. Run the script. Type: python fota.py <arguments>

    where <arguments> includes the IMEIs and any optional parameters needed for the environment. For more information, see Script usage.

  5. Press Enter. You will be prompted for your Remote Manager user name and password.
  6. After you have entered the user name and password, the script connects to Remote Manager. For each device listed as an argument in the command line, the script performs the following items:
    • Verifies connectivity to Remote Manager and the module configuration.
    • Applies a sequence of updates to the module that are needed to perform the update.
    • Verifies the final cellular component version.
  7. When complete, a CSV is generated and named using this format: results-<timestamp>.csv, where <timestamp> is the time of the run. The file lists each IMEI, whether the update for that IMEI was successful, and any error message if the update failed.
  8. A successful update appears as:
SUCCESS updating 352753090812345090861053
  1. If the update was not successful, try the update again with this flag: --type=ip
  2. If the update was still not successful, submit a support case.