Flashing the Sonoff ZigBee 3.0 USB Dongle
Flashing this device to the latest firmware is fairly straight forward. The reason I wanted to flash the device is because I want to use this as the ZigBee controller for my Phillips Hue lights and I want to control them via HomeAssistant and by flashing the device, it will support more devices and have the latest bug fixes. Follow the steps below to flash your Sonoff Device.
We are going to be using a python script so there is no need to open the device and hold the boot button.
Firstly plugin the device and then install the universal windows driver. The following link will download a folder extract the folder and then right click on the silabser.inf file and click install.
Next, you need to download the firmware. Go to the below repo and download the below file and extract it. There will be a single file in there which ends with .hex .
Next, you need to download the python script to perform the flashing. Download the below repo and extract it.
This repo contains the python script to download the folder. In the folder, add the .hex file. Your folder should look like the below.
Now when I ran this i got the following error.
ERROR: int() can't convert non-string with explicit base
In the cc2538-bsl.py file, go to line 1224 and change it to the below
if args.ieee_address:
Next you need to make sure you have python installed, so go ahead and install python but make sure to add python to you Environment Variables which you can do via the "Advanced Installation".
Once you have installed python you need to install two packages. Open the command prompt and run the below commands on at a time.
pip install pyserial
pip install intelhex
Now the final part. Once you have done all the above, run the below command from the directory of the python script so for example C:\Users\MyUser\Downloads\cc2538-bsl-master\cc2538-bsl-master>
python cc2538-bsl.py -p COM3 -e -v -w --bootloader-sonoff-usb CC1352P2_CC2652P_launchpad_coordinator_20240710.hex
The output should look like the below
That's it, you can now unplug your Sonoff dongle and plug it into your PC and you can then use home assistant to hang it all together via Zigbee2Mqtt.