Skip to content

Commit 64282d3

Browse files
committed
Do not bypass the bootloader in tools that require the bootloader
1 parent 7e93674 commit 64282d3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

zigpy_znp/tools/flash_read.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717

1818

1919
async def read_firmware(radio_path: str) -> bytearray:
20-
znp = ZNP(CONFIG_SCHEMA({"device": {"path": radio_path}}))
20+
znp = ZNP(
21+
CONFIG_SCHEMA(
22+
{"znp_config": {"skip_bootloader": False}, "device": {"path": radio_path}}
23+
)
24+
)
2125

2226
# The bootloader handshake must be the very first command
2327
await znp.connect(test_port=False)

zigpy_znp/tools/flash_write.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ async def write_firmware(firmware: bytes, radio_path: str):
7171
f"Expected 0x{expected_crc:04X}, got 0x{computed_crc:04X}"
7272
)
7373

74-
znp = ZNP(CONFIG_SCHEMA({"device": {"path": radio_path}}))
74+
znp = ZNP(
75+
CONFIG_SCHEMA(
76+
{"znp_config": {"skip_bootloader": False}, "device": {"path": radio_path}}
77+
)
78+
)
7579

7680
# The bootloader handshake must be the very first command
7781
await znp.connect(test_port=False)

0 commit comments

Comments
 (0)