Digi International offers a convenient tools for Xbee module programming - X-CTU. With this software , the user be able to upgrade the firmware , update the parameters , perform communication testing easily. The basic operations are listed below , make sure you read through and try them.
X-CTU User InterfaceI attached a USB to Serial Port Adapter which has a FTDI Chip on it. FTDI Chip allows people to use the USB port talk to XBee. It offers a Virtual COM Port Driver , which will create a virtual serial COM port for user. So we can access a device (like XBee) which talks with serial port , through our USB port(since latest PC does not have serial port interface usually). In my PC , FTDI creates a "USB Serial Port(COM9)". You can see it from the picture above.
X-CTU has four main tabs , the brief descriptions are described below :
1. PC Settings
You can configure the PC to talk to XBee or other devices using serial port interface. You can also test and query if an XBee is working properly in here.
2. Range Test
After the configuration in PC Settings are correct , AND , the XBee has connected to another one , then you can use this function here. It gives you the ideas about how is the signal strength , how is the successful rate for sending / receiving data.
After the configuration in PC Settings are correct , then you can use this simple terminal talk to that device , such as XBee.
4. Modem Configuration
A very good user interface for reading or writing the parameters of a XBee. You can also update the firmware here. Even you can change the modem type and function set base on how you are going to use it.
The most handy functions that you'll need are PC Settings and Modem Configuration. Check out the example below.
[ Modify Xbee Parameter ]
For optimizing your XBee , you will need to modify the parameters in there. The most basic and important way for optimization is to modify its Baud Rate. You can boost the transfer rate from 9600 bps to 115200 immediately. Base on the datasheet , the Baud Rate of an XBee for a serial interface can be set up to 115200 bps , while the RF Data Rate is 250,000 bps. Which means , it is safe to use the highest serial interface transfer rate for XBee , unless the device which connect to it can not afford this transfer rate.
After the modification , remember to reconfigure the PC Settings to the updated Baud Rate. Since the parameter of XBee you connected , has changed by this operation.
For change the communication baud rate of a new Xbee module , follow this procedure :
There're a lot of parameters in here , now just searching for "Serial Interface" and "BD - Baud Rate". Then change it to "7 - 115200".
On step 7. , click on "Write" button to start updating the parameter. Make sure you did not check the option "Always update firmware".
You will get this information if everything is right. It tells you it didn't update the firmware and just configure the AT parameters for you. Remember go back to PC Settings and set the new Baud Rate , else you won't be able to talk to your XBee.
[ Using XBee with Arduino ]
It is very popular to use the combination of XBee and Arduino , since XBee turns Arduino into a powerful wireless device for real time controlling and monitoring. The hardware and official library allows the Baud Rate be set up to 115200 bps. I will have a simple example tutorial for you in this website.
If you are using Arduino with a very useful third party library : "NewSoftSerial", the highest Baud Rate is 57600 bps. I will have a more detailed information about this in other section.
In the next section , the tutorial will show you the information about the basic concept of XBee parameter and firmware , and how to use X-CTU to update XBee firmware.