how to change the xbee serial baud rate

I am using two xbee 802.15.4 S1 xbees to pass GPS data between two microcontrollers. I am attempting to get the fastest baud rate to reduce the latency using AT commands. Two issues: a) changing the rate from the default 9600 baud and b) getting the xbee to operate at 115200.

My strategy is to do a factory reset (ATRE) initially to ensure starting from a known condition (9600 baud). Then I reset he baud rate to a new rate; e.g., 57600). Then, I terminate the AT mode using ATCN. Then I restart the AT mode session with +++. This seems to work most of the time but not always. Is there required to be some wait between the operations for reliable operations?

I haven’t been able to do the 115200 baud rate. I see lots of discussion on this subject on the forum regarding the clock issues. Do I set the xbee rate to “ATBD 7” and then adjust the microcontroller serial rate to baud=111111? Or do I set both the xbee and microcontroller to non-standard rates of 111111?

1 Like

Set the XBee to ATBD7. Once you exit command mode, you would then adjust your baud rate on your processor to 112kbps or 111,111bps. The other option is to hold the DI line low and trigger a reset. This would force the module into command mode at 9600 baud. You could then query the BD command to determine what rate the module is set to and adjust accordingly. You could also use the AC command after setting a value for it to take effect without having to exit command mode.