Configuration and commands Programming examples
XBee®-PRO 900HP/XSC RF Modules
203
Programming examples
For steps on sending AT commands to a device, refer to:
n Send AT commands
n Exit Command mode
For more information, refer to the XCTU online help at:
docs.digi.com/display/XCTU/XCTU+Overview
Connect the device to a PC
The programming examples that follow require the installation of XCTU and a serial connection to a
PC. Digi stocks connector boards to facilitate interfacing with a PC.
1. Download XCTU from the Digi website:
digi.com/products/xbee-rf-solutions/xctu-software/xctu#resources
2. After the .exe file downloads to the PC, double-click the file to launch the XCTU Setup Wizard.
Follow the steps in the wizard to completely install XCTU.
3. Mount the device to an interface board, then connect the assembly to a PC.
4. Launch XCTU and click the Add devices tab on the upper left corner of the screen.
5. Verify that the baud rate and parity settings of the Serial/USB port match those of the device.
Note Failure to enter Command mode is commonly due to baud rate mismatch. Ensure that
the Baud Rate: setting on the Add radio device window matches the interface data rate of the
device. By default, the BD parameter = 9600 b/s.
Send binary commands
Example
Use XCTU's Serial Console tool to change the device's DT (Destination Address) parameter and save
the new address to non-volatile memory.
This example requires XCTU and a serial connection to a PC.
To send binary commands:
1. Set the RT command to 1 to enable binary command programming; do this in Command mode
or configure it through XCTU.
2. Drive pin 16 high to assert CMD by de-asserting the RTS line in XCTU. The device enters Binary
Command mode.
3. Send hexadecimal bytes (parameter bytes must be 2 bytes long). The next four lines are
examples, not required values:
00 (Send binary command DT)
0D (Least significant byte of parameter bytes)
1A (Most significant byte of parameter bytes)
08 (Send binary command WR)
4. Drive pin 16 low to de-assert CMD. After you send the commands, CTS (pin ) de-asserts (driven
low) temporarily. The device exits Binary Command mode.