From a840bd4aaf3715749471feb2844ff0dcf281c237 Mon Sep 17 00:00:00 2001 From: jeremy Date: Sat, 31 Aug 2024 23:39:36 -0400 Subject: [PATCH 1/7] changes needed to support the t-echo device --- RNS/Utilities/rnodeconf | 1 + RNS/Utilities/rnodeconf.py | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 120000 RNS/Utilities/rnodeconf diff --git a/RNS/Utilities/rnodeconf b/RNS/Utilities/rnodeconf new file mode 120000 index 0000000..dca04fb --- /dev/null +++ b/RNS/Utilities/rnodeconf @@ -0,0 +1 @@ +rnodeconf.py \ No newline at end of file diff --git a/RNS/Utilities/rnodeconf.py b/RNS/Utilities/rnodeconf.py index 566df60..a54d6e1 100755 --- a/RNS/Utilities/rnodeconf.py +++ b/RNS/Utilities/rnodeconf.py @@ -131,6 +131,7 @@ class ROM(): PRODUCT_RAK4631 = 0x10 MODEL_11 = 0x11 MODEL_12 = 0x12 + PRODUCT_TECHO = 0x43 PRODUCT_RNODE = 0x03 MODEL_A1 = 0xA1 @@ -200,6 +201,7 @@ class ROM(): BOARD_GENERIC_ESP32 = 0x35 BOARD_LORA32_V2_0 = 0x36 BOARD_LORA32_V2_1 = 0x37 + BOARD_TECHO = 0x43 BOARD_RAK4631 = 0x51 MANUAL_FLASH_MODELS = [MODEL_A1, MODEL_A6] @@ -214,6 +216,7 @@ products = { ROM.PRODUCT_T32_21: "LilyGO LoRa32 v2.1", ROM.PRODUCT_H32_V2: "Heltec LoRa32 v2", ROM.PRODUCT_H32_V3: "Heltec LoRa32 v3", + ROM.PRODUCT_TECHO: "LilyGO T-Echo", ROM.PRODUCT_RAK4631: "RAK4631", } @@ -233,6 +236,7 @@ mcus = { models = { 0x11: [430000000, 510000000, 22, "430 - 510 MHz", "rnode_firmware_rak4631.zip", "SX1262"], 0x12: [779000000, 928000000, 22, "779 - 928 MHz", "rnode_firmware_rak4631.zip", "SX1262"], + 0x43: [779000000, 928000000, 22, "779 - 928 Mhz", "rnode_firmware_techo.zip", "SX1262"], 0xA4: [410000000, 525000000, 14, "410 - 525 MHz", "rnode_firmware.hex", "SX1278"], 0xA9: [820000000, 1020000000, 17, "820 - 1020 MHz", "rnode_firmware.hex", "SX1276"], 0xA1: [410000000, 525000000, 22, "410 - 525 MHz", "rnode_firmware_t3s3.zip", "SX1268"], @@ -1603,6 +1607,7 @@ def main(): print("[8] Heltec LoRa32 v3") print("[9] LilyGO LoRa T3S3") print("[10] RAK4631") + print("[11] LilyGo T-Echo") print(" .") print(" / \\ Select one of these options if you want to easily turn") print(" | a supported development board into an RNode.") @@ -1756,6 +1761,19 @@ def main(): print("who would like to experiment with it. Hit enter to continue.") print("---------------------------------------------------------------------------") input() + elif c_dev == 11: + selected_product = ROM.PRODUCT_TECHO + clear() + print("") + print("---------------------------------------------------------------------------") + print(" LilyGo T-Echo RNode Installer") + print("") + print("Important! Using RNode firmware on LilyGo T-Echo devices should currently be") + print("considered experimental. It is not intended for production or critical use.") + print("The currently supplied firmware is provided AS-IS as a courtesey to those") + print("who would like to experiment with it. Hit enter to continue.") + print("---------------------------------------------------------------------------") + input() except Exception as e: print("That device type does not exist, exiting now.") graceful_exit() @@ -2042,6 +2060,21 @@ def main(): except Exception as e: print("That band does not exist, exiting now.") graceful_exit() + elif selected_product == ROM.PRODUCT_TECHO: + selected_mcu = ROM.MCU_NRF52 + print("\nWhat band is this T-Echo for?\n") + print("[1] 915 MHz") + print("\n? ", end="") + try: + c_model = int(input()) + if c_model < 1 or c_model > 1: + raise ValueError() + elif c_model == 1: + selected_model = ROM.PRODUCT_TECHO + selected_platform = ROM.PLATFORM_NRF52 + except Exception as e: + print("That band does not exist, exiting now.") + graceful_exit() if selected_model != ROM.MODEL_FF and selected_model != ROM.MODEL_FE: fw_filename = models[selected_model][4] From 65a40aefb69e7d47df56df2be3c35882ac8e9249 Mon Sep 17 00:00:00 2001 From: jeremy Date: Tue, 3 Sep 2024 01:57:07 -0400 Subject: [PATCH 2/7] trying to get techo working --- Makefile | 2 +- RNS/Interfaces/RNodeInterface.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ed0fe8b..12e56c5 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ all: release test: @echo Running tests... - python -m tests.all + python3 -m tests.all clean: @echo Cleaning... diff --git a/RNS/Interfaces/RNodeInterface.py b/RNS/Interfaces/RNodeInterface.py index 00c97a4..bdfc6bc 100644 --- a/RNS/Interfaces/RNodeInterface.py +++ b/RNS/Interfaces/RNodeInterface.py @@ -472,13 +472,13 @@ class RNodeInterface(Interface): RNS.log("Bandwidth mismatch", RNS.LOG_ERROR) self.validcfg = False if (self.txpower != self.r_txpower): - RNS.log("TX power mismatch", RNS.LOG_ERROR) + RNS.log("TX power mismatch: " + str(self.txpower) + " vs " + str(self.r_txpower), RNS.LOG_ERROR) self.validcfg = False if (self.sf != self.r_sf): RNS.log("Spreading factor mismatch", RNS.LOG_ERROR) self.validcfg = False if (self.state != self.r_state): - RNS.log("Radio state mismatch", RNS.LOG_ERROR) + RNS.log("Radio state mismatch: " + str(self.state) + " vs " + str(self.r_state), RNS.LOG_ERROR) self.validcfg = False if (self.validcfg): From 625db2622d8ed15930e14c3dbe9c32b095a21b9f Mon Sep 17 00:00:00 2001 From: jeremy Date: Tue, 3 Sep 2024 17:09:59 -0400 Subject: [PATCH 3/7] Pushing changes to branch --- RNS/Interfaces/RNodeInterface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RNS/Interfaces/RNodeInterface.py b/RNS/Interfaces/RNodeInterface.py index bdfc6bc..b9a71df 100644 --- a/RNS/Interfaces/RNodeInterface.py +++ b/RNS/Interfaces/RNodeInterface.py @@ -622,7 +622,7 @@ class RNodeInterface(Interface): self.r_state = byte if self.r_state: pass - #RNS.log(str(self)+" Radio reporting state is online", RNS.LOG_DEBUG) + RNS.log(str(self)+" Radio reporting state is online", RNS.LOG_DEBUG) else: RNS.log(str(self)+" Radio reporting state is offline", RNS.LOG_DEBUG) From 5166596375b4cf4b6ee73a98cff80c3f83ddcb8a Mon Sep 17 00:00:00 2001 From: jeremybox <33465600+jeremybox@users.noreply.github.com> Date: Tue, 3 Sep 2024 17:14:07 -0400 Subject: [PATCH 4/7] Update RNodeInterface.py reverts extra debugging message detail --- RNS/Interfaces/RNodeInterface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RNS/Interfaces/RNodeInterface.py b/RNS/Interfaces/RNodeInterface.py index b9a71df..b8c2894 100644 --- a/RNS/Interfaces/RNodeInterface.py +++ b/RNS/Interfaces/RNodeInterface.py @@ -472,13 +472,13 @@ class RNodeInterface(Interface): RNS.log("Bandwidth mismatch", RNS.LOG_ERROR) self.validcfg = False if (self.txpower != self.r_txpower): - RNS.log("TX power mismatch: " + str(self.txpower) + " vs " + str(self.r_txpower), RNS.LOG_ERROR) + RNS.log("TX power mismatch", RNS.LOG_ERROR) self.validcfg = False if (self.sf != self.r_sf): RNS.log("Spreading factor mismatch", RNS.LOG_ERROR) self.validcfg = False if (self.state != self.r_state): - RNS.log("Radio state mismatch: " + str(self.state) + " vs " + str(self.r_state), RNS.LOG_ERROR) + RNS.log("Radio state mismatch", RNS.LOG_ERROR) self.validcfg = False if (self.validcfg): From 8193f3621c2193d7b048d98b5436fbfc15b7aa8d Mon Sep 17 00:00:00 2001 From: jeremy Date: Tue, 3 Sep 2024 17:16:41 -0400 Subject: [PATCH 5/7] remove symlink --- RNS/Utilities/rnodeconf | 1 - 1 file changed, 1 deletion(-) delete mode 120000 RNS/Utilities/rnodeconf diff --git a/RNS/Utilities/rnodeconf b/RNS/Utilities/rnodeconf deleted file mode 120000 index dca04fb..0000000 --- a/RNS/Utilities/rnodeconf +++ /dev/null @@ -1 +0,0 @@ -rnodeconf.py \ No newline at end of file From b4ac3df2d06fbe63a8e894a4e3e3156bf4909cd9 Mon Sep 17 00:00:00 2001 From: jeremy Date: Tue, 3 Sep 2024 17:24:11 -0400 Subject: [PATCH 6/7] remove t-echo menu items --- RNS/Utilities/rnodeconf.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/RNS/Utilities/rnodeconf.py b/RNS/Utilities/rnodeconf.py index a54d6e1..2e000c0 100755 --- a/RNS/Utilities/rnodeconf.py +++ b/RNS/Utilities/rnodeconf.py @@ -1607,7 +1607,8 @@ def main(): print("[8] Heltec LoRa32 v3") print("[9] LilyGO LoRa T3S3") print("[10] RAK4631") - print("[11] LilyGo T-Echo") + #TODO: Implement T-Echo + #print("[11] LilyGo T-Echo") print(" .") print(" / \\ Select one of these options if you want to easily turn") print(" | a supported development board into an RNode.") @@ -1762,6 +1763,10 @@ def main(): print("---------------------------------------------------------------------------") input() elif c_dev == 11: + #TODO: Implement T-Echo + print("That device type does not exist, exiting now.") + graceful_exit() + #The code below will never execute until the exit is removed from the line above when T-Echo is implemented: selected_product = ROM.PRODUCT_TECHO clear() print("") From 9a20a3929af5d54597e61eb4b976d1ffb006e15a Mon Sep 17 00:00:00 2001 From: jeremy Date: Sat, 7 Sep 2024 19:17:06 -0400 Subject: [PATCH 7/7] correct t-echo model --- RNS/Utilities/rnodeconf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RNS/Utilities/rnodeconf.py b/RNS/Utilities/rnodeconf.py index 2e000c0..173c493 100755 --- a/RNS/Utilities/rnodeconf.py +++ b/RNS/Utilities/rnodeconf.py @@ -131,7 +131,7 @@ class ROM(): PRODUCT_RAK4631 = 0x10 MODEL_11 = 0x11 MODEL_12 = 0x12 - PRODUCT_TECHO = 0x43 + PRODUCT_TECHO = 0x15 PRODUCT_RNODE = 0x03 MODEL_A1 = 0xA1 @@ -236,7 +236,7 @@ mcus = { models = { 0x11: [430000000, 510000000, 22, "430 - 510 MHz", "rnode_firmware_rak4631.zip", "SX1262"], 0x12: [779000000, 928000000, 22, "779 - 928 MHz", "rnode_firmware_rak4631.zip", "SX1262"], - 0x43: [779000000, 928000000, 22, "779 - 928 Mhz", "rnode_firmware_techo.zip", "SX1262"], + 0x15: [779000000, 928000000, 22, "779 - 928 Mhz", "rnode_firmware_techo.zip", "SX1262"], 0xA4: [410000000, 525000000, 14, "410 - 525 MHz", "rnode_firmware.hex", "SX1278"], 0xA9: [820000000, 1020000000, 17, "820 - 1020 MHz", "rnode_firmware.hex", "SX1276"], 0xA1: [410000000, 525000000, 22, "410 - 525 MHz", "rnode_firmware_t3s3.zip", "SX1268"],