Debugging Comms

Good steps when debugging Comms

  1. 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).

  2. 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

  1. XCTU

    1. 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.

  2. Logic Analyzer

    1. 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.

  3. Python:

    1. you can use pyserial to build and send data to the xbee over usb