Good steps when debugging Comms
use breakpoints and figure out what your raw message looks like. Compare with this guide to ensure that its in order. Check the length value and the checksum value. IF THE CHECKSUM IS WRONG YOU WONT SEE ANYTHING ON THE RECEIVER SIDE. Use the XCTU frame builder and recreate your message, it'll calculate a length and checksum for you, to compare with the actual frame being sent (if there is something wrong with your frame this will expose that).
use an oscilloscope to read the uart signals on the sending and receiving end. You want to ensure that there is a good signal going to the sender, a good response (no error codes) from the sender to the stm32, and then the receiver sees the message.
Xbee Debugging Tools
...
XCTU
XCTU is software that we can use to configure and run the xbees. We first used this software to send some test frames using the zigbee 3.0 protocol. This tool can be used to generate frames (and you can compare checksums/frames with the ones your program is generating.
...
Logic Analyzer
Worst Case Scenario: you can always use a logic analyzer to read the exact data the xbee is sending/recieving, although this is painful to do.
Python:
...
Overview
<not written yet>
<comms is kinda cringe sometimes 😕>
Inventory
Name | Address | Freq | Antenna | range (LOS) | range (urban) | data rate |
---|---|---|---|---|---|---|
Xbee Pro S3B | 0013A20040B47E80 | 928 MHz | dipole | 14 km | 610 m | 160 kbps |
Xbee Pro S1 | 0013A20040B0EC97 | 2.4 GHz | dipole | x | x | |
Xbee Pro s1 | 0013a20040b0ec69 | 2.4 GHz | dipole | x | x | |
xbee pro s3b | 0013a20040b47e6b | 928 MHz | dipole | 14 km | 610 m | 160 kbps |
xbee pro s3b | 0013a20040e47deb | 928 MHz | dipole | 14 km | 610 m | 160 kbps |
xbee pro 900 | 0013a20040674c02 | 900 MHz | integrated wire | x | x | 156 kbps |
xbee pro s3b | 0013a20040e501f1 | 928 MHz | dipole | 14 km | 610 m | 160 kbps |
xbee pro s3b | 0013a20040e501e1 | 928 MHz | dipole | 14 km | 610 m | 160 kbps |
xbee pro 900 | 0013a20040789b2b | 900 MHz | dipole | 14 km | 610 m | 156 kbps |
xbee s2c | 0013a20041c0f315 | 2.4 GHz | small antenna | 90 m | 30 m | |
xbee s2c | 0013a20041c0f209 | 2.4 GHz | small antenna | 90 m | 30 m |
We also have 5 uart to usb xbee boards, and 3 dipole antennas.