From 7ced0570eb50a257abaaec324bff4dcac59c50b0 Mon Sep 17 00:00:00 2001 From: David Escalona Date: Wed, 27 May 2026 11:32:19 +0200 Subject: [PATCH 1/2] hw: add Wi-SUN hardware revisions (0x62, 0x63) and remove old ones * Remove old `XBEE_WISUN` (0x60) and `XBEE_WISUN_TH` (0x61) hardware types. * Add new `XBEE_WISUN` (0x62) and `XBEE_WISUN_TH` (0x63) entries to the HW list. Signed-off-by: David Escalona --- digi/xbee/models/hw.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/digi/xbee/models/hw.py b/digi/xbee/models/hw.py index ee8787c..2de1eeb 100644 --- a/digi/xbee/models/hw.py +++ b/digi/xbee/models/hw.py @@ -108,8 +108,8 @@ class HardwareVersion(Enum): XBEE_XR_868_TH = (0x5B, "XBee XR 868 TH") XBEE_BLU = (0x5C, "XBee 3 BLU") XBEE_BLU_TH = (0x5D, "XBee 3 BLU TH") - XBEE_WISUN = (0x60, "XBee Wi-SUN") - XBEE_WISUN_TH = (0x61, "XBee Wi-SUN TH") + XBEE_WISUN = (0x62, "XBee for Wi-SUN") + XBEE_WISUN_TH = (0x63, "XBee for Wi-SUN TH") def __init__(self, code, description): self.__code = code From 578f89b53d8166f067056e091c270207499993d1 Mon Sep 17 00:00:00 2001 From: David Escalona Date: Wed, 27 May 2026 11:33:22 +0200 Subject: [PATCH 2/2] firmware: add local firmware update support for Wi-SUN devices Wi-SUN devices use the Gecko bootloader with the same `.apponly.gbl` / `.gbl` file convention as XBee XR (app-only file plus a full file that bundles bootloader + application), so they reuse the existing `GECKO_BOOTLOADER_XR` local update path. * Add `WISUN_HW_VERSIONS` and include it in `LOCAL_SUPPORTED_HW_VERSIONS`. Wi-SUN is intentionally excluded from `REMOTE_SUPPORTED_HW_VERSIONS`: remote firmware update over the Wi-SUN IPv6 transport is not yet supported. * Map Wi-SUN hardware codes to `_BootloaderType.GECKO_BOOTLOADER_XR` in `determine_bootloader_type()`. * Update the "supported devices" error message in `update_local_firmware` to mention Wi-SUN. XBPL-434 Signed-off-by: David Escalona --- digi/xbee/firmware.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/digi/xbee/firmware.py b/digi/xbee/firmware.py index 16b5eea..a7a45f9 100644 --- a/digi/xbee/firmware.py +++ b/digi/xbee/firmware.py @@ -315,8 +315,12 @@ HardwareVersion.XBEE_XR_900_TH.code, HardwareVersion.XBEE_XR_868_TH.code) -LOCAL_SUPPORTED_HW_VERSIONS = SX_HW_VERSIONS + XBEE3_HW_VERSIONS + XR_HW_VERSIONS +WISUN_HW_VERSIONS = (HardwareVersion.XBEE_WISUN.code, + HardwareVersion.XBEE_WISUN_TH.code) + +LOCAL_SUPPORTED_HW_VERSIONS = SX_HW_VERSIONS + XBEE3_HW_VERSIONS + XR_HW_VERSIONS + WISUN_HW_VERSIONS REMOTE_SUPPORTED_HW_VERSIONS = SX_HW_VERSIONS + XBEE3_HW_VERSIONS + S2C_HW_VERSIONS + XR_HW_VERSIONS +_LOCAL_HW_VERSIONS_STRING = "XBee 3, XBee SX 868/900, XBee XR 868/900, and XBee for Wi-SUN" _log = logging.getLogger(__name__) @@ -1211,7 +1215,7 @@ def determine_bootloader_type(cls, hw_version): return _BootloaderType.GEN3_BOOTLOADER if hw_version in XBEE3_HW_VERSIONS: return _BootloaderType.GECKO_BOOTLOADER - if hw_version in XR_HW_VERSIONS: + if hw_version in XR_HW_VERSIONS or hw_version in WISUN_HW_VERSIONS: return _BootloaderType.GECKO_BOOTLOADER_XR if hw_version in S2C_HW_VERSIONS: return _BootloaderType.EMBER_BOOTLOADER @@ -7276,8 +7280,7 @@ def update_local_firmware(target, xml_fw_file, xbee_firmware_file=None, hw_version = target.get_hardware_version() if hw_version and hw_version.code not in LOCAL_SUPPORTED_HW_VERSIONS: raise OperationNotSupportedException( - "Firmware update only supported in XBee 3, XBee SX 868/900, " - "and XBee XR 868/900" + "Firmware update only supported in " + _LOCAL_HW_VERSIONS_STRING ) # Launch the update process.