Sonoff ZBDongle-E is quite powerful Zigbee dongle. By default, it's loaded with coordinator firmware. This how to article contains steps cheatsheet to flash it with router firmware under NixOS.
Disclaimer: This how to is intended for advanced users. You should be able to understand what commands are doing, before copy-pasting and executing them.
Preparation
Prepare following:
- download the firmware from itead's github,
- disassembly the device:
- access to board's buttons is needed,
- figure out
/dev/ttyXXX
under which device becomes available - see constants to modify below.
Modify constants in commands
Flashing steps contain constants, which vary in different environments, or after some time:
/dev/ttyFIGURE_OUT
:- location of
tty
device for the Sonoff ZBDongle-E, - figure out via - simple way:
- run
ls -ld /dev/tty*
, - connect the device,
- run
ls -ld /dev/tty*
again, - find the difference - new line for the device,
- run
- location of
Z3RouterUSBDonlge_EZNet6.10.3_V1.0.0.gbl
:- firmware file name - will change if a new version is released.
Steps
With prerequisites prepared, flashing can be performed using following steps:
- connect the board to computer:
- extension cable can make it more convenient to access buttons on the board,
- connect to device's serial:
nix-shell -p putty sudo putty -serial -sercfg 115200,8,n,1 /dev/ttyFIGURE_OUT
- enter bootloader mode:
- press and hold BOOT,
- then press RST,
- then release BOOT,
- perform upload:
- open another terminal:
nix-shell -p lrzsz cd directory/containing/the-firmware/in-it
- confirm upload start via putty:
- press 1 to selecting "upload gbl"
- execute the upload in terminal - run:
sudo bash -c 'sx Z3RouterUSBDonlge_EZNet6.10.3_V1.0.0.gbl < /dev/ttyFIGURE_OUT > /dev/ttyFIGURE_OUT'
- wait for completion:
Sending Z3RouterUSBDonlge_EZNet6.10.3_V1.0.0.gbl, 2244 blocks: Give your local XMODEM receive command now. Bytes Sent: 287360 BPS:9008 Transfer complete
- open another terminal:
- pairing:
- reboot board by pressing "2" in putty to select "run",
- enable pairing mode for your Zigbee network,
- wait for Sonoff ZBDongle-E to pair,
- turn off pairing mode for the Zigbee network.
- unplug the board, and assembly it back.