Get started with the XBee Smart Modem Development Kit Configure and update your XBee
Digi XBee3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
38
n Each module must be configured to be connected to Remote Manager and to reconnect when
connection is lost. For instructions, see Restore persistent connection to a remote XBee.
n Each module must have visibility to an FTP server hosting the files.
n The machine that will be performing the update must have Python 3.6 or higher installed and
the script must be run using Python 3.
n The script dependencies must be satisfied by running pip install -r
requirements.txt in the directory containing the script. Creating and using a Python
virtual environment with the virtualenv command is recommended as a best practice.
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)
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.
a. Go to the Digi XBee3 Cellular LTE-M support page.
b. Scroll down to the Firmware Updates section.
c. Locate and click u-blox Module Over the Air Update Script to download the zip
file: over-the-air.zip.
d. Unzip the downloaded file.
2. Go to a command line and navigate to the directory containing the script.
3. Run pip install -r requirements.txt in the directory containing the script.
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.