Migrating zigbee devices from sonoff dongle E

@darkxst I got the ZB-GW04 1.2 today and flashed the Openthread RCP using the web flasher. Flashing was successful, but after this homeassistant wasn’t able to find it as a border router.

I tried to use the web flasher and the connection was failing this time with the below logs.

2023-10-12 18:26:17 emscripten universal_silabs_flasher.flasher[42] INFO Probing ApplicationType.EZSP at 115200 baud
2023-10-12 18:26:17 emscripten zigpy.serial[42] DEBUG Opening a serial connection to '/dev/webserial' (115200 baudrate)
2023-10-12 18:26:17 emscripten bellows.ezsp[42] DEBUG Resetting EZSP
2023-10-12 18:26:17 emscripten bellows.uart[42] DEBUG Resetting ASH
2023-10-12 18:26:17 emscripten bellows.uart[42] DEBUG Sending: b'1ac038bc7e'
2023-10-12 18:26:22 emscripten bellows.uart[42] DEBUG Connection lost: None
2023-10-12 18:26:22 emscripten bellows.uart[42] DEBUG Closed serial connection
2023-10-12 18:26:22 emscripten universal_silabs_flasher.flasher[42] INFO Probing ApplicationType.SPINEL at 460800 baud
2023-10-12 18:26:22 emscripten zigpy.serial[42] DEBUG Opening a serial connection to '/dev/webserial' (460800 baudrate)
2023-10-12 18:26:22 emscripten universal_silabs_flasher.common[42] DEBUG Connection made: <webserial_transport.WebSerialTransport object at 0x18e29c8>
2023-10-12 18:26:22 emscripten universal_silabs_flasher.spinel[42] DEBUG Sending frame SpinelFrame(header=SpinelHeader(transaction_id=3, network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02')
2023-10-12 18:26:22 emscripten universal_silabs_flasher.common[42] DEBUG Sending data b'~\x83\x02\x02\xe65~'
2023-10-12 18:26:23 emscripten universal_silabs_flasher.spinel[42] DEBUG Failed to send SpinelFrame(header=SpinelHeader(network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02'), trying again in 0.10s (attempt 1 of 4)
2023-10-12 18:26:23 emscripten universal_silabs_flasher.spinel[42] DEBUG Sending frame SpinelFrame(header=SpinelHeader(transaction_id=3, network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02')
2023-10-12 18:26:23 emscripten universal_silabs_flasher.common[42] DEBUG Sending data b'~\x83\x02\x02\xe65~'
2023-10-12 18:26:24 emscripten universal_silabs_flasher.spinel[42] DEBUG Failed to send SpinelFrame(header=SpinelHeader(network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02'), trying again in 0.10s (attempt 2 of 4)
2023-10-12 18:26:24 emscripten universal_silabs_flasher.spinel[42] DEBUG Sending frame SpinelFrame(header=SpinelHeader(transaction_id=3, network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02')
2023-10-12 18:26:24 emscripten universal_silabs_flasher.common[42] DEBUG Sending data b'~\x83\x02\x02\xe65~'
2023-10-12 18:26:26 emscripten universal_silabs_flasher.spinel[42] DEBUG Failed to send SpinelFrame(header=SpinelHeader(network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02'), trying again in 0.10s (attempt 3 of 4)
2023-10-12 18:26:26 emscripten universal_silabs_flasher.spinel[42] DEBUG Sending frame SpinelFrame(header=SpinelHeader(transaction_id=3, network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02')
2023-10-12 18:26:26 emscripten universal_silabs_flasher.common[42] DEBUG Sending data b'~\x83\x02\x02\xe65~'
2023-10-12 18:26:27 emscripten universal_silabs_flasher.spinel[42] DEBUG Failed to send SpinelFrame(header=SpinelHeader(network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02'), trying again in 0.10s (attempt 4 of 4)

I then tried the universal-silabs-flasher python script and that was not able to probe as well. I was finally able to flash a zigbee firmware using SecureCRT. After this, the web flasher detects it again and able to flash the Openthread firmware. This was again bricked. Flashed Zigbee firmware again with SecureCRT and the tried the Multi PAN firmware. This seems to work fine. After flashing multi pan, The web flasher can still connect to the device.

Now I have multi pan firmware running, but will only using this stick for Thread.

Wondering if there could be a bug with the Openthread flashing with the web flasher…

1 Like

It is likely to do with baudrates
Web flasher for ZB-GW04 uses 230400 baudrate for Openthread and Multipan firmwares. This device simply cant handle any faster baudrates even with the hardware flow control in v1.2.
Universal-silabs-flasher by default only probes Spinel (Openthread) for 460800 though, this was also the default in webflasher. I just pushed a commit to fix probing of web flasher in this case. If you are using universal-silabs-flasher directly you need to specify the baudrate for spinel manually. Also when you setup OTBR, make sure you select 230400 baudrate.

1 Like

Just tried again with the web flasher. Still the same issue. I get an installation successful after flashing openthread. After this, the device is basically bricked. Can only be reflashed using secureCRT.

Once flashed the zigbee firmware with secureCRT again the web flasher can detect it.

I doubt its bricked, but if baudrates dont match, it wont probe.

Btw are you using this link for web flasher (I havent updated the older sl-test links)

After flashing the Openthread firmware try this command
universal-silabs-flasher --device /dev/ttyUSB0 --spinel-baudrate 230400 probe

@darkxst u are right. I was using the sl-test webpage. I tried from the above provided link and it works this time. After flashing the openthread firmware, I can still connect to the device.Thanks very much for your help.

I have now connected the flashed usb to Home Assistant and was expecting to see a open thread border router, but don’t see any in home assistant. Is this the expected outcome? When I had the Multi protocol firmware and the silicon labs addon, I was seeing a border router.

All sorted now. I had to manually install the Openthread border router add on :slight_smile:.