Xbee is a radio module based on the Zigbee protocol that we use for our telemetry system. A comparison between all the models is found on Sparkfun and on the Xbee website
Specs and Documentation
Mini-USB Adapters:
https://www.parallax.com/product/32400
...
Info | ||
---|---|---|
| ||
During development, its ok to use the 2.4Ghz xbee. During flight tests its extremely important to use the S3B 900Mhz modules, as the 2.4Ghz will interfere with the DJI light bridge connection. In addition the 900Mhz modules provide a longer range (should be at least 10km). |
Shortened Datasheets
The Xbee documentation is pretty long, however if you're just trying to understand the communication structure, the following two datasheets should provide most of the information you'll need. The first file describes the AT commands the module uses. The AT commands are used to configure each module, and it is what software like XCTU uses. The second file describes the API packet structure that the PicPilot sends to the Xbee's for various functionalities (like sending a TX packet, getting RSSI, etc).
View file | ||||
---|---|---|---|---|
|
View file | ||||
---|---|---|---|---|
|
Transmit Operations
Each Xbee unit comes flashed with a factory default address that cannot be modified. Using this, Xbee modules can choose to either Unicast a packet to a specific module based on its source address, or Broadcast to all nodes. To do this, in every TX packet, you can define a Destination address to send the packets to. If this address is equal to 0xFFFF (with everything else 0), the packet will be broadcasted. Otherwise it will be unicasted to that node.
...
The modules are also configured to use the Point to Point/Multipoint delivery method. Xbee's also support the Repeater/Directed Broadcast and Digimesh methods, which are ways of leveraging multiple nodes to act as repeaters to increase range. Because we only fly with 2 nodes, one on the ground and one on the plane, this functionality is not used.
Configuring the Modules with XCTU
The best way to configure the Xbee modules is with XCTU, which is a GUI made by Digi.
After downloading the software, the module you're configuring needs to be plugged in to an Xbee mini-USB adapter. You cannot use the Xbee breakout used for the Picpilot to configure the modules from your PC, unless you configure remote AT commands, which it too complicated to describe.
Connection Settings
All of the modules should be configured to connect via UART at 115200 baud/s, 8N1 (1 stop bit, no parity). If this doesn't work initially, try re-plugging in the usb adapter from your PC. Note that by default the modules come pre-configured to connect at 9600baud/s, so if the Xbee was just bought, use that.
Serial Settings
The important settings here are the Baud Rate which must be set to 115200 to work with the PicPilot, the stop bit and parity settings.
...
This is all required for proper communication with the PicPilot. The other fields are not relevant.
Addressing Settings
The important parameters here are the Transmit Options which should be set to 0x40 for Point to Point/Multipoint (we're not doing Repeater or DigiMesh). In addition the Cluster ID should be set to 0x11.
...
The Destination Address fields are configured on the PicPilot, and are not important for the Xbee connected to the aircraft.
MAC/Physical Layer Settings
The important settings here are the Preamble ID and Network ID. For two nodes to communicate with each other, these id's must match. The other important property is the TX Power Level, which should be set to 4 (Highest at 24dBm) for maximum range. Note that by default, the channel mask is set to disable channel 19 (recommended by Digi).
Network Settings
Important setting here is the Routing/Messaging Mode, which should be set to 2 (Non-routing module). Because we're only transmitting between two nodes, we don't care about the repeating functionality of the module, and this will configure the module to not propogate broadcasts or act as a repeater.
...