Instead of just sending the bootloader skip bytes and connecting a single time, zigpy-znp now connects multiple times (similar to the way Z2M currently does it):
First just connect to the serial port.
If that doesn't work, try sending the bootloader skip bytes and try again.
If that doesn't work, try toggling the RTS pin and try once more.
This increases the chances of a connection attempt succeeding significantly while still taking the same amount of time as before.
A side effect of this change (and the original motivation) is that the CC2530 with an external USB-serial adapter is now fully supported.
To support custom coordinator boards (e.g. where RTS or DTR is mapped to RST), the pin toggling behavior is now configurable as well.
Instead of just sending the bootloader skip bytes and connecting a single time, zigpy-znp now connects multiple times (similar to the way Z2M currently does it):
This increases the chances of a connection attempt succeeding significantly while still taking the same amount of time as before.
A side effect of this change (and the original motivation) is that the CC2530 with an external USB-serial adapter is now fully supported.
To support custom coordinator boards (e.g. where RTS or DTR is mapped to RST), the pin toggling behavior is now configurable as well.