XBee ZigBee modules support three types of nodes according with its firmware version: Coordinator, Router or End Device.
This guide will show the main steps to change a XBee ZigBee OEM module from Coordinator to Router, both using API. To change from other type to another is the same process but selecting the corresponding firmware version.
To upgrade XBee firmware X-CTU application needs to be used. This software allows to change firmware version and some other features, it only runs on Windows and it has been developed by Digi.
Getting X-CTU
Installing X-CTU
Once X-CTU has been downloaded, the next step is installing the program. When the program asks for updating from Digi, we must answer 'yes' so as to download all the firmware versions for all the XBee modules.
Configuring X-CTU
When X-CTU has been properly installed, the Waspmote Gateway can be connected to the computer. It will be recognized as a 'USB Serial Port'. We have to know the COM number given to this device in order to specify it in the X-CTU (in our test, COM10 is the value given by Windows).
We launch X-CTU and the program will start. A window like Figure 1 will appear, showing the different functions and the different COM detected.
If Waspmote Gateway COM does not appear automatically, we must add it manually. To add a COM port we have to stay in 'PC Settings' tab, and change to 'User Com Ports' tab. There is a little box to add Com Ports, so we will add the port as is shown in Figure 2.
To be able to communicate with XBee modules, we have to configure some parameters like the speed or if using API or not. The XBee module used for this guide is configured at 9600bps, however, the XBee modules which come with the Waspmote Developer Kit are set to 38400bps (so this is the speed which has to be chosen). X-CTU conFiguretion is shown in Figure 3.
Communicating with the module
To check if all the conFiguretion is correct we can press the 'Test/Query' button. After this, a window will appear, indicating the type and firmware version. This window will look like Figure 4.
Once we have checked the connection, we can read the module and upgrade its firmware. We have to change from 'PC Settings' tab to 'Modem conFiguretion' tab. This general tab has a button 'Read' that will have to be pressed to get parameters from XBee module. The results after pressing this button are shown in Figure 5.
Changing the firmware
Once we have been able to read parameters from XBee module, we can upgrade firmware. First we have to select the desired firmware version to upgrade to. In Figure 6 we can see the different firmware versions we can choose, selecting 'Router API'.
After this we have to press the button 'Write' and the upgrading will start. X-CTU window before starting upgrading is shown in Figure 7.
After pressing 'Write' button, the upgrading will start showing its state in X-CTU window. In Figure 8 we can see X-CTU window while upgrading.
When the upgrading has finished it appears a successful message as we can see in Figure 9.
Once the upgrading has been completed successfully, we can press 'Read' button again and the parameters will be read. In Figure 10 we can see the parameters read from XBee module with the new firmware version.
As we can see in Figure 11, if we press 'Test/Query' button in 'PC Settings' general tab, the XBee module appears with the new firmware version.
After this process, your XBee module will be upgraded.
Reset required
Sometimes while upgrading or changing firmware version a reset is needed to complete the process. In Figure 12 we can see the message will appear when this reset is required.
To reset XBee module, Waspmote Gateway provides a button to reset XBee. This button has to be pressed for 2-3 seconds and after release it. After doing it, this window should disappear and the process should go on.
Problems while changing firmware
During some upgradings the XBee modules get into a state that they look like if they were damaged. However, there is a recovery process from this state.
If there is no way of communicating with XBee module after having tested all speeds and conFiguretion options, the process to follow is exposed next.
1.Connect Waspmote Gateway to the computer without the XBee module.
2.Select the correct speed and conFiguretion options (COM port, using API or not, etc).
3.Press the desired action in X-CTU.
4.After some seconds a message like Figure 1 will appear.
5.Press reset button in Waspmote Gateway.
6.Without releasing reset button, connect XBee module in Waspmote Gateway.
7.After 2-3 seconds, release reset button.
8.The window should disappear and we will be able to communicate with the XBee module.