Flashing a Sonoff Zigbee Dongle P to be used as a router
I recently changed my Sonoff Zigbee Dongle P coordinator for a SMlight SLZB-06U. As it's a little bit more powerful 'antenna wise' , also being easier to update and install anywhere using a POE connection and so I had my Sonoff Dongle lying around doing nothing.
I'd seen posts about changing the Dongle to a router by flashing it, but every time I read these they were always too complicated to bother with, and then I came across the below post.
https://blog.bitscry.com/2025/05/07/adding-a-sonoff-zigbee-dongle-plus-p-router-to-zigbee2mqtt/
Now this post is perfect, and seemed easy to do. So to be honest I have just copied everything below, changed very little, apart from the sudo apt to sudo pacman as I flashed my dongle using CachyOS which is a Arch-based Linux and changed some pythons names as they are slightly different in Arch Linux and added permissions, because Arch requires a bit more explicit permission handling.
-
Install required packages
sudo pacman -S python python-pyserial python-intelhex python-magic wget git unzip
sudo usermod -aG uucp yourusername
Note If you are on Arch, the serial access often requires membership in the uucp group, which is consistent with Arch-style /dev/ttyUSB* access handling -
Install flashing software
cd ~
git clone https://github.com/JelmerT/cc2538-bsl/
cd ~/cc2538-bsl -
Download router software
wget https://raw.githubusercontent.com/Koenkk/Z-Stack-firmware/refs/tags/Z-Stack_3.x.0_router_20221102/router/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_router_20221102.zip -O router-firmware.zip
unzip -j router-firmware.zip
mv CC1352P2_CC2652P_launchpad_router*.hex router-firmware.hex
Note This software is about three years old but I checked and it's still the latest version https://github.com/Koenkk/Z-Stack-firmware/releases -
Identify the serial device. in my case is ttyUSB0
ls -l /dev/serial/by-id -
Flash the dongle
python cc2538_bsl/cc2538_bsl.py -ewv -p /dev/serial/by-id/usb-ITead_SONOFF_Zigbee_3.0_USB_Dongle_P_0001-if00-port0 --bootloader-sonoff-usb router-firmware.hex
If all goes well, the dongle is now re-flashed. I unplugged it, set Zigbee2MQTT to Permit Join and plugged it back in. It joined immediately and I now have a decent router for the Zigbee mesh.
So many thanks to Shinigami and his above article. I couldn't have flashed my dongle or written this post with his blog post.