XBee Hive for Wi-SUN can perform firmware updates over-the-air (OTA) to Wi-SUN nodes using OpenCSMP.

This approach is particularly useful in the later stages of a product’s lifecycle. For example, if your device has been deployed for a while and a new firmware version with security fixes becomes available, you can use the OTA update feature.

Depending on your use case, you can update the firmware of your Wi-SUN network with any of the following approaches:

If any Wi-SUN OTA updates are in progress, you cannot start another update. Only one Wi-SUN OTA update process can be running at any given time.

Using XBee Studio OTA firmware update

XBee Studio allows you to perform OTA updates of any XBee node in the same Wi-SUN network as a border router on your IP network.

  1. Ensure that:

    • The target nodes are connected to the XBee Hive for Wi-SUN’s network.

    • Your XBee Hive for Wi-SUN is connected to the same LAN as your PC.

  2. Open XBee Studio.

  3. Wait for your XBee Hive for Wi-SUN to be discovered.

  4. Click on the device. The Dashboard page appears. It contains:

    1. The device information.

    2. Network information.

    3. A list of quick actions.

  5. Select the Network Topology item in the sidebar of the tab. It is located within the Network section.

  6. XBee Studio automatically starts a continuous network discovery. Wait for the device to be updated to appear.

  7. Double-click on the device to update. The Dashboard page of the remote device appears.

  8. Select the Firmware Update item in the sidebar of the tab. It is located within the Configuration section.

  9. As with local devices, you can see all the available firmware versions for your device. Select the version to which you want to update.

  10. To trigger an update, click the Update device gray button located at the bottom of the page.

  11. The contents of the page change to display the update process information (similar to the update process of a local device).

  12. When the process finishes, your device will automatically run the new firmware.

Using XBee Hive for Wi-SUN CLI

The XBee Hive for Wi-SUN command line interface (CLI) allows you to start, monitor, and cancel OTA firmware updates on Wi-SUN nodes.

  1. Ensure that:

    • The target Wi-SUN nodes are connected to the XBee Hive for Wi-SUN’s network and have successfully registered via OpenCSMP.

    • The EUI-64 identifier of each target node is known.

    • The CSMP firmware image file is prepared and has been uploaded into the filesystem of the XBee Hive for Wi-SUN.

  2. Execute the CLI command wisun ota update to start an OTA firmware update:

    > wisun ota update <EUI64> <FILEPATH>

    Where:

    • <EUI64>: The EUI64 identifier of the Wi-SUN node to be updated. Press Tab to auto-complete the parameter from registered CSMP devices.

    • <FILEPATH>: The path and filename of the CSMP firmware image file to use for this update. Press Tab to auto-complete the parameter.

    The command-line interface only supports updating one Wi-SUN node at a time. To update multiple devices at the same time, use the local web UI.
  3. Display all ongoing or completed OTA updates with the command wisun ota list:

    > wisun ota list verbose

    Use the verbose parameter to get detailed information.

    If no firmware updates have been performed since the XBee Hive for Wi-SUN was last powered on, the message No over-the-air updates have been performed. is displayed.

  4. To cancel the activation of an OTA update image, execute:

    > wisun ota cancel-activation

    This cancels the scheduled activation of the update image for any in-progress over-the-air updates. If an image is still being transmitted, the cancellation will be sent when the image has been fully sent.

Canceling activation does not interrupt the "Sending update image" state.

Using XBee Hive for Wi-SUN local web UI

The XBee Hive for Wi-SUN local web UI allows you to perform OTA firmware updates on multiple Wi-SUN nodes simultaneously through a graphical interface.

  1. Ensure that:

    • The target Wi-SUN nodes are connected to the XBee Hive for Wi-SUN’s network and have successfully registered via OpenCSMP.

    • The EUI-64 identifier of each target node is known.

    • The CSMP firmware image file is prepared and has been uploaded into the filesystem of the XBee Hive for Wi-SUN.

  2. Log in to the XBee Hive for Wi-SUN Web UI as a user with full Admin access rights.

  3. On the left sidebar, click Wi-SUN, then OTA Updates. The Wi-SUN OTA Updates page appears.

    This page displays a table of ongoing or completed firmware updates, or No firmware updates if no updates have been performed.

    If there are no updates in progress, the Start Updates button appears.

  4. Click Start Updates to open a modal dialog with two steps:

    1. Select the OTA update image. Files in the /opt/wisun-ota directory are inspected, and valid CSMP firmware image files are presented.

      Click on an update image file to select it, then click Confirm selection.

    2. Select the device(s) to update. OpenCSMP devices registered to the XBee Hive for Wi-SUN are displayed, sorted by their EUI-64 identifier. XBee for Wi-SUN devices are listed first, followed by all other devices.

      Select one or more devices to update, then click Start Updates.

      The status of the update request is displayed.

  5. Click Close to close the dialog window.

If one or more updates are still in progress, the Cancel Activation button appears. This cancels the scheduled activation of the update image for any in-progress over-the-air updates. If an image is still being transmitted, the cancellation will be sent when the image has been fully sent.

Canceling activation does not interrupt the "Sending update image" state.

Using Digi Remote Manager

Digi Remote Manager lets you push firmware updates to XBee for Wi-SUN devices remotely without physical access to the device. See Manage Wi-SUN devices remotely.

Configure OTA options

There are configuration options that can help tune the OTA operations based on the needs of the network.

Default values have been selected to support various basic network configurations and environments. It is recommended for users to tailor values based on what fits their network’s needs.
Parameter Default value Description

csmp_block_interval

2.5 seconds

Configure the amount of time to wait between sending OTA firmware blocks.

Increasing this value above the default can help with file transfer issues during the update process, but will have a significant impact on update times.

Configure csmp_block_interval

  1. Select the device in Remote Manager and click Actions > Open Console, or log in locally as an Admin.

  2. Enter Admin CLI (type admin if prompted).

  3. Enter configuration mode:

    > config
    (config)>
  4. Ensure that the Wi-SUN feature is enabled.

    (config)> wisun enable true
  5. Configure the desired block interval time. In this example, we will set it to 1.5s.

    (config)> wisun ota csmp_block_interval 1.5s
  6. Save the configuration and apply the change.

    (config)> save
    Configuration saved.
    >
  7. Type exit to exit the Admin CLI.

    Depending on your device configuration, you may be presented with an Access selection menu. Type quit to disconnect from the device.

  1. Log in to Digi Remote Manager or the local Web UI as a user with full Admin access rights.

  2. Access the device configuration:

    Method Steps

    Remote Manager

    1. Locate your device.

      1. From the menu, click Devices to display a list of your devices.

      2. Use the Filter bar to locate the device you want to manage. For example, to search by type of device:

        1. Click the Advanced Search button.

        2. Click in the Filter bar.

        3. Enter in the type of device you’re looking for (for example, XBee Hive for Wi-SUN).

    2. Select the Device ID.

    3. Select Settings.

    4. Select to expand Config.

    Local Web UI

    1. On the menu, click System. Under Configuration, click Device Configuration.

      The Configuration window is displayed.

  3. Click to expand Wi-SUN Border Router.

  4. Ensure Enable is set to True.

  5. Click to expand OTA.

  6. Set csmp_block_interval to the desired value. In this example, we will set it to 1.5s.

  7. For csmp_block_interval, enter 1.5s.

  8. Click Apply to save the configuration and apply the change.