Skip to content

Commit

Permalink
Skip bootloader when the config is set to skip
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tl-sl committed Jul 10, 2024
1 parent 92eef38 commit 9ea0e02
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zigpy_znp/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,12 @@ async def connect(self, *, test_port=True) -> None:
# prevent any data from being sent
if test_port:
# The reset indication callback is sent when some sticks start up
self.capabilities = (await self._skip_bootloader()).Capabilities
if self._znp_config[conf.CONF_SKIP_BOOTLOADER]:
self.capabilities = (await self._skip_bootloader()).Capabilities
else:
self.capabilities = (
await self.request(c.SYS.Ping.Req())
).Capabilities

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

0 comments on commit 9ea0e02

Please sign in to comment.