mirror of
https://github.com/meshtastic/python.git
synced 2026-09-12 13:27:24 -04:00
Skip node DB fetch during --ota-update / --reboot-ota
OTA only needs the local node to send the startOTA admin request and then streams firmware directly to the loader over WiFi; it never reads the node DB. On a device with a large node DB the initial dump can stall and the firmware closes the API connection before it processes the OTA request, so OTA silently fails. Imply --no-nodes for --ota-update / --reboot-ota. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
19d066970e
commit
ef9cdc34a4
1 file changed
+6
@@ -1590,6 +1590,12 @@ def common():
|
||||
if not os.path.isfile(args.ota_update):
|
||||
meshtastic.util.our_exit(f"Error: OTA firmware file not found: {args.ota_update}", 1)
|
||||
|
||||
# OTA (WiFi/BLE) only needs the local node to send the admin request and then
|
||||
# streams the firmware directly; it never reads the node DB. Skip fetching it so a
|
||||
# large node DB dump can't stall/close the connection before the OTA request lands.
|
||||
if getattr(args, "ota_update", None) or getattr(args, "reboot_ota", False):
|
||||
args.no_nodes = True
|
||||
|
||||
if have_powermon:
|
||||
create_power_meter()
|
||||
|
||||
|
||||
Reference in new issue
Block a user