Updating the firmware is essential for maintaining the reliability, security, and performance of your XBee for Wi-SUN module. It ensures the device runs the latest software, which may include bug fixes, performance improvements, and new features.
| You should update the firmware when new versions are released, especially if they address security vulnerabilities or add relevant functionalities. |
Depending on your use case or status in the development cycle, you can update the firmware of your XBee for Wi-SUN device with either of the following approaches:
-
Serially:
-
Wirelessly:
Using XBee Studio
XBee Studio allows you to update the firmware of any XBee device connected to your PC via the serial interface.
It is recommended to use XBee Studio to update the firmware of your device individually through the serial interface during the early stages of development. For example, this may be necessary if you purchase a module and discover a newer firmware version is available upon connection.
To update the firmware of your XBee for Wi-SUN serially using XBee Studio:
-
Connect your device to a PC where XBee Studio is installed.
This section assumes that you know how to connect the XBee for Wi-SUN device to a PC. For more information on how to connect an XBee device to a PC, see the Step 3 - Set up the hardware page from the getting started section. -
Ensure your device is connected to the same LAN as your PC.
-
Open XBee Studio.
-
Wait for your device to be discovered.
A module that’s never been configured should be discovered automatically, but if you have problems discovering your local device, see the Device discovery tools section of XBee Studio User Guide to learn how to do it manually. -
Click on the device. The Dashboard page appears. It contains:
-
The device information.
-
Connection interface.
-
Network information.
-
A list of quick actions.
-
-
Select the Firmware Update item in the sidebar of the tab. It is located within the Configuration section.
-
As seen in the above image, you can see all the available firmware versions for your device. Select the version to which you want to update.
-
To trigger an update, click the Update device gray button located at the bottom of the page.
-
The contents of the page change to display the update process information
-
When the process finishes, your device will automatically run the new firmware.
| See the Firmware update section of the XBee Studio User Guide for more information. |
Using a host processor/bootloader
When the XBee is connected to a host processor, the firmware can be updated by invoking the XBee bootloader and transferring the firmware image using XMODEM.
This process is also used for updating a local device’s firmware using XBee Studio.
XBee devices use a modified version of Silicon Labs' Gecko bootloader. This bootloader version supports a custom entry mechanism that uses module pins DIN, DTR/SLEEP_RQ, and RTS.
To invoke the bootloader using hardware flow control lines, follow the steps below:
-
Set DTR/SLEEP_RQ low (CMOS0V) and RTS high.
-
Send a serial break to the DIN pin and power cycle or reset the module.
-
When the device powers up, set:
-
DTR/SLEEP_RQ and DIN: low (CMOS0V)
-
RTS: high
-
-
Terminate the serial break and send a carriage return at 115200 baud to the device.
-
If successful, the device sends the Silicon Labs' Gecko bootloader menu out the DOUT pin at 115200 baud.
-
You can now send commands to the bootloader at 115200 baud.
| Disable hardware flow control when entering and communicating with the bootloader. |
All serial communications with the module use 8 data bits, no parity bit, and 1 stop bit.
You can also invoke the bootloader from the XBee application by sending %P (Invoke Bootloader).
After successfully invoking the bootloader menu, you are ready to upload a firmware image through the UART interface:
-
Look for the bootloader prompt BL > to ensure the bootloader is active.
-
Send an ASCII 1 character to initiate a firmware update. The device will then wait for an XModem CRC upload of a
.gblimage over the serial line at 115200 baud. -
Send the
.gblfile to the device using standard XMODEM-CRC. If the firmware image is successfully loaded, the bootloader outputs a "complete" string. -
Invoke the newly loaded firmware by sending a 2 to the device.
If the firmware image is not successfully loaded, the bootloader outputs an "aborted string" and returns to the main bootloader menu.
Some causes for failure are:
-
Over one minute passes after the command to send the firmware image and the first block of the image has not yet been sent.
-
A power cycle or reset event occurs during the firmware load.
-
A file error or a flash error occurs during the firmware load. The following table contains errors that could occur during the XMODEM transfer:
Error Cause Solution 0x18
When a serial upload attempt has been abruptly discontinued by invoking Ctrl+C and subsequently another attempt is made to upload a
.gblfile by selecting 1 on the bootloader menu.-
Select 2 on the bootloader menu.
-
The bootloader reboots.
-
The bootloader menu is displayed again.
-
Select 1 and upload the
.gblfile.
-
More content coming soon