user:kluong:feature_idea_-_onboard_xbee_diagnostics

Feature Idea - Onboard XBee Diagnostics

If you take a look at apple's spring 2021 PDR presentation, one thing they mentioned was not “XBEE not able to send or receive packets on board”.

I'm not sure what the debug steps they took or how long it took to resolve but my gut says this kind of debugging is painful for hardware teams at the moment. If you're a hardware person, you should be able to check voltage/etc. but you might not know where to continue beyond that.

One thing that can be added is on on-board diagnostic mode in the firmware, which will set the XBee into command more and attempt to read some parameters from it like panid, nodeid, api mode, etc. If the XBee doens't even respond with these things, the diagnostic is a failure, and at least you know something else is wrong and the XBee is not broken. It could be the XBee is completely broken. Or the wiring is broken, or something else.

Again, it's definitely possible to do this by just removing the XBee, plugging it into serial-usb converter and using X-CTU to do this, but it might be more convenient to be able to just do it on the board.

See this page on more information about XBee command mode and AT commands.

https://www.digi.com/resources/documentation/Digidocs/90001456-13/concepts/c_at_commands.htm?TocPath=XBee%20transparent%20mode%7CCommand%20mode%7C_____1

Some of the code would look like:

xbee_port.write("+++\r");
 
// Write the panid 8888 to the xbee
xbee_port.write("ATID\r");
s = xbee_port.readStringUntil('\r');
 
// Print the ID to the user:
Serial.println(s)
 
 
// This command explicitly exits the module from command mode. Remember that if you don't type anything for 10 seconds, the device automatically drops out of Command mode.
xbee_port.write("ATCN\r");

In the serial console, the user would see something like this, after entering command mode and typing XBEE_DIAG:

Entered command mode:
XBEE_DIAG

Running XBEE Diag Mode...
PANID 8888
SUCCESS
Exiting weatherbox command mode.

Would be good to start basic and extend the functionality as needed. But it might be possible to check other things as well with AT command that could be worth exploring:

  • if the xbee is connected to a network at all
  • signal strength
  • might be more here as well

Authors

Contributing authors:

kluong

Created by kluong on 2021/03/24 17:14.

  • user/kluong/feature_idea_-_onboard_xbee_diagnostics.txt
  • Last modified: 2021/09/19 21:59
  • (external edit)