Flashing Sonoff ZBDongle-E Firmware under FreeBSD
The recommended way to flash the Sonoff ZBDongle-E is to use a web-based tool. This tool is not available under FreeBSD—the required WebUSB API is only supported in Chrome or Edge, and the FreeBSD build of Chrome does not include it (Edge is out of the picture for obvious reasons).
It is possible to flash the dongle locally - see the official manual and hints for Linux. The following records FreeBSD-specific hints.
-
Install the
lrzszpackage. -
Take the dongle out of the metal case in order to be able to press buttons. See step 4 of official instructions.
-
Insert the dongle and use
/usr/bin/cuto connect to its serial port:
% cu -l /dev/cuaU1 -s 115200
can't open log file /var/log/aculog.
Connected
- Boot the dongle into bootloader mode:
- Press and hold the Boot button
- While holding the Boot button press and relese Reset button.
- Once you get the 'Gecko Bootloader' prompt release the Boot button. This should be almost instant. See expected output below.
Location of buttons on PCB: 
Step 6 of official instructions recommends releasing Boot and Reset together. This didn't work for me, I had to keep Boot pressed until bootloader prompt.
Bootloader prompt output:
% cu -l /dev/cuaU1 -s 115200
can't open log file /var/log/aculog.
Connected
Sonoff v1.0.1
Gecko Bootloader v1.12.00
1. upload gbl
2. run
3. ebl info
BL >
- Type a tilde (~) followed by a capital C, and use the following command to select firmware upload (option 1) mode and transfer the firmware using the XMODEM protocol:
echo -n 1 ; lsx -vX ncp-uart-sw_EZNet7.3.3._V1.0.0.gbl
Here ncp-uart-sw_EZNet7.3.3._V1.0.0.gbl is the firmware file.
Wait until the Transfer complete message appears. The terminal should look as
follows:
% cu -l /dev/cuaU1 -s 115200
can't open log file /var/log/aculog.
Connected
Sonoff v1.0.1
Gecko Bootloader v1.12.00
1. upload gbl
2. run
3. ebl info
BL > ~CLocal command? echo -n 1 ; lsx -vX ncp-uart-sw_EZNet7.3.3._V1.0.0.gbl
Sending ncp-uart-sw_EZNet7.3.3._V1.0.0.gbl, 1871 blocks: Give your local XMODEM receive command now.
Transfer complete
Serial upload complete
Gecko Bootloader v1.12.00
1. upload gbl
2. run
3. ebl info
BL >
Note: Firmware can be found at: