robertklep / dsm7-usb-serial-drivers

Synology DSM 7 USB serial drivers
529 stars 90 forks source link

DSM 7.1 DS2125J #89

Closed michaeldn closed 1 year ago

michaeldn commented 1 year ago

I have a DS215J with the Armada375. I followed your instructions, but my device (RFLink - Adrino Mega) is on the USB, but not read via the serial port.

I am not certain what is not correct.

robertklep commented 1 year ago

Can you run this command and post its output here:

/usr/syno/bin/lsusb -cui
michaeldn commented 1 year ago
$ /usr/syno/bin/lsusb -cui
|__usb2          1d6b:0002:0302 09  2.00  480MBit/s   0mA 1IF  (Linux 3.2.101 ehci_hcd Marvell Orion EHCI ehci_marvell.1) hub
  |__2-1         1a86:7523:0264 ff  1.10   12MBit/s  98mA 1IF  ( d8b9d0a2c794b4f6a5f0)
  2-1:1.0         (IF) ff:01:02 3EPs ()

it's there in 2-1

robertklep commented 1 year ago

It doesn't look like there is any driver assigned to it. I'm not sure which driver the Mega requires, which one(s) did you try?

michaeldn commented 1 year ago

I used the Ch341 it has a ch340 chip in it.

https://www.nodo-shop.nl/en/rflink-/170-rflink-arduino-antenna.html

robertklep commented 1 year ago

Ah yes, that should be the correct driver.

What does this output?

/usr/sbin/lsmod | grep serial
michaeldn commented 1 year ago
usbserial              24729  1 ftdi_sio
usbcore               151242  10 ehci_hcd,xhci_hcd,etxhci_hcd,usb_storage,usblp,usbhid,usbserial,ftdi_sio,cdc_acm
robertklep commented 1 year ago

ch341 should be in that list if it was loaded properly.

michaeldn commented 1 year ago

I will try again

michaeldn commented 1 year ago

Same result - should I reboot the NAS?

robertklep commented 1 year ago

What happens when you load ch341.ko manually?

sudo insmod /lib/modules/ch341.ko
michaeldn commented 1 year ago

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

robertklep commented 1 year ago

That means you didn't follow the download instructions correctly.

The correct download link is this one: https://github.com/robertklep/dsm7-usb-serial-drivers/raw/main/modules/armada375/dsm-7.0/ch341.ko

michaeldn commented 1 year ago

That worked thank you! One more question: how do I find the port?

dmesg | grep tty
[    0.000000] Kernel command line: console=ttyS0,115200 ip=off initrd=0x8000000 root=/dev/md0 rw syno_hw_version=DS215jv10 hd_power_on_seq=2 ihd_num=2 netif_num=1 flash_size=8
[    2.859992] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 44) is a 16550A
[    3.586761] console [ttyS0] enabled
[    3.619724] serial8250.1: ttyS1 at MMIO 0xf1012100 (irq = 45) is a 16550A
[   44.658706] synobios open /dev/ttyS1 success
[   61.310107] systemd[1]: Created slice system-serial\x2dgetty.slice.
[   61.317162] systemd[1]: Starting system-serial\x2dgetty.slice.
[   63.330304] synobios open /dev/ttyS1 success
[515201.623975] usb 2-1: ch341-uart converter now attached to ttyUSB0
robertklep commented 1 year ago

It should be available as /dev/ttyUSB0

michaeldn commented 1 year ago

Hi - after enabling logging and checking everything I realize I am receiving: Permission denied: '/dev/ttyUSB0'

Do you have any advice on resolving this? Thank you again.

robertklep commented 1 year ago

@michaeldn

sudo chmod 666 /dev/ttyUSB0
michaeldn commented 1 year ago

Thank you! My Unix memory is from over a decade ago.