Introduction
I bought some Sonoff Zigbee 3.0 USB Dongle Plus E and wanted to use one as coordinator and all others as routers. However they come all configured by default as coordinators. As it took me a long time to find out how do do it on Linux, I share below how I did it so that you can do it quicker than me.
Here are the steps to follow.
Download the latest firmware
You get the latest firmware from GitHub:
$ git clone https://github.https://github.com/itead/Sonoff_Zigbee_Dongle_Firmware.git
In folder Dongle-E
you find 2 sub-folders called NCP
(for the coordinator firmware) and Router
. They contain the firmware file: in Dongle-E/Router
, you can find the latest firmware as router. At the date of this article (21-Jan-2024), the firmware file name is Z3RouterUSBDonlge_EZNet6.10.3_V1.0.0.gbl
.
Open the Dongle, plug it to the PC and get its device path
- Remove the 2 screws on the antenna side and get the dongle out of its casing. It is easier to do the following steps when the antenna is in a longitudinal position or not plugged.
- Plug the dongle to the PC.
- Get the device path: get the latest line returned by
dmesg
containingtty
:
$ dmesg|grep tty|tail -1
[ 7307.785188] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
The device path is in this case /dev/ttyACM0
. Remember it for the next steps.
Connect to the dongle with Putty
Install Putty with your package manager. For example, on Fedora, you can do:
$ sudo dnf install putty
Run Putty and start a serial connection with your device:
- Select Category Session, Serial as Connection type and input your device path (
/dev/ttyACM0
) in Serial line and115200
in Speed.
- Select Category Connection/Serial and type in:
- Speed (baud):
115200
- Data bits:
8
- Stop bits:
1
- Parity:
None
- Flow control:
None
- Click on Open. You should get a black window like this:
Launch the bootloader and upload the firmware
You then need to launch the bootloader on the device. This is the tricky part! It is done physically on the device itself. You can see 2 small round black buttons next to each others. To launch the bootloader, you use your index thumbnail to click with a rotating movement first on the reset button (RST
) then on the boot button (BOOT
). This will (i) click RST
, (ii) click BOOT
, (iii) release RST
, (iv) release BOOT
.
When this is done, the Putty terminal show the bootloader menu:
Upload the Router firmware
- Open a terminal and go in the directory cloned from GitHub, subdirectory
Dongle-E/Router
.
Check that you have the programsx
withsx --version
. If you do not have it, install packagelrzsz
with your package manager. For example on Fedora:
$ sudo dnf install lrzsz
Prepare the following command (replace the firmware file name and the device path by the ones you determined above in section 1. and 2.) and wait before pressing Enter:
$ sx -vv Z3RouterUSBDonlge_EZNet6.10.3_V1.0.0.gbl < /dev/ttyACM0 > /dev/ttyACM0
- In the Putty terminal, press
1
(upload gbl). You will seebegin upload
followed by a line ofC
. - Go back to the terminal where you prepared the
sx
command and press enter before theC
line ends. The upload will start and you will see the progress:
When the upload is complete, here is what you can see:Serial upload complete
- Finally, you can press
2
(run) in the Putty terminal to restart the Dongle as Router and you can start the usual addition of device to the Zigbee Home Automation integration.