Skip to content

Commit 688c6ae

Browse files
committed
Skip bootloader when the config is set to skip
On SMLIGHT SLZB-06 devices in USB mode the skip bootloader sequence causes the esp32 in these devices to reset. While there is a config option to disable skip bootloader, it is not hooked up. Ensure that it is possible to disable skip bootloader.
1 parent 92eef38 commit 688c6ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

zigpy_znp/api.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,12 @@ async def connect(self, *, test_port=True) -> None:
734734
# prevent any data from being sent
735735
if test_port:
736736
# The reset indication callback is sent when some sticks start up
737-
self.capabilities = (await self._skip_bootloader()).Capabilities
737+
if self._config[conf.CONF_ZNP_CONFIG][conf.CONF_SKIP_BOOTLOADER]:
738+
self.capabilities = (await self._skip_bootloader()).Capabilities
739+
else:
740+
self.capabilities = (
741+
await self.request(c.SYS.Ping.Req())
742+
).Capabilities
738743

739744
# We need to know how structs are packed to deserialize frames correctly
740745
await self.nvram.determine_alignment()

0 commit comments

Comments
 (0)