From df92fb1bcf6a6edad37f1f5592a6d5273073330b Mon Sep 17 00:00:00 2001 From: liamcottle Date: Wed, 29 May 2024 11:32:20 +1200 Subject: [PATCH 1/2] fix for macOS failing to set firmware hash on NRF52 when resetting too quickly --- RNS/Utilities/rnodeconf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RNS/Utilities/rnodeconf.py b/RNS/Utilities/rnodeconf.py index 67763e3..068212d 100755 --- a/RNS/Utilities/rnodeconf.py +++ b/RNS/Utilities/rnodeconf.py @@ -3440,6 +3440,10 @@ def main(): time.sleep(6.5) elif rnode.platform == ROM.PLATFORM_NRF52: + # Wait a few seconds before hard resetting. + # Otherwise, macOS fails to set firmware hash on NRF52 + time.sleep(5) + rnode.hard_reset() # The hard reset on this platform is different # to that of the ESP32 platform, it causes From c4705fd594528e284f1ac489c9f51d08bcb4e817 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Fri, 31 May 2024 13:12:39 +1200 Subject: [PATCH 2/2] check platform is macos before delaying nrf52 reset --- RNS/Utilities/rnodeconf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RNS/Utilities/rnodeconf.py b/RNS/Utilities/rnodeconf.py index 068212d..29f91b9 100755 --- a/RNS/Utilities/rnodeconf.py +++ b/RNS/Utilities/rnodeconf.py @@ -3442,7 +3442,8 @@ def main(): elif rnode.platform == ROM.PLATFORM_NRF52: # Wait a few seconds before hard resetting. # Otherwise, macOS fails to set firmware hash on NRF52 - time.sleep(5) + if RNS.vendor.platformutils.is_darwin(): + time.sleep(5) rnode.hard_reset() # The hard reset on this platform is different