Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions digi/xbee/firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions digi/xbee/models/hw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down