From 3a7d7ed5690164917f2cd270c0f4738918aa7298 Mon Sep 17 00:00:00 2001 From: Eduardo Contreras Date: Thu, 5 Dec 2024 13:28:51 -0600 Subject: [PATCH 1/3] update programing tool for dault speed of 921600 --- catnip_uploader/cc2538.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catnip_uploader/cc2538.py b/catnip_uploader/cc2538.py index 4d07243..f66c4e7 100644 --- a/catnip_uploader/cc2538.py +++ b/catnip_uploader/cc2538.py @@ -196,7 +196,7 @@ class CommandInterface(object): ACK_BYTE = 0xCC NACK_BYTE = 0x33 - def open(self, aport=None, abaudrate=500000): + def open(self, aport=None, abaudrate=921600): # Try to create the object using serial_for_url(), or fall back to the # old serial.Serial() where serial_for_url() is not supported. # serial_for_url() is a factory class and will return a different @@ -1074,7 +1074,7 @@ def usage(): -r Read -l length Length of read -p port Serial port (default: first USB-like port in /dev) - -b baud Baud speed (default: 500000) + -b baud Baud speed (default: 921600) -a addr Target address -i, --ieee-address addr Set the secondary 64 bit IEEE address --bootloader-active-high Use active high signals to enter bootloader @@ -1095,7 +1095,7 @@ def usage(): conf = { "port": "auto", - "baud": 500000, + "baud": 921600, "force_speed": 0, "address": None, "force": 0, From 025f4bd76f4934f3f10ce92b04b88975144d95e5 Mon Sep 17 00:00:00 2001 From: Eduardo Contreras Date: Thu, 5 Dec 2024 14:01:44 -0600 Subject: [PATCH 2/3] return to velocity of 500000 --- catnip_uploader/cc2538.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catnip_uploader/cc2538.py b/catnip_uploader/cc2538.py index f66c4e7..4d07243 100644 --- a/catnip_uploader/cc2538.py +++ b/catnip_uploader/cc2538.py @@ -196,7 +196,7 @@ class CommandInterface(object): ACK_BYTE = 0xCC NACK_BYTE = 0x33 - def open(self, aport=None, abaudrate=921600): + def open(self, aport=None, abaudrate=500000): # Try to create the object using serial_for_url(), or fall back to the # old serial.Serial() where serial_for_url() is not supported. # serial_for_url() is a factory class and will return a different @@ -1074,7 +1074,7 @@ def usage(): -r Read -l length Length of read -p port Serial port (default: first USB-like port in /dev) - -b baud Baud speed (default: 921600) + -b baud Baud speed (default: 500000) -a addr Target address -i, --ieee-address addr Set the secondary 64 bit IEEE address --bootloader-active-high Use active high signals to enter bootloader @@ -1095,7 +1095,7 @@ def usage(): conf = { "port": "auto", - "baud": 921600, + "baud": 500000, "force_speed": 0, "address": None, "force": 0, From 159a660760f34318a4b7f18d3c58134297713609 Mon Sep 17 00:00:00 2001 From: Eduardo Contreras Date: Fri, 6 Dec 2024 14:23:42 -0600 Subject: [PATCH 3/3] add support for different python magic return --- catnip_uploader/cc2538.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/catnip_uploader/cc2538.py b/catnip_uploader/cc2538.py index 4d07243..ded9096 100644 --- a/catnip_uploader/cc2538.py +++ b/catnip_uploader/cc2538.py @@ -139,6 +139,9 @@ def __init__(self, path): if file_type == "text/plain": firmware_is_hex = True mdebug(5, "Firmware file: Intel Hex") + elif file_type == "text/x-hex": + firmware_is_hex = True + mdebug(5, "Firmware file: Intel Hex") elif file_type == "application/octet-stream": mdebug(5, "Firmware file: Raw Binary") else: