Photo by Alex Cheung / Unsplash

Sonoff Zigbee 3.0 USB Dongle & Synology

synology Nov 23, 2024

I had some issues getting my Sonoff Zigbee USB stick working with my Synology running DSM 7.2 but found some useful information in some forums or on GitHub and wanted to summarize my findings.

Credits:
- https://forum.iobroker.net/topic/72266/sonoff-zigbee-3-0-usb-dongle-plus-cc2652p-auf-synology
- https://github.com/robertklep/dsm7-usb-serial-drivers

I'm using SONOFF Zigbee Gateway, ZBDongle-E 3.0 USB Dongle Plus (* Ref-Link)

For some people these commands were doing the magic but didn't work for me.

/sbin/modprobe usbserial
/sbin/modprobe ftdi_sio
/sbin/modprobe cdc-acm

modprobe: FATAL: Module cdc-acm not found.

I found the device via

lsusb -cui

but it had no /dev attached.

I used the drivers from robertklep to solve my issues. See the repository for a full documentation/guide.

First of all you have to find the plattform your Synology is using. You'll find it here in column "Package Arch". Head to modules in the GitHub repository and check which drivers are in the relevant folder.

I created a boot task to do all necessary steps at boot time as after a Synology update the drivers where missing. Find it below.

Manual

Copy the driver files to your Synology, folder /lib/modules folder. E.g. via wget.

ℹ️
You have to change the plattform ("package arch") and Synology version in the URL.
wget https://github.com/robertklep/dsm7-usb-serial-drivers/raw/refs/heads/main/modules/v1000/dsm-7.2/ch341.ko

Load the drivers. There is a script (usb-serial-drivers.sh) to do so. Place it in /usr/local/etc/rc.d and assign the executable permission.

chmod +x /usr/local/etc/rc.d/usb-serial-drivers.sh

You don't have to reboot to load the drivers, just run the following command.

/usr/local/etc/rc.d/usb-serial-drivers.sh start

Check the result with lsusb -cui again.

As I want to use the device within a Docker container I had to change the device permissions. You might have a different name. These reset after a reboot, that's why I put this into the boot task as well.

chmod 666 /dev/ttyUSB0

To attach the device to a container I used the following code in docker compose.

    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0

Boot task

I created a boot task to do all necessary steps and download the drivers if they are missing using the -nc option. Depending on your package arch you might not need all drivers. Adapt the script as needed.

TMP_ARCH=v1000
TMP_SYNO=dsm-7.2
cd /lib/modules
wget -nc https://github.com/robertklep/dsm7-usb-serial-drivers/raw/refs/heads/main/modules/$TMP_ARCH/$TMP_SYNO/ch341.ko
wget -nc https://github.com/robertklep/dsm7-usb-serial-drivers/raw/refs/heads/main/modules/$TMP_ARCH/$TMP_SYNO/cp210x.ko
wget -nc https://github.com/robertklep/dsm7-usb-serial-drivers/raw/refs/heads/main/modules/$TMP_ARCH/$TMP_SYNO/pl2303.ko
wget -nc https://github.com/robertklep/dsm7-usb-serial-drivers/raw/refs/heads/main/modules/$TMP_ARCH/$TMP_SYNO/rndis_host.ko
wget -nc https://github.com/robertklep/dsm7-usb-serial-drivers/raw/refs/heads/main/modules/$TMP_ARCH/$TMP_SYNO/ti_usb_3410_5052.ko
cd /usr/local/etc/rc.d/
wget -nc https://raw.githubusercontent.com/robertklep/dsm7-usb-serial-drivers/refs/heads/main/usb-serial-drivers.sh
/usr/local/etc/rc.d/usb-serial-drivers.sh start
chmod 666 /dev/ttyUSB0

(* Ref-Link) This article contains referral (ref) links. If you make a purchase through these links, I may earn a small commission at no extra cost to you.

Tags