Synology DSM 7 USB serial drivers

Overview

Missing USB serial drivers for DSM 7

Supported drivers

  • cp210x
  • ch341

Supported platforms

  • apollolake (linux-4.4.x)
  • armada38x (linux-3.10.x-bsp)
  • armadaxp (linux-3.x)
  • avoton (linux-3.10.x)
  • braswell (linux-3.10.x)
  • geminilake (linux-4.4.x)
  • monaco (linux-3.10.x)
  • v1000 (linux-4.4.x)

Feel free to request other drivers or platforms. You can find out which platform your NAS is using on this page.

Installation

NB: the following steps will require SSH access and administrator rights. For the latter, either use sudo for each command or use su to log in as root.

  • The kernel modules for each supported platform can be found in modules/. Copy the required files to your Synology and move them to /lib/modules
  • To make DSM 7 automatically load the kernel modules at boot time, copy the file 90-usb-serial.conf to /usr/lib/modules-load.d/
  • Run systemctl restart systemd-modules-load to load the modules
Alternative method to load the modules at boot time
  • Copy the included file usb-serial-drivers.sh to /usr/local/etc/rc.d
  • Make sure that the file has executable permissions: chmod +x /usr/local/etc/rc.d/usb-serial-drivers.sh

After completing the previous step, run the script to load the modules:

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

Building from source

I've built these modules in an Ubuntu 18.04.5 virtual machine on my Synology NAS.

To set up the build environment, I followed the steps in this document. The different NAS targets/platforms can be installed next to each other.

To build the modules for a particular platform, I follow these steps:

sudo rm -fr /toolkit/build_env/ds.$platform-7.0/source
sudo /toolkit/pkgscripts-ng/PkgCreate.py -X 1 -P 1 -v 7.0 --min-sdk 7.0 -p $platform $module
cp -v /toolkit/build_env/ds.$platform-7.0/source/$module/*.ko /tmp

Replace $platform with the NAS platform, for example apollolake. Replace $module with the source directory name (found in sources/ in this repository) relevant for that particular platform. For example, apollolake requires the 4.4.x sources.

Put together, to build for apollolake, the commands become:

sudo rm -fr /toolkit/build_env/ds.apollolake-7.0/source
sudo /toolkit/pkgscripts-ng/PkgCreate.py -X 1 -P 1 -v 7.0 --min-sdk 7.0 -p apollolake 4.4.x
cp -v /toolkit/build_env/ds.apollolake-7.0/source/$module/*.ko /tmp

Due to some concurrency issues that I haven't bothered to look into, the second step (PkgCreate) sometimes fails with a compilation error. If that happens, start over.

The last step will copy the driver modules to /tmp

Disclaimer

I don't/can't test every driver. Use at your own peril.

Attribution

I'm using the source code (as-is) for the drivers included in the Linux kernel from the Synology Open Source Project.

Issues
  • Add driver for PL2303 on avoton

    Add driver for PL2303 on avoton

    I've tried by myself, but...

    Is anyone successful building the PL2303 ? alternatively I can purchase another USB-2-Serial that is nativly supported if any.

    thanks !

    `

                Start to run "Build Package"
    

    [avoton] env PackageName=3.10.x /pkgscripts-ng/SynoBuild --avoton -c --min-sdk 7.0 3.10.x Set cache size limit to 8.0 Gbytes Statistics cleared [INFO] projectList=3.10.x [INFO] Start to build 3.10.x. [Error] There is no build scripts for 3.10.x `

    opened by fdebrus 4
  • cp210x.ko Unknown symbol in module: DS720+ geminilake

    cp210x.ko Unknown symbol in module: DS720+ geminilake

    Current DSM Version: DSM 7.0.1-42218 Update 3

    sh-4.4$ uname -a Linux mushkoNAS 4.4.180+ #42218 SMP Mon Oct 18 19:16:55 CST 2021 x86_64 GNU/Linux synology_geminilake_720+

    sh-4.4$ sudo insmod /lib/modules/cp210x.ko insmod: ERROR: could not insert module /lib/modules/cp210x.ko: Unknown symbol in module

    dmesg output: [ 2610.398136] cp210x: module verification failed: signature and/or required key missing - tainting kernel [ 2610.408753] cp210x: Unknown symbol usb_serial_generic_open (err 0) [ 2610.415673] cp210x: Unknown symbol usb_serial_generic_close (err 0) [ 2610.422700] cp210x: Unknown symbol usb_serial_deregister_drivers (err 0) [ 2610.430196] cp210x: Unknown symbol usb_serial_register_drivers (err 0)

    opened by khvMX 3
  • Job for systemd-modules-load.service failed

    Job for systemd-modules-load.service failed

    Hello, I am trying to install the driver on my Syno DS918+ (Apollolake) and I have follow these steps ::

    • copy the required files to your Synology and move them to /lib/modules
    • copy the file 90-usb-serial.conf to /usr/lib/modules-load.d/

    But when I ran systemctl restart systemd-modules-load to load the modules I experienced the following error ::

    • Job for systemd-modules-load.service failed. See "systemctl status systemd-modules-load.service" and "journalctl -xe" for details.

    journalctl -xe says ::

    Aug 24 18:35:13 Syno918 sudo[8170]:     NTY: TTY=pts/0 ; PWD=/usr/lib/modules-load.d ; USER=root ; COMMAND=/b
    in/systemctl restart systemd-modules-load
    Aug 24 18:35:13 Syno918 sudo[8170]: pam_unix(sudo:session): session opened for user root by NTY(uid=1028)
    Aug 24 18:35:13 Syno918 systemd[1]: Starting Load Kernel Modules...
    Aug 24 18:35:13 Syno918 systemd-modules-load[8173]: Failed to find module 'cp210x'
    Aug 24 18:35:13 Syno918 systemd-modules-load[8173]: Failed to find module 'ch341'
    Aug 24 18:35:13 Syno918 systemd[1]: systemd-modules-load.service: main process exited, code=exited, status=1/FA
    ILURE
    Aug 24 18:35:13 Syno918 systemd[1]: Failed to start Load Kernel Modules.
    Aug 24 18:35:13 Syno918 systemd[1]: Unit systemd-modules-load.service entered failed state.
    Aug 24 18:35:13 Syno918 systemd[1]: systemd-modules-load.service failed.
    

    But the 2 modules are really in /lib/modules and I have change them to root:root and 744

    Is someone have an idea to solve this ? Thank you for your great job

    opened by abergui 3
  • realtek8125 pci-e drivers dsm7

    realtek8125 pci-e drivers dsm7

    Greeting

    i would like some help, i have a NIC 2.5GB with realtek chip and i own a synology rs2421. if it is not to much to ask i would like someone to create a pak for this pci-e card

    opened by jdcruz78 2
  • MCE USB IR receiver support?

    MCE USB IR receiver support?

    Sorry for the off-topic question, but I was able to get my Z-Wave USB dongle working perfectly with your instructions. Do you know if there is something similar that can be done for a generic MCE USB infrared receiver? It is recognized without any special drivers in most other Linux installs. Thanks.

    opened by cncb-gh 2
  • new linux kernel with DSM 7.1

    new linux kernel with DSM 7.1

    The usb serial drivers unfortunately do not load anymore after the DSM 7.1 update.

    My new kernel is: Linux Synology 3.10.108 #42661 SMP Mon Apr 25 19:36:56 CST 2022 x86_64 GNU/Linux synology_braswell_216+II

    Robert, did you notice this change?

    I am using the ti_usb module, the cp210x module and the ftd_sio module

    The actual error message (on performing insmod /lib/modules/cp210x.ko ) is Unknown symbol in module. Perhaps I should load another module first?

    opened by wkraaij 1
  • PermissionError: [Errno 13] Permission denied

    PermissionError: [Errno 13] Permission denied

    I finally got around to upgrading my Synology to DSM 7 and I am getting the following error for the avoton modules after following the procedure:

    2021-12-31 11:22:50 ERROR (MainThread) [zigpy.application] Couldn't start application
    2021-12-31 11:22:50 ERROR (MainThread) [homeassistant.components.zha.core.gateway] Couldn't start EZSP = Silicon Labs EmberZNet protocol: Elelabs, HUSBZB-1, Telegesis coordinator
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/serial/serialposix.py", line 322, in open
        self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
    PermissionError: [Errno 13] Permission denied: '/zigbee'
    

    Devices are configured and listed from from the host/synology OS as well after the driver install:

    $ ls -lart /dev/ttyU*
    crw------- 1 root root 188, 0 Dec 31 12:53 /dev/ttyUSB0
    crw------- 1 root root 188, 1 Dec 31 12:53 /dev/ttyUSB1
    
    $ lsusb | grep HubZ
      |__2-2         10c4:8a2a:0100 00  2.00   12MBit/s 100mA 2IFs (Silicon Labs HubZ Smart Home Controller C0F009F3)
    

    I have tried the following as well with the permissions of the devices on the host and even tried running the container with --privileged: https://community.home-assistant.io/t/installing-ha-in-docker-on-ubuntu-as-non-root-user/48424/29

    And here is my docker config for using the USB device:

    docker run -d --name="home-assistant" -v `pwd`/config:/config -v /etc/localtime:/etc/localtime:ro -v /var/run/docker.sock:/var/run/docker.sock --device /dev/ttyUSB0:/zwave --device /dev/ttyUSB1:/zigbee --net=host --privileged homeassistant/home-assistant
    

    In the container it seems to be having an issue reading these devices as well:

    /config # cat /zwave
    cat: can't open '/zwave': Permission denied
    /config # cat /zigbee
    cat: can't open '/zigbee': Permission denied
    /config # ls -la /z*
    crw-rw-rw-    1 root     root      188,   1 Dec 31 11:57 /zigbee
    crw-rw-rw-    1 root     root      188,   0 Dec 31 11:57 /zwave
    

    Any idea? It is also failing for the ZWAVE device as well, using the Nortek HUSBZB-1 USB device for the controller.

    opened by nmajin 1
  • change readme

    change readme

    with the content of usb-serial-drivers.sh it didnt work. I made a startup.sh myself with the following:

    ash-4.4# vi startup.sh sudo insmod /lib/modules/usbserial.ko sudo insmod /lib/modules/ftdi_sio.ko sudo chmod 777 /lib/modules/usbserial.ko sudo chmod 777 /lib/modules/ftdi_sio.ko sudo insmod /lib/modules/cdc-acm.ko sudo insmod /lib/modules/cp210x.ko sudo insmod /lib/modules/ch341.ko

    after a reboot it worked like a charm, or i had to reboot, or i had to use this startup.sh instead not sure which mode activated it

    opened by IIIdefconIII 1
  • Typo in usb-serial-drivers.sh

    Typo in usb-serial-drivers.sh

    https://github.com/robertklep/dsm7-usb-serial-drivers/blob/18847fb76eb49f16c38a1f44db94f6d1719feb21/usb-serial-drivers.sh#L8

    I guess it should be ch341.ko

    opened by kennetn 1
  • How to troubleshoot?

    How to troubleshoot?

    Hi,

    I followed the instructions, but I don't see my USB serial device in my DS216Play NAS. I there some guidance available on how to troubleshoot in DSM7?

    Cheers, Martijn

    opened by thyeestes 4
  • CH341 driver does not work properly with RS1221+

    CH341 driver does not work properly with RS1221+

    Receiving from serial port is unreliable, the character won't show up until it "buffered" enough of it, about 32 characters.

    I rebuilt the driver with this version of ch341.c and the problem is gone.

    [email protected]

    So would you please update the source?

    opened by chenzhuoyu 3
  • insmod: Invalid module format

    insmod: Invalid module format

    Just a note: I have a DSM7 setup on an appololake system (Xpenology, DS918+) I want to use the driver for ch341, but I get:

    insmod /lib/modules/ch341.ko
    insmod: ERROR: could not insert module /lib/modules/ch341.ko: Invalid module format
    

    Then I went to http://www.jadahl.com/iperf-arp-scan/DSM_7.0/apollolake/ and tried the version from there which loaded and works without any error. So there seems to be some odity on the driver in the repo here.

    opened by caco3 1
  • Realtek Edimax Bluetooth Adapter - BT8500

    Realtek Edimax Bluetooth Adapter - BT8500

    it'll be great, if it's possible to use this dongle on dsm7 (not sure there is a compatible driver already). https://www.edimax.com/edimax/mw/cufiles/files/download/Driver_Utility/BT-8500/BT-8500_Linux_Bluetooth_Driver_1_0_0_1.zip

    Thank you

    opened by tanis80 1
  • ti_usb_3410_5052 for Braswell

    ti_usb_3410_5052 for Braswell

    Hi Robert,

    can you compile this module for DSM 7 (it was available in the Jadahl drivers for DSM6.2 but not in DSM 7 for my architecture (Braswell)

    thanks!

    Wessel

    opened by wkraaij 4
Owner
Robert Klep
Experienced freelance frontend (JS/CSS/React) and backend (Node) developer.
Robert Klep
The function is based on MQTT. When the original serial of ESP8266/ESP32 cannot be used, it can replace serial print.

MqttPrint and MqttMonitor The function is based on MQTT. When the original serial of ESP8266/ESP32 cannot be used, it can replace serial print. MqttPr

fw-box 3 Jan 10, 2022
John Walker 18 Aug 8, 2022
USB serial TTY for the Arduino Uno with ILI9341 LCD screen shield

ILI9341TTY USB serial TTY for the Arduino Uno with ILI9341 LCD screen shield [video] Semigraphics, ANSI, unicode, and an Arduino LCD-screen terminal I

M Rule 71 Mar 12, 2022
ESP32 software USB host through general IO pins. We can connect up to 4 USB-LS HID (keyboard mouse joystick) devices simultaneously.

esp32_usb_soft_host esp32 USB-LS pure software host thru general IO pins. Up to 4 HID devices simultaneously. board ~$3 :https://www.aliexpress.com/pr

Samsonov Dima 274 Aug 10, 2022
ESP8266 software USB host through general IO pins. We can connect up to 2 USB-LS HID (keyboard mouse joystick) devices simultaneously.

esp8266_usb_soft_host Test for esp8266 usb host . Works with ESP-IDF v3.4 80MHz and 160MHz. WorkInProgress Test run with mouse & combined mouse & keyb

Samsonov Dima 27 Jul 30, 2022
Tiny and portable usb host and device stack for mcu with usb ip

Tiny and portable usb host and device stack for mcu with usb ip

sakumisu 414 Aug 12, 2022
USB-C_PCB_experiments - USB-C ports made from a flex PCB and an ATtiny84A

USB-C PCB Experiments This is part of an ongoing series of projects involving creative interpretations of the USB mechanical standards. You've probabl

Sam Ettinger 22 May 21, 2022
Anotter USB temperature logger that can record up to four channels with thermocouple or NTCs connected via CDC directly or SCPI to USB.

temperature-logger Anotter USB temperature logger that can record up to four channels with thermocouple or NTCs connected via CDC directly or SCPI to

Jana Marie Hemsing 47 Apr 6, 2022
A framework for implementing block device drivers in user space

BDUS is a Linux 4.0+ framework for developing block devices in user space. More specifically, it enables you to implement block device drivers as regu

Alberto Faria 26 May 24, 2022
J2534 drivers for various Macchina hardware

Macchina-J2534 J2534 drivers for various Macchina hardware This is a experimental driver which is built in Rust, and is unofficially ported to Linux a

Ashcon Mohseninia 36 Aug 10, 2022
Open Redragon drivers for Linux. Currently only supporting some mice.

OpenDragon Open Redragon drivers for Linux. Currently only supporting some mice. Table of contents Support Installation Building from source Usage Sou

Alexa Ognjanovic 71 Jul 20, 2022
fortnite cheat external that uses efi drivers and is updated

fortnite-external-efi-drivers fortnite cheat external that uses efi drivers and is updated ALL CREDITS TO CHASE: https://github.com/Chase1803 i just u

null 11 Jun 5, 2022
Generic force-feedback vibrator HAL for upstream haptics drivers

vibrator-ff, a generic vibrator HAL for force feedback haptics. Most downstream haptics / vibrator drivers are implemented as LED class devices, this

AOSP Mainline 4 Feb 2, 2022
BSOD: Binary-only Scalable fuzzing Of device Drivers

bsod-kernel-fuzzing This repository contains the implementations described in "BSOD: Binary-only Scalable fuzzing Of device Drivers". The paper and th

Fabian Toepfer 131 Aug 5, 2022
Full Firmware Package for the STM32WB series: HAL+LL drivers, CMSIS, BSP, MW, plus a set of Projects

STM32Cube is an STMicroelectronics original initiative to ease developers' life by reducing efforts, time and cost.

STMicroelectronics 125 Aug 4, 2022
Free and Open Source API and drivers for immersive technology.

OpenHMD This project aims to provide a Free and Open Source API and drivers for immersive technology, such as head mounted displays with built in head

null 1.1k Aug 1, 2022
Aims to be an accurate C port of Impulse Tracker 2.15's IT replayer (with selectable IT2 sound drivers)

it2play Aims to be an accurate C port of Impulse Tracker 2.15's IT replayer (with selectable IT2 sound drivers). This is a direct port of the original

Olav Sørensen 18 Jul 2, 2022
GraphicsFuzz provides tools for automatically finding and simplifying bugs in graphics drivers, specifically graphics shader compilers.

GraphicsFuzz GraphicsFuzz is a set of tools for testing shader compilers GraphicsFuzz provides tools for automatically finding and simplifying bugs in

Google 502 Jul 27, 2022
Collection of additional Ethernet drivers for ESP-IDF

Collection of additional Ethernet drivers for ESP-IDF This repository aims to store additional Ethernet drivers which are not available directly in ES

Espressif Systems 3 May 9, 2022