background image

Get started with BLE

Enable BLE on the XBee 3 802.15.4 RF Module

Digi XBee® 3 802.15.4 RF Module User Guide

63

Enable BLE on the XBee 3 802.15.4 RF Module

To enable BLE on a XBee 3 802.15.4 RF Module and verify the connection:

1. Set up the XBee 3 802.15.4 RF Module and make sure to connect the antenna to the device.

2.

Enable BLE and configure the BLE password

.

3.

Get the Digi XBee Mobile phone application

.

4.

Connect with BLE and configure your XBee 3 device

.

Note

The BLE protocol is disabled on the XBee 3 802.15.4 RF Module by default. You can create a

custom factory default configuration that ensures BLE is always enabled. See

Custom configuration:

Create a new factory default

.

Enable BLE and configure the BLE password

Some of the latest XBee 3 devices support Bluetooth Low Energy (BLE) as an extra interface for
configuration. If you want to use this feature, you have to enable BLE. You must also enable security by
setting a password on the XBee 3 802.15.4 RF Module in order to connect, configure, or send data over
BLE.

Use XCTU to configure the BLE password. Make sure you have installed or updated XCTU to version
6.4.2 or newer. Earlier versions of XCTU do not include the BLE configuration features. See

Download

and install XCTU

for installation instructions.

Before you begin, you should determine the password you want to use for BLE on the XBee 3 802.15.4
RF Module and store it in a secure place. We recommend a secure password of at least eight
characters and a random combination of letters, numbers, and special characters. We recommend
using a security management tool such as LastPass or Keepass for generating and storing passwords
for many devices.

Note

When you enter the BLE password in XCTU, the salt and verifier values are calculated as you set

your password. For more information on how these values are used in the authentication process, see

BLE Unlock API frame - 0x2C

.

1. Launch XCTU

.

2. Switch to Configuration working mode

.

3. Select a BLE compatible radio module from the device list.

4. Select

Enabled[1]

from the

BT Bluetooth Enable

command drop-down.

5. Click the

Write setting

button

. The

Bluetooth authentication not set

dialog appears.

Note

If BLE has been previously configured, the

Bluetooth authentication not set

dialog does not

appear. If this happens, click

Configure

in the Bluetooth Options section to display the

Configure

Bluetooth Authentication

dialog.

Summary of Contents for XBee 3 802.15.4

Page 1: ...Digi XBee 3 802 15 4 Radio Frequency RF Module User Guide...

Page 2: ...e All other trademarks mentioned in this document are the property of their respective owners 2019 Digi International Inc All rights reserved Disclaimers Information in this document is subject to cha...

Page 3: ...tiple technical support plans and service packages Contact us at 1 952 912 3444 or visit us at www digi com support Feedback To provide feedback on this document email your comments to techcomm digi c...

Page 4: ...ce 30 XBIB C GPS reference 32 Interface with the XBIB C GPS module 34 I2C communication 35 UART communication 35 Run the MicroPython GPS demo 35 Get started with MicroPython About MicroPython 38 Micro...

Page 5: ...e system 60 Directory structure 60 Paths 60 Limitations 60 XCTU interface 61 Get started with BLE Enable BLE on the XBee 3 802 15 4 RF Module 63 Enable BLE and configure the BLE password 63 Get the Di...

Page 6: ...le mode 78 Transmit mode 78 Receive mode 78 Serial communication Serial interface 80 Serial receive buffer 80 Serial transmit buffer 80 UART data flow 80 Serial data 80 Flow control 81 Clear to send C...

Page 7: ...A 107 CCA operations 107 Retries configuration 107 Transmit status based on MAC mode and XBee retries configurations 108 Addressing 109 Send packets to a specific device in Transparent API mode 109 Ad...

Page 8: ...ifier 130 ND Network Discover 130 DN Discover Node 131 NT Node Discover Timeout 132 NO Node Discovery Options 132 MM MAC Mode 132 NP Maximum Packet Payload Bytes 133 Coordinator End Device configurati...

Page 9: ...uration commands 152 D6 DIO6 RTS Configuration 152 D7 DIO7 CTS Configuration 152 P3 DIO13 UART_DOUT Configuration 153 P4 DIO14 UART_DIN Configuration 153 SPI interface commands 154 P5 DIO15 SPI_MISO C...

Page 10: ...t Timeout Timer 170 T8 D8 Output Timer 171 T9 D9 Output Timer 171 Q0 P0 Output Timer 171 Q1 P1 Output Timer 171 Q2 P2 Output Timer 171 PT PWM Output Timeout 172 Location commands 172 LX Location X 172...

Page 11: ...lue frame 0x09 194 Transmit Request frame 0x10 194 Explicit Addressing Command frame 0x11 196 Remote AT Command Request frame 0x17 200 BLE Unlock API frame 0x2C 201 Example sequence to perform AT Comm...

Page 12: ...response 242 Image Block request 244 Image Block response 246 Upgrade End request 249 Upgrade End response 250 OTA error handling 253 Default response commands 253 Upgrade End Request error statuses...

Page 13: ...cost low power wireless sensor networks The devices require minimal power and provide reliable delivery of data between devices The devices operate within the ISM 2 4 GHz frequency band The XBee 3 80...

Page 14: ...n XBee 3 Change the firmware protocol You can switch the firmware loaded onto the XBee 3 hardware to run any of the following protocols n Zigbee n 802 15 4 n DigiMesh To change protocols use the Upda...

Page 15: ...nfigure the device using XCTU 18 Configure remote devices 18 Configure the devices for a range test 20 Perform a range test 21 XBIB C Micro Mount reference 25 XBIB C SMT reference 28 XBIB CU TH refere...

Page 16: ...Part XBee 3 Zigbee SMT module 3 XBee Grove development board 3 Micro USB cable 3 Antenna 2 4 GHz half wave dipole 2 1 dBi U FL female articulating 3 XBee stickers Assemble the hardware This guide wal...

Page 17: ...Grove Development Board documentation Follow these steps to connect the XBee devices to the boards included in the kit 1 Plug one XBee 3 802 15 4 RF Module into each XBee Grove Development Board When...

Page 18: ...designed to help in removing the XBee 3 802 15 4 RF Module CAUTION Make sure the board is not powered when you remove the XBee 3 802 15 4 RF Module Configure the device using XCTU XBee Configuration a...

Page 19: ...e and name it XBEE_A by configuring the following parameters n ID 2018 n NI XBEE_A n AP API enabled 1 4 Configure the second device in either API or Transparent mode and name it XBEE_B by configuring...

Page 20: ...ack to 0 for XBEE_B Configure the devices for a range test 1 Add two devices to XCTU 2 Select the first module and click the Load default firmware settings button 3 Configure the following parameters...

Page 21: ...ter remove it from XCTU and connect it to a power supply laptop or portable battery 9 Leave LOCAL_DEVICE connected to the computer Perform a range test 1 Go to the XCTU display for radio 1 2 Click to...

Page 22: ...ide 22 4 Click and select Range test The Radio Range Test dialog appears 5 Change the Range Test type to Loopback 6 In the Select the local radio device area select radio 1 XCTU automatically selects...

Page 23: ...02 15 4 RF Module has pictures that show the jumper in the UART position move the jumper to the left on the surface mount device or down on the through hole device puts it in loopback mode If the test...

Page 24: ...lting signal strength at different distances You can also test different data rates by reconfiguring the BR data rate parameter on both radios When the test is complete click Stop Range Test XCTU disp...

Page 25: ...nce Digi XBee 3 802 15 4 RF Module User Guide 25 XBIB C Micro Mount reference This picture shows the XBee C Micro Mount development board and the table that follows explains the callouts in the pictur...

Page 26: ...Get started XBIB C Micro Mount reference Digi XBee 3 802 15 4 RF Module User Guide 26...

Page 27: ...Connection Status DIO5 Yellow RSSI PWM0 DIO10 6 User Buttons Comm DIO0 Button connects the Commissioning DIO0 pin on the XBee Connector through to a 10 resistor to GND when pressed RESET Button Conne...

Page 28: ...ference Digi XBee 3 802 15 4 RF Module User Guide 28 XBIB C SMT reference This picture shows the XBee C SMT development board and the table that follows explains the callouts in the picture Note This...

Page 29: ...ction Status DIO5 Yellow RSSI PWM0 DIO10 6 User Buttons Comm DIO0 Button connects the Commissioning DIO0 pin on the XBee Connector through to a 10 resistor to GND when pressed RESET Button Connects to...

Page 30: ...ference Digi XBee 3 802 15 4 RF Module User Guide 30 XBIB CU TH reference This picture shows the XBee CU TH development board and the table that follows explains the callouts in the picture Note This...

Page 31: ...to the VCC pin of the XBee When active the VCC pin of the XBee is disconnected from the 3 3 V line on the development board This allows current measurement to be conducted by attaching a current meter...

Page 32: ...VCC Pin4 GND 10 Temp Humidity Sensor This as a Texas Instruments HDC1080 temperature and humidity sensor This part is accessible through I2C Be sure that the XBee that is inserted into the development...

Page 33: ...Get started XBIB C GPS reference Digi XBee 3 802 15 4 RF Module User Guide 33...

Page 34: ...nts Proper orientation is with the board laying completely flat with the module facing towards the sky Interface with the XBIB C GPS module The XBee 3 802 15 4 RF Module can interface with the XBIB C...

Page 35: ...module see Class UART Run the MicroPython GPS demo The Digi MicroPython github repository contains a GPS demo program that parses some of the GPS NMEA sentences from the UART prints them and also repo...

Page 36: ...ated in the comments in the file Step 4 Run the program 1 Rename the file you edited in Step 3 from gpsdemo1 py to main py 2 Copy the renamed file onto your device s root filesystem directory 3 Copy t...

Page 37: ...inue with this user guide for simple examples to get started using MicroPython on the XBee 3 802 15 4 RF Module About MicroPython 38 MicroPython on the XBee 3 802 15 4 RF Module 38 Use XCTU to enter t...

Page 38: ...ython Terminal in XCTU This requires XCTU 6 3 10 or higher n You have an XBee 3 802 15 4 RF Module installed on an appropriate development board such as an XBIB U DEV or an XBDB U ZB n The XBee 3 802...

Page 39: ...icroPython with the XBee 3 802 15 4 RF Module Example hello world 1 At the MicroPython prompt type the Python command print Hello World 2 Press Enter to execute the command The terminal echos back Hel...

Page 40: ...since the epoch The XBee3 module lacks a realtime clock and cannot provide any date or time data The following example exercises the various sleep functions and uses ticks_diff to measure duration imp...

Page 41: ...in the above output If you want the output from MicroPython to match XCTU you can use the following example to convert bytes to hex dl_value xbee atcmd DL hex_dl_value hex int from_bytes dl_value big...

Page 42: ...rred to as Digi Device Type this is used to identify different types of devices or hardware n rssi Relative signal strength indicator in dBm of the node discovery request packet received by the sendin...

Page 43: ...oadcast destination n Constant xbee ADDR_COORDINATOR to indicate the coordinator 2 The Message as a character string If the message is sent successfully transmit returns None If the transmission fails...

Page 44: ...eceive function returns one of the following n None No message the receive queue is empty n Message dictionary consisting of l sender_nwk 16 bit network address of the sending node l sender_eui64 64 b...

Page 45: ...and sends and receives messages First we will upload some utility functions into the flash space of MicroPython so that the following examples will be easier to read Complete the following steps to c...

Page 46: ...nd the remote node and continuously prints out any incoming data 1 Access the MicroPython environment 2 Copy the following sample code print Forming a new 802 15 4 network as a coordinator xbee atcmd...

Page 47: ...s CE 0 A1 4 CH 0x13 ID 0x3332 EE 0 for command value in network_settings items xbee atcmd command value xbee atcmd AC Apply changes time sleep 1 while network_status 0 time sleep 0 1 print Connected t...

Page 48: ...index php Setting_up_Picocom_ _Ubuntu n Source code and in depth information see github com npat efault picocom Tera Term for Windows With the XBee 3 802 15 4 RF Module in MicroPython mode AP 4 you c...

Page 49: ...de AP 4 you can access the MicroPython prompt using a terminal Note The user must have read and write permission for the serial port the XBee 3 802 15 4 RF Module is connected to in order to communica...

Page 50: ...hon org Control commands CTRL A on a blank line enter raw REPL mode CTRL B on a blank line enter normal REPL mode CTRL C interrupt a running program CTRL D on a blank line reset the REPL CTRL E on a b...

Page 51: ...dule and type help with the module as the object you can query all the functions that the object supports import sys help sys object module sys is of type module __name__ sys path flash flash lib argv...

Page 52: ...re local access n Disable functionality Secure session protects against external man in the middle attacks by requiring remote devices to authenticate before they are allowed to make configuration cha...

Page 53: ...authentication process Verifier A value derived from a given salt and password Configure the secure session password for a device For a device to act as a secure session server it needs to have a pas...

Page 54: ...vice ends the outgoing secure session with the node whose address is specified in the type 0x2E frame This frame can be sent even if the node does not have a session with the specified address the dev...

Page 55: ...h a secure session using the password that was set on the server node 1 Generate a Secure Session Control frame 0x2E n The destination address must match the 64 bit address SH SL of the remote server...

Page 56: ...d be sent encrypted 4 The returned Receive Packet frame 0x90 and Explicit Rx Indicator frame 0x91 receive options fields should also have bit 4 set Note The maximum payload per transmission size is re...

Page 57: ...must be in API mode Once a session has been established between a client and server node the client can be transitioned to Transparent mode and if bit 4 of TO is set the client will encrypt data sent...

Page 58: ...active session with the destination node 0x35 Encryption Failure The encryption process failed Only likely to be seen when using manual SRP and when an invalid encryption parameter was passed in Remo...

Page 59: ...t using MicroPython on the XBee 3 802 15 4 RF Module refer to the Digi MicroPython Programming Guide Overview of the file system 60 Directory structure 60 Paths 60 Limitations 60 XCTU interface 61 Dig...

Page 60: ...hen specifying the path to a file or directory it is interpreted as follows n Paths starting with a forward slash are absolute and must start with flash to be valid n All other paths are relative to t...

Page 61: ...em upgrades for information on how to put files on a device after a FOTA update XCTU interface XCTU releases starting with 6 4 0 include a File System Manager in the Tools menu You can upload files to...

Page 62: ...or example you can use your cellphone to connect to your XBee device and then from your phone configure and program the device Enable BLE on the XBee 3 802 15 4 RF Module 63 Enable BLE and configure t...

Page 63: ...ed or updated XCTU to version 6 4 2 or newer Earlier versions of XCTU do not include the BLE configuration features See Download and install XCTU for installation instructions Before you begin you sho...

Page 64: ...the dialog as shown above This password is used when you connect to this XBee device via BLE using the Digi XBee Mobile app 8 Click OK to save the configuration Get the Digi XBee Mobile phone applicat...

Page 65: ...to find your XBee device The first time you open the app on a phone and scan for devices the device list contains only the name of the device and the BLE signal strength No identifying information fo...

Page 66: ...erence BLE advertising behavior and services 67 Device Information Service 67 XBee API BLE Service 67 API Request characteristic 67 API Response characteristic 68 Digi XBee 3 802 15 4 RF Module User G...

Page 67: ...x2C n BLE Unlock Response frame 0xAC n AT Command frame 0x08 n AT Command Queue Parameter Value frame 0x09 This API reference assumes that you are familiar with Bluetooth and GATT services The specifi...

Page 68: ...ooth Unlock API Frame in order to authenticate the connection If the BLE Unlock API 0x2C frame has not been executed all other API frames are silently ignored and are not processed API Response charac...

Page 69: ...ies 70 Firmware over the air FOTA update 70 Custom defaults 70 Custom configuration Create a new factory default 71 XBee bootloader 71 Send a firmware image 72 XBee Network Assistant 72 XBee Multi Pro...

Page 70: ...device configuration parameters even after returning to default settings using RE Restore Defaults This can be useful for settings that identify the device such as NI Node Identifier or settings that...

Page 71: ...y time Set a custom configuration 1 Open XCTU and load your device 2 Enter Command mode 3 Perform the following process for each configuration that you want to set as a factory default a Send the Set...

Page 72: ...mware image is not successfully loaded the bootloader outputs an aborted string It return to the main bootloader menu Some causes for failure are n Over 1 minute passes after the command to send the f...

Page 73: ...hardware and software that enables partners and distributors to program multiple Digi Radio frequency RF devices simultaneously It provides a fast and easy way to prepare devices for distribution or...

Page 74: ...Modes Transparent operating mode 75 API operating mode 75 Command mode 75 Idle mode 78 Transmit mode 78 Receive mode 78 Digi XBee 3 802 15 4 RF Module User Guide 74...

Page 75: ...n the serial receive buffer The data is packetized and sent at any RO timeout or when NP bytes are received If the serial receive buffer becomes full hardware flow control must be implemented in order...

Page 76: ...ommand mode You can customize the command character the guard times and the timeout in the device s configuration settings For more information see CC Command Character CT Command Mode Timeout and GT...

Page 77: ...dule responds with OK cr if successful and ERROR cr if not Apply command changes Any changes you make to the configuration command registers using AT commands do not take effect until you apply the ch...

Page 78: ...802 15 4 RF Module is in Idle mode During Idle mode the device listens for valid data on both the RF and serial ports If configured for Sleep support the XBee 3 802 15 4 RF Module only transitions to...

Page 79: ...Serial communication Serial interface 80 Serial receive buffer 80 Serial transmit buffer 80 UART data flow 80 Flow control 81 Digi XBee 3 802 15 4 RF Module User Guide 79...

Page 80: ...until it is able to process the data in the buffer If the UART is in use you can avoid this by the host side by honoring clear to send CTS flow control Serial transmit buffer When the device receives...

Page 81: ...e UART interface commands Flow control The XBee 3 802 15 4 RF Module maintains buffers to collect serial and RF data that it receives The serial receive buffer collects incoming serial characters and...

Page 82: ...es it discards the entire RF data packet If the device sends data out the UART when RTS is de asserted set high the device could send up to five characters out the UART port after RTS is de asserted C...

Page 83: ...implemented on the device what the SPI signals are and how full duplex operations work SPI communications 84 Full duplex operation 85 Low power operation 85 Select the SPI port 86 Force UART operation...

Page 84: ...nput Enables serial communication with the slave SPI_ATTN Attention Output Alerts the master that slave has data queued to send The XBee 3 802 15 4 RF Module asserts this pin as soon as data is availa...

Page 85: ...of SPI mode there is an option of another sleep pin as described below By default Digi configures DIO8 SLEEP_REQUEST as a peripheral and during pin sleep it wakes the device and puts it to sleep This...

Page 86: ...values after a power on reset If the host issues a WR command while in SPI mode these same parameters are written to flash and after a reset the device continues to operate in SPI mode If the UART is...

Page 87: ...slave port you can recover the device to UART operation by holding DIN CONFIG low at reset time DIN CONFIG forces a default configuration on the UART at 9600 baud and brings up the device in Command m...

Page 88: ...0 Digital I O support 90 Analog I O support 91 Monitor I O lines 92 I O sample data format 93 API frame support 95 On demand sampling 96 Periodic I O sampling 98 Digital I O change detection 100 I O l...

Page 89: ...ital inputs for sampling D0 through P4 as long as AO is not set to 2 In order to support these additional I O lines an enhanced I O sample packet is sent over the air which is not compatible with the...

Page 90: ...ailable for sampling By default AO is configured to be compatible with legacy devices n Configure AO to 0 or 1 to make digital I O available on lines DIO0 through DIO14 D0 DIO0 ADC0 Commissioning Conf...

Page 91: ...WM0 Configuration DIO11 N A 8 8 7 P1 DIO11 PWM1 Configuration DIO12 N A 5 5 4 P2 DIO12 TH_SPI_MISO Configuration DIO13 N A 3 3 2 P3 DIO13 UART_DOUT Configuration DIO14 N A 4 4 3 P4 DIO14 UART_DIN Conf...

Page 92: ...If you do not define inputs or outputs no sample data is generated Typically I O samples are generated by configuring the device to sample I O pins periodically based on a timer or when a change is d...

Page 93: ...egardless of how I O data is generated the format of the sample data is always represented as a series of bytes in the following format which is compatible with the S1 802 15 4 and S2C 802 15 4 device...

Page 94: ...12 N A bit 13 N A bit 14 N A bit 15 N A 2 Analog data set multiple Each enabled ADC line in the analog portion of the channel mask has a separate 2 byte value based on the number of ADC inputs on the...

Page 95: ...ds to a bit in the digital channel mask and indicates the digital state of the pin whether high 1 or low 0 If the digital channel mask is 0x0000 then these two bytes are omitted as no digital I O line...

Page 96: ...mote AT command When sent remotely from a gateway or server to each sensor node on the network on demand sampling can improve battery life and network performance as the remote node transmits sample d...

Page 97: ...t this response corresponds to 0x49 0x53 IS 00 Status Indicates success or failure of the AT command 00 OK if no I O lines are enabled this will return 01 ERROR 01 I O sample data One sample set 0C 0C...

Page 98: ...d Indicates the AT command that this response corresponds to 0x49 0x53 IS 00 Status Indicates success or failure of the AT command 00 OK if no I O lines are enabled this will return 01 ERROR 01 I O sa...

Page 99: ...s before TX specifies how many I O samples can be transmitted in a single OTA packet Any single byte value 0 0xFF is accepted for input However the value is adjusted downward based on how many I O sam...

Page 100: ...DIO3 is high 01 28 Analog sample data for AD0 03 12 Analog sample data for AD1 00 00 Sample set 2 The second set of digital sample data 0x0004 0000 0000 0000 0000b DIO3 is low 01 58 Second set of anal...

Page 101: ...llows you to affect the output pins of one device by sampling the I O pins of another To support line passing you must configure a device to generate I O sample data using periodic sampling IR Sample...

Page 102: ...matches the one set by IA the device sets the output of D2 to match the input of D2 of the receiver This output level holds for ten seconds before the pin returns to a digital output low state Analog...

Page 103: ...Transparent mode By default if the receiver is configured for API mode it outputs the I O sample frame in addition to affecting output pins You can suppress the I O sample frame output by setting IU I...

Page 104: ...ever the digital timeout timer T0 through T9 and Q0 through Q2 are suspended during sleep and resume upon wake Analog and PWM I O Lines Lines configured as analog inputs or PWM output are not affected...

Page 105: ...A 107 Retries configuration 107 Transmit status based on MAC mode and XBee retries configurations 108 Addressing 109 Peer to peer networks 110 Master slave networks 110 Direct and indirect transmissio...

Page 106: ...t detection is enabled as well as certain AT commands MAC Modes 1 and 2 do not include a Digi header which disables many features of the device All data is strictly pass through These modes are intend...

Page 107: ...A to a non zero value only takes effect upon boot If you adjust the CA value ensure that you write the setting to flash with WR Write and restart with an FR Software Reset In the event that the energy...

Page 108: ...following table applies in either of these cases l Digi header is disabled l Digi header is enabled and XBee Retries RR parameter is equal to 0 default configuration Mac ACK Config Destination reachab...

Page 109: ...nation address and a destination PAN ID in the over the air OTA frame The source and destination addresses may be either long or short and the destination address may be either a unicast or a broadcas...

Page 110: ...or End device association End device association occurs if CE is 0 and A1 has bit 2 set See the following table and A1 End Device Association Bit Hex value Meaning 0 0x01 Allow PAN ID reassignment 1 0...

Page 111: ...rect address see Direct and indirect transmission Additionally after associating an end device has MY 16 bit Source Address set to 0xFFFE indicating that the newly associated end device should use its...

Page 112: ...on the result of the active scan the set of channels for the energy scan varies If a PAN ID is found on all the channels in the channel mask then the energy scan operates on all the channels in the ch...

Page 113: ...transmission There are two methods to transmit data n Direct transmission data is transmitted immediately to the Destination Address n Indirect transmission a packet is retained for a period of time...

Page 114: ...receives direct transmissions destined to its 64 bit address it will not receive an indirect message directed at its 64 bit address if it is configured to use a 16 bit address If the indirect messagin...

Page 115: ...ecurity modes enumerated as shown in the following table Level Name Encrypted Length of message integrity check Packet length overhead 0 N A No 0 no check 0 1 MIC 32 No 4 9 2 MIC 64 No 8 13 3 MIC 128...

Page 116: ...the long received address is not used for API output If encryption is enabled with MM of 1 or 2 then no App header exists the source address is always long and the receiving device in legacy API mode...

Page 117: ...e maximum achievable payload is reduced by 5 bytes Note You can query NP Maximum Packet Payload Bytes to determine the maximum achievable payload size based on current parameters NP always assumes a l...

Page 118: ...he receiver is a Legacy 802 15 4 module S1 hardware The conditions are n The sender is an XBee 3 802 15 4 RF Module and the receiver is a Legacy 802 15 4 module n The sender has the Digi header enable...

Page 119: ...ce discovery and configuration features In addition to configuring devices you must develop a strategy to place devices to ensure reliable routes To accommodate these requirements modules include feat...

Page 120: ...e configuration commands can be sent to 16 bit short addresses by setting the short address in the API frame for Remote AT commands In that case the 64 bit address is unused and does not matter Apply...

Page 121: ...avior is the same except that the response is output in API mode If no nodes respond there will be no responses at all to the node discover command The requesting node is not able to process a new AT...

Page 122: ...ith a matching NI string sends its information back to the requesting node The local node then sets DH DL to match the address of the responding node As soon as this response occurs the command termin...

Page 123: ...not available and a battery is required In order to increase battery life the device sleeps which means it stops operating It can be woken by a timer expiration or a pin Sleep modes 124 Sleep paramet...

Page 124: ...mode de assert DTR SLEEP_RQ The device wakes when SLEEP_RQ is de asserted and is ready to transmit or receive when the CTS line is low When waking the device the pin must be de asserted at least two...

Page 125: ...the duration of the timer MicroPython sleep with optional pin wake SM 6 The MicroPython sleep option allows a user s MicroPython program to exclusively control the device s sleep operation with optio...

Page 126: ...each of the above conditions are false then sleep may still be blocked in these cases 1 Enough time has not expired since the device has awakened a If the device is operating in pin sleep the amount o...

Page 127: ...mmands 147 Command mode options 151 UART pin configuration commands 152 SPI interface commands 154 I O settings commands 156 I O sampling commands 165 I O line passing commands 168 Location commands 1...

Page 128: ...s IEEE 802 15 4 channel numbers Parameter range 0xB 0x1A Default 0xC channel 12 ID Extended PAN ID Set or read the user network identifier Devices must have the same network identifier to communicate...

Page 129: ...uld go to a different destination address 1 Node Discovery compatibility 0 Node discovery operates like other XBee devices and not like the Legacy 802 15 4 module This means the following 1 A directed...

Page 130: ...reserved PROFILE_ID CR 2 bytes MANUFACTURER_ID CR 2 bytes DIGI DEVICE TYPE CR 4 bytes Optionally included based on NO settings RSSI OF LAST HOP CR 1 byte Optionally included based on NO settings A se...

Page 131: ...rs the destination node When DN is sent in Command mode 1 The device sets DL and DH to the address of the device with the matching NI string 2 The receiving device returns OK or ERROR 3 The device exi...

Page 132: ...MM command to specify the operating MAC Mode for more information see MAC Mode configuration The MAC Mode serves two purposes n Enable disable the use of a Digi header which enables advanced features...

Page 133: ...d For the purposes of this command it always assumes a long destination address This means that if you select a short destination address you will be able to send up to NP 6 bytes in a single packet N...

Page 134: ...dinator operating on any PAN ID 1 Allow Channel reassignment 0 Only associates with Coordinator operating on matching CH channel setting 1 May associate with Coordinator operating on any channel 2 Aut...

Page 135: ...annel out of the channels to be scanned determined by the SC parameter The Coordinator then operates on that channel 2 Allow Association 0 Coordinator will not allow any devices to associate to it 1 C...

Page 136: ...to monitor association progress The following table provides the status codes and their meanings Status code Meaning 0x00 Coordinator successfully started End device successfully associated or operat...

Page 137: ...r changes Parameter range 0x0013A200 0x0013A2FF read only Default Set in the factory SL Serial Number Low Displays the lower 32 bits of the unique IEEE 64 bit RF extended address assigned to the XBee...

Page 138: ...O samples in both Transparent and API modes 0x000000000000FFFF is the broadcast address DH 0 DL 0xFFFF Parameter range 0 0xFFFFFFFF Default 0 RR XBee Retries Set or reads the number of application lay...

Page 139: ...k use the same key and that the maximum RF packet size is 95 bytes if Tx compatibility is enabled you set bit 0 of C8 If C8 bit 0 is not set see Maximum payload When encryption is enabled the device a...

Page 140: ...0 DM Disable Features A bit field mask that you can use to enable or disable specific features Bit Description 0 Reserved 1 Reserved 2 Disable firmware over the air FOTA updates When set to 1 the devi...

Page 141: ...presented in two s complement for example 5 dBm 0xFB Parameter range 0 0xFF read only Default N A CA CCA Threshold Defines the Clear Channel Assessment CCA threshold Prior to transmitting a packet the...

Page 142: ...the process ends and the data is lost Parameter range 0 5 exponent Default 0 DB Last Packet RSSI Reports the RSSI in dBm of the last received RF data packet DB returns a hexadecimal value for the dBm...

Page 143: ...n CR to indicate the end of the frame The sequence of PanDescriptors has a final trailing carriage return three CR in sequence indicate the end of the active scan If using API Mode no CR s are returne...

Page 144: ...is disabled CA is 0 then this count only increments for frames that are blocked due to receive in progress When this count reaches its maximum value of 0xFFFF it stops counting You can reset EC to 0 o...

Page 145: ...not 0 the device sends all transmissions indirectly meaning end devices have to poll the coordinator to receive data FP Force Poll or using cyclic sleep End Device SP determines the sleep period for...

Page 146: ...ear any of the available sleep option bits Parameter range 0 0x103 Bit field Bit Setting Meaning Description 0 0 Normal operations A device configured for cyclic sleep will poll for data on waking 1 D...

Page 147: ...he firmware cannot configure the exact rate specified it configures the closest approximation to that rate For example to set a rate of 57600 b s send the following command line ATBDE100 Then to find...

Page 148: ...0 b s Default 3 9600 baud NB Parity Set or read the serial parity settings for UART communications The device does not actually calculate and check the parity It only interfaces with devices at the co...

Page 149: ...er silence required before transmission begins when operating in Transparent mode Set RO to 0 to transmit characters as they arrive instead of buffering them into one RF packet The RO command only app...

Page 150: ...802 15 4 API Indicator 0x80 0x81 Also restricts the Digital Input sampling to D0 through D8 and allows for OTA compatibility with legacy S1 and S2C devices Default 2 AZ Extended API Options Optionally...

Page 151: ...e For more information see Enter Command mode Parameter range 0 0xFF Default 0x2B the ASCII plus character CT Command Mode Timeout Sets or displays the Command mode timeout parameter If a device does...

Page 152: ...in 16 Parameter range 0 1 3 5 Parameter Description 0 Disabled 1 RTS flow control 2 N A 3 Digital input 4 Digital output low 5 Digital output high Default 0 D7 DIO7 CTS Configuration Sets or displays...

Page 153: ...H pin 2 Parameter range 0 1 3 5 Parameter Description 0 Disabled 1 UART DOUT 2 N A 3 Digital input 4 Digital output low 5 Digital output high Default 1 P4 DIO14 UART_DIN Configuration Sets or displays...

Page 154: ...s or displays the DIO15 SPI_MISO configuration Micro pin 16 SMT pin 17 This only applies to surface mount and micro devices Parameter range 0 1 4 5 Parameter Description 0 Disabled 1 SPI_MISO 2 N A 3...

Page 155: ...N A 3 N A 4 Digital output low 5 Digital output high Default 1 P8 DIO18 SPI_CLK Configuration Sets or displays the DIO18 SPI_CLK configuration Micro pin 13 SMT pin 14 This only applies to surface moun...

Page 156: ...vailable on the XBee 3 802 15 4 RF Module D0 DIO0 ADC0 Commissioning Configuration Sets or displays the DIO0 ADC0 CB configuration TH pin 20 SMT pin 33 Parameter range 0 5 Parameter Description 0 Disa...

Page 157: ...nt to sending an RE Restore Defaults Default N A D1 DIO1 ADC1 TH_SPI_ATTN Configuration Sets or displays the DIO1 ADC1 TH_SPI_ATTN configuration Micro pin 30 SMT pin 32 TH pin 19 Parameter range SMT M...

Page 158: ...Configuration Sets or displays the DIO3 ADC3 TH_SPI_SSEL configuration Micro pin 28 SMT pin 30 TH pin 17 Parameter range SMT MMT 0 2 5 TH 0 5 Parameter Description 0 Disabled 1 SPI_SSEL for the throug...

Page 159: ...e Configuration Sets or displays the DIO5 ASSOCIATED_INDICATOR configuration Micro pin 26 SMT pin 28 TH pin 15 Parameter range 0 1 3 5 Parameter Description 0 Disabled 1 Associate LED indicator blinks...

Page 160: ...arameter Description 0 Disabled 1 ON SLEEP indicator 2 N A 3 Digital input 4 Digital output low 5 Digital output high Default 1 P0 DIO10 RSSI PWM0 Configuration Sets or displays the DIO10 RSSI PWM0 co...

Page 161: ...ion Micro pin 8 SMT pin 8 TH pin 7 When configured as PWM output 2 you can use M1 to explicitly control the PWM1 output When used with Analog line passing PWM corresponds with ADC1 Parameter range 0 2...

Page 162: ...own resistor n If you set a PR bit to 0 it specifies no internal pull up down resistor The PD Pull Direction parameter determines the direction of the internal pull up down resistor PR and PD only aff...

Page 163: ...The binary equivalent of 0x6F is 01101111 Bit 0 is the right most digit in the binary bit field PD Pull Up Down Direction See PR Pull up Down Resistor Enable for the bit mappings Parameter range Throu...

Page 164: ...PWM 0x01FF 50 PWM 0x03FF 100 PWM and so forth Parameter range 0 0x3FF Default 0 RP RSSI PWM Timer The PWM timer expiration in 0 1 seconds RP sets the duration of pulse width modulation PWM signal out...

Page 165: ...4 RF Module s IS I O options are D0 DIO0 ADC0 Commissioning Configuration D8 DIO8 DTR SLP_Request Configuration and four analog channels AD0 DIO0 AD3 DIO3 When operating in Transparent mode AP API En...

Page 166: ...I PWM0 Configuration P2 DIO12 TH_SPI_ MISO Configuration WARNING If you set IR to 1 or 2 the device will not keep up and many samples will be lost Parameter range 0 0xFFFF x 1 ms Default 0 IC DIO Chan...

Page 167: ...5 TH pin 4 13 DIO13 Micro pin 3 SMT pin 3 TH pin 2 14 DIO14 Micro pin 4 SMT pin 4 TH pin 3 Parameter range 0 0x7FFF Default 0 AV Analog Voltage Reference The analog voltage reference used for A D sam...

Page 168: ...passing commands The following AT commands are I O line passing commands IA I O Input Address The source address of the device to which outputs are bound To disable I O line passing set all bytes to...

Page 169: ...t Timer Specifies how long pin D1 DIO1 ADC1 TH_SPI_ATTN Configuration holds a given value before it reverts to configured value If set to 0 there is no timeout Parameter range 0 0xFF Default 0 T2 D2 O...

Page 170: ...w long pin D5 DIO5 Associate Configuration holds a given value before it reverts to configured value If set to 0 there is no timeout Parameter range 0 0xFF Default 0 T6 D6 Output Timeout Timer Specifi...

Page 171: ...t reverts to configured value If set to 0 there is no timeout Parameter range 0 0xFF Default 0 Q0 P0 Output Timer Specifies how long pin P0 holds a given value before it reverts to configured value If...

Page 172: ...parameters used to store the physical location of the deployed device LX Location X User defined GPS latitude coordinates of the node that is displayed on Digi Remote Manager and Network Assistant Pa...

Page 173: ...e firmware VL Version Long Shows detailed version information including the application build date and time Parameter range N A Default N A VH Bootloader Version Reads the bootloader version of the de...

Page 174: ...This command can only be issued locally Parameter range N A Default N A V Supply Voltage Reads the voltage on the Vcc pin in mV Parameter range 0 0xFFFF in mV read only Default N A TP Module Temperatu...

Page 175: ...performs a reset 100 ms later If you issue FR while the device is in Command mode the reset effectively exits Command mode Parameter range N A Default N A MicroPython commands The following commands r...

Page 176: ...on the MicroPython subsystem PYV Version Report Report the MicroPython version PY Interrupt Program Sends KeyboardInterrupt to MicroPython This is useful if there is a runaway MicroPython program and...

Page 177: ...nds with a blank line Entries start with zero or more spaces followed by file size or the string DIR for directories then a single space character and the name of the entry Directory names end with a...

Page 178: ...NFO FULL Reports every file and directory in the order they are placed in the file system along with the amount of space they take up individually Also reports deleted space as well as unused director...

Page 179: ...PI frame n Issuing a remote 0x17 AT Command API frame with option bit 1 set Example Altering the UART baud rate with the BD command does not change the operating baud rate until after an AC command is...

Page 180: ...nctionality Note When Bluetooth is enabled the XBee 3 802 15 4 RF Module cannot be in Sleep mode If the device is configured to allow Sleep mode and you enable Bluetooth the XBee 3 802 15 4 RF Module...

Page 181: ...the BLE API Service without storing the XBee password on the XBee device Configure the salt with the S command In the V W X and Y verifiers you specify the 128 byte verifier value where each command r...

Page 182: ...ion Parameter range 0 FFFFFFFF Default 0 V W X Y Secure Session Verifier The secure session verifier is a 128 byte value used together with S Secure Session Salt for secure session authentication The...

Page 183: ...ommand requests API Frame 0x17 but still can send insecure Remote AT Commands 2 Serial Data When set to 1 the device will not emit any serial data that was sent insecurely This functionality applies t...

Page 184: ...Operate in API mode API mode overview 185 Use the AP command to set the operation mode 185 API frame format 185 Digi XBee 3 802 15 4 RF Module User Guide 184...

Page 185: ...additional API frames with unknown frame types into your software interface Use the AP command to set the operation mode Use AP API Enable to specify the operation mode AP command setting Description...

Page 186: ...escape any payload bytes that match API frame specific data such as the start of frame byte 0x7E The following table shows the structure of an API frame with escaped characters Frame fields Byte Desc...

Page 187: ...length field is a two byte value that specifies the number of bytes contained in the frame data field It does not include the checksum field Frame data This field contains the information that a devi...

Page 188: ...add all bytes of the packet excluding the frame delimiter 7E and the length the second and third bytes 7E 00 0A 01 01 50 01 00 48 65 6C 6C 6F B8 Add these hex bytes 01 01 50 01 00 48 65 6C 6C 6F 247 N...

Page 189: ...Packet 64 bit Address frame 0x80 210 Receive Packet 16 bit address frame 0x81 211 RX Receive Packet 64 bit address IO frame 0x82 212 RX Packet 16 bit address I O frame 0x83 214 AT Command Response fra...

Page 190: ...00 Frame ID 4 Identifies the data frame for the host to correlate with a subsequent ACK which is a TX Status frame 0x89 that indicates the packet was transmitted successfully If set to 0 the device do...

Page 191: ...t Frame data fields Offset Description Frame type 3 0x01 Frame ID 4 Identifies the data frame for the host to correlate with a subsequent TX Status frame 0x89 If set to 0 the device does not send a re...

Page 192: ...opulated with the parameter value that is currently set on the device The Frame ID of the 0x88 response is the same one set by the command in the 0x08 frame Format The following table provides the con...

Page 193: ...xample illustrates an AT Command frame when you modify the device s DL parameter value to a broadcast address of 0xFFFF A non zero Frame ID can be used to correlate the AT command request with the cor...

Page 194: ...a response AT command 5 6 Command name two ASCII characters that identify the AT command Parameter value BD7 115200 baud optional 7 n If present indicates the requested parameter value to set the giv...

Page 195: ...ting to a 16 bit address set this field to 0xFFFFFFFFFFFFFFFF 16 bit destination address 13 14 Set to the 16 bit address of the destination device or set to 0xFFFE if sending to the 64 bit address of...

Page 196: ...like 0x7E 0x00 0x16 0x10 0x01 0x00 0x7D 0x33 0xA2 0x00 0x40 0x0A 0x01 0x27 0xFF 0xFE 0x00 0x00 0x54 0x78 0x44 0x61 0x74 0x61 0x30 0x41 0x7D 0x33 The device calculates the checksum on all non escaped...

Page 197: ...ation outside of the listed purpose The reserved Digi endpoints are n 0xE8 Digi data endpoint n 0xE6 Digi device object endpoint n 0xE5 Secure Session Server endpoint n 0xE4 Secure Session Client endp...

Page 198: ...n Reserved 21 22 Set to 0 Data Payload 23 n Data that is sent to the destination device Transmit Options bit field See Transmit Request frame 0x10 Example The following example sends a data transmissi...

Page 199: ...xample 64 bit destination address MSB 5 0x00 6 0x13 7 0xA2 8 0x00 9 0x01 10 0x23 11 0x84 LSB12 0x00 Reserved 13 0xFF 14 0xFE Source endpoint 15 0xE8 Destination endpoint 16 0xE8 Cluster ID 17 0x00 18...

Page 200: ...ed if the 16 bit network address field equals anything other than 0xFFFE Do not use a broadcast address for remote AT commands because a remote AT command is only expected to get a response from one p...

Page 201: ...session key which is used to communicate in an encrypted fashion with the peer Additionally a Modem Status frame 0x8A with the status code 0x32 Bluetooth Connected is sent through the UART if AP 1 or...

Page 202: ...ontent usually due to A mod N 0 0x81 Incorrect payload length 0x82 Bad proof of key 0x83 Resource allocation error 0x84 Request contained a step not in the correct sequence Payload 5 Payload structure...

Page 203: ...API frames to be used Content from this point is encrypted using AES 256 CTR with the following parameters n Key The entire 32 byte session key n Counter 128 bits total prefixed with the appropriate n...

Page 204: ...al Port or MicroPython internal interface This frame is used in conjunction with User Data Relay Output 0xAD For information on sending and receiving User Data Relay frames using MicroPython see Send...

Page 205: ...Use an external processor to output the frame over the UART with the BLE interface as a target This outputs the data contained in the frame as the Output Frame over the active BLE connection via indi...

Page 206: ...red messages to be passed between the server and client This frame is also used for clients to log out of an existing secure session If the frame is addressed to a broadcast address the login attempt...

Page 207: ...with the target server When set all other options and the timeout field will be ignored No password should be provided when this bit is set Note If a password is supplied on a logout frame a 0x0A err...

Page 208: ...be ended by the server to make room for the new session Sessions with non zero timeouts will never be ended in this way Password 15 n The password set on the remote node up to 64 ASCII characters Exa...

Page 209: ...Secure Session Control frame 0x2E Digi XBee 3 802 15 4 RF Module User Guide 209 Frame data fields Offset Example Password 15 0x50 P 16 0x41 A 17 0x53 S 18 0x53 S 19 0x57 W 20 0x4F O 21 0x52 R 22 0x44...

Page 210: ...he following table provides the contents of the frame For details on frame structure see API frame format Frame data fields Offset Description Frame type 3 0x80 64 bit source address 4 11 The sender s...

Page 211: ...out the serial interface Format The following table provides the contents of the frame For details on frame structure see API frame format Frame data fields Offset Description Frame type 3 0x81 Sourc...

Page 212: ...last RSSI 12 N A RSSI Hexadecimal equivalent of dBm value For example if RX signal strength 40 dBm the device returns 0x28 40 decimal Status 13 N A bit 0 reserved bit 1 Address broadcast bit 2 PAN br...

Page 213: ...d analog input returns a two byte value indicating the A D measurement of that input ADC channel data is represented as an unsigned 10 bit value right justified on a 16 bit boundary Analog samples are...

Page 214: ...N A RSSI Hexadecimal equivalent of dBm value For example if RX signal strength 40 dBm the device returns 0x28 40 decimal Options 7 N A bit 0 reserved bit 1 Address broadcast bit 2 PAN broadcast bits 3...

Page 215: ...data each enabled analog input returns a two byte value indicating the A D measurement of that input ADC channel data is represented as an unsigned 10 bit value right justified on a 16 bit boundary A...

Page 216: ...The following table provides the contents of the frame For details on frame structure see API frame format Frame data fields Offset Description Frame type 3 0x88 Frame ID 4 Identifies the data frame f...

Page 217: ...4 RF Module User Guide 217 Frame data fields Offset Example Length MSB 1 0x00 LSB 2 0x05 Frame type 3 0x88 Frame ID 4 0x01 AT command 5 0x42 B 6 0x44 D Command status 7 0x00 Command data No command da...

Page 218: ...being reported If the Frame ID 0 in the TX Request no TX Status frame is given Status 5 0x00 Success 0x01 No ACK received 0x02 CCA failure 0x03 Indirect message unrequested 0x21 Network ACK failure 0x...

Page 219: ...descriptions TX Status frame 0x89 Digi XBee 3 802 15 4 RF Module User Guide 219 Frame data fields Offset Example Length MSB 1 0x00 LSB 2 0x03 Frame type 3 0x89 Frame ID 4 0x01 Status 5 0x00 Checksum 6...

Page 220: ...Watchdog timer reset 0x02 End device successfully associated with a coordinator 0x03 End device disassociated from coordinator or coordinator failed to form a new network 0x06 End device successfully...

Page 221: ...x8B Frame ID 4 The Frame ID of the response will be the same value that was used in the originating Tx request 16 bit destination address 5 The 16 bit Network Address where the packet was delivered if...

Page 222: ...3 802 15 4 RF Module User Guide 222 Frame Fields Offset Example Start delimiter 0 0x7E Length MSB 1 0x00 LSB 2 0x07 Frame type 3 0x8B Frame ID 4 0x47 Reserved 5 0xFF 6 0xFE Transmit retry count 7 0x00...

Page 223: ...Frame type 3 0x90 64 bit source address 4 11 The sender s 64 bit address MSB first LSB last Reserved 12 13 16 bit source address Receive options 14 Bit Interpretation 0 Reserved 1 Broadcast packet 2...

Page 224: ...odule User Guide 224 Frame data fields Offset Example 64 bit source address MSB 4 0x00 5 0x13 6 0xA2 7 0x00 8 0x40 9 0x52 10 0x2B LSB 11 0xAA Reserved 12 0xFF 13 0xFE Receive options 14 0x01 Received...

Page 225: ...B first LSB last The sender s 64 bit address Reserved 12 13 16 bit source address Source endpoint 14 Endpoint of the source that initiates transmission Destination endpoint 15 Endpoint of the destinat...

Page 226: ...set Example Start delimiter 0 0x7E Length MSB 1 0x00 LSB 2 0x18 Frame type 3 0x91 64 bit source address MSB 4 0x00 5 0x13 6 0xA2 7 0x00 8 0x40 9 0x52 10 0x2B LSB 11 0xAA Reserved 12 0xFF 13 0xFE Sourc...

Page 227: ...channel mask 18 Bitmask field that indicates which analog I O lines on the remote have sampling enabled if any Digital samples if included 19 20 If the sample set includes any digital I O lines Digita...

Page 228: ...Length MSB 1 0x00 LSB 2 0x14 64 bit source address MSB 4 0x00 5 0x13 6 0xA2 7 0x00 8 0x40 9 0x52 10 0x2B LSB 11 0xAA Reserved MSB 12 0xFF LSB 13 0xFE Receive options 14 0x01 Number of samples 15 0x01...

Page 229: ...equest The request is a 0x17 frame 64 bit source remote address 5 12 The long address of the remote device returning this response 16 bit source remote address 13 14 The short address of the remote de...

Page 230: ...0x98 Status code 4 See the following tables for status code descriptions Status data 5 n The length of this field varies with the Status Code Example A device has established a secure session with th...

Page 231: ...0x00 Session was terminated by the other node 0x01 Session Timed out 0x02 Received a transmission with an invalid encryption counter 0x03 Encryption counter overflow the maximum number of transmissio...

Page 232: ...Data Relay frames in the MicroPython Programming Guide Format The following table provides the contents of the frame For details on frame structure see API frame format Field data fields Offset Descr...

Page 233: ...xAE Description This frame is output as a result of the Secure Session Control frame 0x2E attempt It indicates whether the 0x2E frame operation was successful or not Format The following table provide...

Page 234: ...g for the other node to respond 0x06 Could not allocate memory needed for authentication 0x07 A request to terminate a session in progress has been made 0x08 There is no password set on the server 0x0...

Page 235: ...messaging 237 ZCL message output 238 Image Notify 238 Create the Image Notify request 239 Query Next Image request 240 Query Next Image response 242 Image Block request 244 Image Block response 246 U...

Page 236: ...the firmware version manufacturer code image type and the size of the GBL file These parameters are required to generate the rest of the FOTA upgrade messages Note All fields in the OTA header with th...

Page 237: ...e XBee 3 802 15 4 RF Module To obtain this value query C Hardware Software Compatibility on the target device You can successfully update the device to a firmware if and only if the value of C of the...

Page 238: ...not printed to the UART on the client To see these messages set AZ Extended API Options to 2 ZCL messages received by the server are always printed to the UART Image Notify The server sends the Image...

Page 239: ...following information Frame data fields Offset Example Comments Start delimiter 0 0x7E Length MSB 1 0x00 LSB 2 0x21 Frame Type 3 0x11 Frame ID 4 0x01 64 bit destination address MSB 5 0x00 6 0x13 7 0x...

Page 240: ...OTA OTB file 0x0100 OTA file system image MSB 31 0x00 Firmware version LSB 32 0x01 Firmware version of the new update file in Little Endian In this example the version is 0x1001 33 0x10 34 0x00 MSB 3...

Page 241: ...ts 64 bit source address MSB 4 0x00 5 0x13 6 0xA2 7 0xFE 8 0x00 9 0x00 10 0x00 LSB 11 0x03 16 bit source address MSB 12 0x28 LSB 13 0x2F Source Endpoint 14 0xE8 Destination Endpoint 15 0xE8 Cluster ID...

Page 242: ...rver obtains the information sent by the Client in the Query Next Image request and determines if it has a suitable image for the client It then sends a Query Next Image response with one of the follo...

Page 243: ...elds Offset Example Comments 64 bit destination address MSB 5 0x00 6 0x13 7 0xA2 8 0xFE 9 0x00 10 0x00 11 0x00 LSB 12 0x03 16 bit destination address MSB 13 0x28 LSB 14 0x2F Source Endpoint 15 0xE8 De...

Page 244: ...x01 Firmware version of the new update file in Little Endian In this example the version is 0x1001 32 0x10 33 0x00 MSB 34 0x00 Image Size LSB 35 0x2E 36 0xF3 37 0x02 MSB 38 0x00 Checksum 39 0xE5 Image...

Page 245: ...Comments Start delimiter 0 0x7E Length MSB 1 0x00 LSB 2 0x1E Frame Type 3 0x91 64 bit source address MSB 4 0x00 5 0x13 6 0xA2 7 0xFE 8 0x00 9 0x00 10 0x00 LSB 11 0x03 16 bit source address MSB 12 0x2...

Page 246: ...on LSB 29 0x01 30 0x10 31 0x00 MSB 32 0x00 File Offset LSB 33 0x00 0x0 for the first request Offset by multiples of Image Block size For example 0x00000000 for the first request 0x00000040 0x00000080...

Page 247: ...0 0x7E Length MSB 1 0x00 LSB 2 0x65 Frame Type 3 0x11 Frame ID 4 0x01 64 bit destination address MSB 5 0x00 6 0x13 7 0xA2 8 0xFE 9 0x00 10 0x00 11 0x00 LSB 12 0x03 16 bit destination address MSB 13 0x...

Page 248: ...ZCL payload MSB 28 0x10 Data payload ZCL payload Image type LSB 29 0x00 0x0000 OTA OTB file 0x0100 OTA file system image Data payload ZCL payload MSB 30 0x00 Data payload ZCL payload Firmware version...

Page 249: ...pgrade server with INVALID_IMAGE as the status If the image passes all integrity checks the client sends an Upgrade End request command to the upgrade server with SUCCESS as the status Frame data fiel...

Page 250: ...bort 0x95 Require More Image 0x99 Manufacturer ID LSB 25 0x1E MSB 26 0x10 Image type LSB 27 0x00 0x0000 OTA OTB file 0x0100 OTA file system image MSB 28 0x00 Firmware version LSB 29 0x01 30 0x10 31 0x...

Page 251: ...ds Offset Example Comments 64 bit destination address MSB 5 0x00 6 0x13 7 0xA2 8 0xFE 9 0x00 10 0x00 11 0x00 LSB 12 0x03 16 bit destination address MSB 13 0x28 LSB 14 0x2F Source Endpoint 15 0xE8 Dest...

Page 252: ...ction sequence number 24 0x01 ZCL payload Command ID 25 0x07 Upgrade End response Manufacturer ID LSB 26 0x1E MSB 27 0x10 Image type LSB 28 0x00 0x0000 OTA OTB file 0x0100 OTA file system image MSB 29...

Page 253: ...s incorrect parameters UNSUP_CLUSTER_ COMMAND 0x81 Such command is not supported on the device REQUIRE_MORE_ IMAGE 0x99 The client still requires more OTA upgrade image files in order to successfully...

Page 254: ...too big 0x8A Please ensure that the image you are attempting to upgrade has a different version than the current version 0x01 ZCL OTA Message Out of Sequence 0x05 Image Block Response 0x80 Incorrect...

Page 255: ...or handling Digi XBee 3 802 15 4 RF Module User Guide 255 ZCL OTA Command Status Error Message 0x06 Upgrade End Request 0x94 Client Timed Out 0x96 Invalid OTA Image 0x95 Client Aborted Upgrade 0x05 St...

Page 256: ...ew file system needs to be sent to the device after the firmware update is complete This section contains information on how to update the file system of remote devices over the air OTA file system up...

Page 257: ...Create an OTA file system image signed using the private key generated previously 3 Perform an OTA update using the created OTA file Note The local device used to create the file system image must ha...

Page 258: ...lick Generate in the Generate file system key pair dialog 4 Save both the keys in a safe location and close the dialog box Set the public key on the XBee 3 device 1 Open the configuration view of the...

Page 259: ...pport remotely setting the file system public key at this time Create the OTA file system image To create the OTA file system image 1 Open the File System Manager dialog box 2 Open a connection on the...

Page 260: ...stem update 1 To add the target device click Discover radios in the same network from the source device 2 Enter Configuration mode on the remote device 3 Click the down arrow next to the Update button...

Page 261: ...m image is completely transferred and mounted on the remote device XCTU informs you that the file system has been updated successfully OTA file system updates OEM Use the following steps to perform a...

Page 262: ...The command will produce something like the following output 0 d 0 hl 2 l 89 cons SEQUENCE 2 d 1 hl 2 l 19 cons SEQUENCE 4 d 2 hl 2 l 7 prim OBJECT id ecPublicKey 13 d 2 hl 2 l 8 prim OBJECT prime256...

Page 263: ...in Generate a public private key pair that the private key is named private pem and that the padded image is named xbfs bin this can be done using OpenSSL with the following command openssl dgst sha2...

Page 264: ...em upgrades OTA file system updates OEM Digi XBee 3 802 15 4 RF Module User Guide 264 that the data that goes in the image blocks starts at the beginning of the image data after the OTA header and sub...

Reviews: