EasyManuals Logo

Digi XBee3 XB3M1 User Manual

Digi XBee3 XB3M1
252 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #92 background imageLoading...
Page #92 background image
Get started with Digi Remote Manager Manage data in Remote Manager
Digi XBee3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
92
fw_file = open(firmware_path, 'rb')
fw_data = fw_file.read()
fw_data = base64.encodebytes(fw_data).decode('utf-8')
# Form update_firmware request
data = """
<sci_request version="1.0">
<update_firmware filename="firmware.ebin">
<targets>
<device id="{}"/>
</targets>
<data>{}</data>
</update_firmware>
</sci_request>
""".format(device_id, fw_data)
# Post request
r = requests.post(url, auth=(username, password), data=data)
if (r.status_code != 200) or ("error" in r.content.decode('utf-8')):
print("firmware update failed")
else:
print("firmware update success")
Example: use the device's .ebin firmware image to update the XBee firmware
synchronously
To update the XBee firmware synchronously with Python 3.0, but using the device firmware image
already uploaded to Remote Manager, upload the device's *.ebin firmware to Remote Manager:
1. Download the updated firmware file for your device from Digi's support site. This is a zip file
containing .ebin and .mxi files for import.
2. Unzip the file and locate the .ebin inside the unzipped directory.
3. Log in to Remote Manager.
4. Click the Data Services tab.
5. Click Data Files.
6. Click Upload Files; browse and select the *.ebin firmware file to upload it.
7. Send an HTTP SCI request to Remote manager with the path of the .ebin file; see the example
below.
import base64
import requests
# Location of firmware image on Remote Manager
firmware_path = '~/XBXC.ebin'
# Remote Manager device ID of the device being updated
device_id = '00010000-00000000-03526130-70153378'
# Remote Manager username and password
username = "my_remote_manager_username"
password = "my_remote_manager_password"
url = 'https://remotemanager.digi.com/ws/sci'
# Form update_firmware request

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Digi XBee3 XB3M1 and is the answer not in the manual?

Digi XBee3 XB3M1 Specifications

General IconGeneral
BrandDigi
ModelXBee3 XB3M1
CategoryModem
LanguageEnglish

Related product manuals