From 93f13a98b2d69734431b101f60bdee81bcc5421c Mon Sep 17 00:00:00 2001 From: Dionysis Grigoropoulos Date: Mon, 14 Aug 2023 20:02:00 +0300 Subject: [PATCH 1/2] rnodeconf: Dump eeprom under specific directory --- RNS/Utilities/rnodeconf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RNS/Utilities/rnodeconf.py b/RNS/Utilities/rnodeconf.py index cbcb0ac..123e614 100644 --- a/RNS/Utilities/rnodeconf.py +++ b/RNS/Utilities/rnodeconf.py @@ -237,6 +237,7 @@ try: EXT_DIR = CNF_DIR+"/extracted" RT_PATH = CNF_DIR+"/recovery_esptool.py" TK_DIR = CNF_DIR+"/trusted_keys" + ROM_DIR = CNF_DIR+"/eeprom" if not os.path.isdir(CNF_DIR): os.makedirs(CNF_DIR) @@ -248,6 +249,8 @@ try: os.makedirs(EXT_DIR) if not os.path.isdir(TK_DIR): os.makedirs(TK_DIR) + if not os.path.isdir(ROM_DIR): + os.makedirs(ROM_DIR) except Exception as e: print("No access to directory "+str(CNF_DIR)+". This utility needs file system access to store firmware and data files. Cannot continue.") @@ -2674,7 +2677,7 @@ def main(): try: timestamp = time.time() filename = str(time.strftime("%Y-%m-%d_%H-%M-%S")) - path = "./eeprom/"+filename+".eeprom" + path = ROM_DIR + filename + ".eeprom" file = open(path, "wb") file.write(rnode.eeprom) file.close() From 91ede526340855258f1913740e49472ca4a7db74 Mon Sep 17 00:00:00 2001 From: Santiago Lema Date: Mon, 14 Aug 2023 20:47:40 +0200 Subject: [PATCH 2/2] Added suggestion to use lower baudrate if flashing fails on ESP32 --- RNS/Utilities/rnodeconf.py | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755 RNS/Utilities/rnodeconf.py diff --git a/RNS/Utilities/rnodeconf.py b/RNS/Utilities/rnodeconf.py old mode 100644 new mode 100755 index cbcb0ac..84d9348 --- a/RNS/Utilities/rnodeconf.py +++ b/RNS/Utilities/rnodeconf.py @@ -2467,6 +2467,9 @@ def main(): RNS.log("Waiting for ESP32 reset...") time.sleep(7) else: + RNS.log("Non-zero return code ("+str(flash_status)+") while flashing") + RNS.log("Try again with slower speeds for example like this:") + RNS.log("rnodeconf --autoinstall --baud-flash 115200") exit() except Exception as e: