XBeeParser
A utility to decode data packets sent to or received by Digi XBee modules
Latest Release: 1.0.4
About XBeeParser
This is an XBee packet decoder written in Python 3.
It is a work in progress. The current version decodes all the standard XBee packets, and provides further decoding of a limited (but growing) selection of Zigbee Device Object (ZDO) commands (eg. 16-bit network address request) and general (aka ‘global’) Zigbee Cluster Library commands (eg. Read Attribute).
How To Use XBeeParser
Run XBeeParser at the command line and provide a code XBee packet as a string of hexadecimal octets:
1
| $ python xbp.py 7e0020950013a20040522baa7d84027d840013a20040522baa2000fffe0101c105101e1b
|
The XBee packet string need not be a single string; you can also include spaces:
1
| $ python xbp.py 7e 95-20-00 00 00-a2-13 2-52-40b aa 7d 7-02-84d 13-00-84 a40-00-2 52 2b aa 20 00 ff fe 01 05-c1-01 1-1e-10b
|
Make XBeeParser Global
To simplify usage of XBeeParser, run the following commands:
mv xbp.py /usr/local/bin/xbpchmod +x /usr/local/bin/xbp
Then you run XBeeParser from any location in your filesystem:
1
| $ xbp 7e 88-05-00 45-45-05 00 e8
|
Escaping
By default, XBeeParser assumes packets have been escaped, but this can be disabled with the -e or --escape switch. Follow this with false to disable escaping (or true to be explicit about enabling escaping.
Options
XBeeParser has the following options:
| Short | Long | Values | Description |
|---|
-e | --escape | true or false | Use escaping when decoding packets. Default: true |
-d | --debug | true or false | Show extra debug information. Default: false |
-v | --version | N/A | Show version information |
-h | --help | N/A | Show help information |
Back to the Top
Examples
Using Options
1
| $ python xbp.py -d true -e false 7e0020950013a20040522baa7d84027d840013a20040522baa2000fffe0101c105101e1b
|
This generates the following output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| Extra debugging information will be printed during decoding
Packet decoding will not use escaping
7E0020950013A20040522BAA7D84027D840013A20040522BAA2000FFFE0101C105101E1B
XBee frame found
Frame length : 32 bytes
XBee command ID : 95 "Node identification indicator response"
Address (64-bit) : 0013A20040522BAA
Address (16-bit) : 7D84
Status : Packet a Broadcast Packet
Address (16-bit) : 7D84
Address (64-bit) : 0013A20040522BAA
NI string : Default
Parent address (16-bit) : FFFE
Device type : Router
Source event : Pushbutton
Digi Profile ID : C105
Manufacturer ID : 101E
Checksum : 1B
|
Zigbee
1
| $ python xbp.py 7E 002D 40522-0013A200-91BAA 06FC 8038-00-00 01-01-0000 1-00F8FF07-00D10-0000-00 69-5E-54 5B 4B 48-44-48 57-55-55 41-51-46 6-4B-44E
|
This generates the following output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| XBee frame found
Frame length : 45 bytes
XBee command ID : 91 "Zigbee explicit RX indicator"
Address (64-bit) : 0013A20040522BAA
Address (16-bit) : 06FC
Source endpoint : 00
Destination endpoint : 00
Cluster ID : 8038
Profile ID : 0000
Status : Packet acknowledged
Frame data : 010000F8FF071D00000010545E695B4B484448555557465141444B
ZDO command : Management Network Update Response
Transaction seq. number : 01
Response status : Success
Checksum : 6E
|
Back to the Top
Back to the Top
Source Code
You can view XBeeParser’s source code at GitHub.
Back to the Top
Release Notes
XBeeParser is no longer available and no further updates to it will be made.
- 1.0.4 9 January 2019
- Add intro text on run.
- Some code clean-up.
- 1.0.3 8 November 2019
- Fix ZDO address lookup response type check.
- 1.0.2 6 November 2018
- Add Discover Commands Received, Discover Commands Generated request decoders.
- Add Discover Commands Received, Discover Commands Generated response decoders.
- Add further XBee command constants.
- Add XBee commands —
0xA4, register joining device status; 0xA5, join notification status. - Update help, version info.
- Fix little endian byte order on ZCL frame decoders.
- 1.0.1 5 November 2018
- Fix incorrect attribute type display.
- Fix attribute value display bug.
- 1.0.0 2 November 2018
Back to the Top
Related Software
Back to the Top