How do you update the firmware of a SONOFF ZBDongle-P?

In this blog post, we are going to explain how you can update the firmware of the SONOFF ZBDongle-P. The advantage of this is that you can then control more Zigbee devices, namely as many as 200 instead of the 40 supported by the default firmware. In addition, several bugs have also been fixed, which means that for example Touchlink will then work.

Updating the Zigbee dongle is done using cc2538-bsl, a Python script created by Jelmer Tiete. This however requires installing the necessary Python modules first. On Debian, you can do this with the following command:

sudo apt install python3 python3-serial python3-intelhex python3-magic git

After this, you can download the script using Git by using the following command:

git clone
cd cc2538-bsl/

Next, you need to download the latest firmware. You can download it here. For the SONOFF ZBDongle-P, you need the zip file of which the name starts with CC1352P2_CC2652P_launchpad_. You need to extract this zip file to a convenient place, such as in that cc2538-bsl folder.

As the final step, you need to flash the firmware. You can do this with the following command:

sudo python3 -ewv -p /dev/ttyUSB0 --bootloader-sonoff-usb ./CC1352P2_CC2652P_launchpad_coordinator_20220219.hex

For this command, make sure to replace ./CC1352P2_CC2652P_launchpad_coordinator_20220219.hex with the correct path to the firmware and replace /dev/ttyUSB0 with the correct path to your Zigbee dongle.

It is also possible to flash the router firmware instead of the coordinator firmware. Then the Zigbee dongle will merely behave like some kind of repeater to extend the mesh network. You can download this firmware here.