robertklep / dsm7-usb-serial-drivers

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

Unable to install usb drivers on dsm 7.2 - Invalid module format #110

Open jakzim87 opened 1 year ago

jakzim87 commented 1 year ago

Hi all, i have followed all the instructions and wanted to install usb drivers for a usb zigbee devices on my synology. (No ttyusb or ttyacm device in /dev)

Unfortunately i am running dsm 7.2 (DSM 7.2-64570 Update 1) (Linux MyCloud 4.4.302+ #64570 SMP Tue Jun 13 21:39:55 CST 2023 x86_64 GNU/Linux synology_geminilake_720+)

It is a 720+ geminilake synology. I did try these drives here: https://github.com/robertklep/dsm7-usb-serial-drivers/tree/main/modules/geminilake/dsm-7.2

None of those i could install with this command as described in the manual: insmod /lib/modules/cp210x.ko I am always getting this error:

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

Any help?

robertklep commented 1 year ago

None of those i could install with this command as described in the manual

Which manual is that?

Invalid module format

That's caused by not downloading the correct files.

jakzim87 commented 1 year ago

Hey @robertklep and thanks for this quick reply.

I basically ran the modprobe commands and then wget from your page here (link mentioned above, https://github.com/robertklep/dsm7-usb-serial-drivers/tree/main/modules/geminilake/dsm-7.2)

Then confirm the files were downlaoded into /lib/modules and then run the insmod with the error as outcome as said.

Which files would be the right ones? Can you point me to those? I checked on the page you mentioned (https://kb.synology.com/en-uk/DSM/tutorial/What_kind_of_CPU_does_my_NAS_have) and found my 720+ as geminilake and then used the 7.2 geminilake folder and files here: https://github.com/robertklep/dsm7-usb-serial-drivers/tree/main/modules/geminilake/dsm-7.2

Thanks again

arajeet commented 1 year ago

Even i am facing the same issue. I have ds220j . When i did the below and tried insmod, i am getting invalid format.
I am on DSM 7.2-64570 Update 3. Is there some issue

wget https://github.com/robertklep/dsm7-usb-serial-drivers/tree/main/modules/rtd1296/dsm-7.2/cp210x.ko wget https://github.com/robertklep/dsm7-usb-serial-drivers/tree/main/modules/rtd1296/dsm-7.2/ch341.ko wget https://github.com/robertklep/dsm7-usb-serial-drivers/tree/main/modules/rtd1296/dsm-7.2/pl2303.ko wget https://github.com/robertklep/dsm7-usb-serial-drivers/tree/main/modules/rtd1296/dsm-7.2/rndis_host.ko

robertklep commented 1 year ago

Please make sure that you follow the correct downloading instructions!

jakzim87 commented 1 year ago

Hey Robert,

thanks again for your reply and help! That was helpful as it wasnt an obvious issue for me. It did in fact download correctly using the other link so i didnt think it was a problem. But actually it was, so to other who may also be experiencing the smae issue:

I have used this link: https://github.com/robertklep/dsm7-usb-serial-drivers/blob/main/modules/geminilake/dsm-7.2/ch341.ko

But this is wrong and you actually need to use: https://github.com/robertklep/dsm7-usb-serial-drivers/raw/main/modules/geminilake/dsm-7.2/ch341.ko

Quite confusing because both actually download a file with the same name Thanks!

arajeet commented 1 year ago

Hi Robert,

Sorry not sure what i am doing wrong. root@araku:/lib/modules# uname -a Linux araku 4.4.302+ #64570 SMP Thu Jul 20 00:06:53 CST 2023 aarch64 GNU/Linux synology_rtd1296_ds220j root@araku:/lib/modules# wget https://github.com/robertklep/dsm7-usb-serial-drivers/raw/main/modules/rtd1296/dsm-7.2/ch341.ko

root@araku:/lib/modules# insmod ch341.ko insmod: ERROR: could not insert module ch341.ko: Unknown symbol in module root@araku:/lib/modules# pwd

Could you pleae adivse

arajeet commented 1 year ago

root@araku:/lib/modules# insmod ch341.ko insmod: ERROR: could not insert module ch341.ko: Unknown symbol in module root@araku:/lib/modules# insmod ti_usb_3410_5052.ko insmod: ERROR: could not insert module ti_usb_3410_5052.ko: Unknown symbol in module root@araku:/lib/modules# insmod ti_usb_3410_5052.ko insmod: ERROR: could not insert module ti_usb_3410_5052.ko: Unknown symbol in module root@araku:/lib/modules# insmod rndis_host.ko insmod: ERROR: could not insert module rndis_host.ko: Unknown symbol in module root@araku:/lib/modules# insmod pl2303.ko insmod: ERROR: could not insert module pl2303.ko: Unknown symbol in module root@araku:/lib/modules# insmod cp210x.ko insmod: ERROR: could not insert module cp210x.ko: Unknown symbol in module root@araku:/lib/modules# pwd /lib/modules root@araku:/lib/modules#

all the files same issue

robertklep commented 1 year ago

@arajeet you didn't load usbserial.ko first.

c4coer commented 1 year ago

hello every body, for me, no problem update 7.1 to 7.2, and 7.2 to DSM 7.2.1-69057 Update 1 for Ds720plus

Lars-B84 commented 1 year ago

hello every body, for me, no problem update 7.1 to 7.2, and 7.2 to DSM 7.2.1-69057 Update 1 for Ds720plus

Thanks! I was looking for this news ;)

brrrgh commented 1 year ago

Hi Robert, seems like I have similar problem but just for the rndis_host.ko file:

/lib/modules$ sudo insmod /lib/modules/rndis_host.ko
insmod: ERROR: could not insert module /lib/modules/rndis_host.ko: Unknown symbol in module

I’m trying to install drivers for Geminilake DSM 7.2

What does this mean? I didn’t find any usbserial.ko file anywhere?

@arajeet you didn't load usbserial.ko first.

robertklep commented 1 year ago

@brrrgh do you actually need rndis_host.ko?

The full path is /lib/modules/usbserial.ko, and it should come with DSM. The provided script will load it, so if you don't use that script you'll need to load it manually before any of the modules from this repository.

brrrgh commented 1 year ago

OK, got it. usbserial.ko is already there and I don’t probably need ndis_host.ko. But how to check if the drivers were loaded after running # /usr/local/etc/rc.d/usb-serial-drivers.sh start? I though it will be listed under /dev as ttyUSB0?

robertklep commented 1 year ago

To check if the drivers are loaded:

lsmod | grep serial

To check if your device was recognised, and which device entry it uses:

lsusb -cui
brrrgh commented 1 year ago

wohoo, you’re my hero! Thanks a lot

theorthoteam commented 11 months ago

Hi @robertklep
I am trying to install ZigBee drivers to my Synology DS723+

I downloaded all the drivers from these links (Notice they are all from 'raw' because the other drivers gave me errors during the command insmod):

wget https://github.com/robertklep/dsm7-usb-serial-drivers/raw/main/modules/r1000/dsm-7.2/cp210x.ko
wget https://github.com/robertklep/dsm7-usb-serial-drivers/raw/main/modules/r1000/dsm-7.2/ch341.ko
wget https://github.com/robertklep/dsm7-usb-serial-drivers/raw/main/modules/r1000/dsm-7.2/pl2303.ko
wget https://github.com/robertklep/dsm7-usb-serial-drivers/raw/main/modules/r1000/dsm-7.2/ti_usb_3410_5052.ko
wget https://github.com/robertklep/dsm7-usb-serial-drivers/raw/main/modules/r1000/dsm-7.2/rndis_host.ko 

The last one (rndis_host.ko) I get: the same issue of above:

insmod: ERROR: could not insert module /lib/modules/rndis_host.ko: Unknown symbol in module

I have executed your script https://github.com/robertklep/dsm7-usb-serial-drivers/blob/main/usb-serial-drivers.sh

Now if I insert the ZigBee pen in the USB Port and I do this command:

tail -f /var/log/messages

I get these errors:

2023-12-03T23:37:26+01:00 Prass kernel: [101613.754236] usb 1-2: Device not responding to setup address.
2023-12-03T23:37:27+01:00 Prass kernel: [101613.961538] usb 1-2: Device not responding to setup address.
2023-12-03T23:37:27+01:00 Prass kernel: [101614.167480] usb 1-2: device not accepting address 21, error -71
2023-12-03T23:37:27+01:00 Prass kernel: [101614.173510] usb usb1-port2: unable to enumerate USB device
2023-12-03T23:37:42+01:00 Prass kernel: [101629.560125] usb 1-2: device descriptor read/64, error -71
2023-12-03T23:37:42+01:00 Prass kernel: [101629.796110] usb 1-2: device descriptor read/64, error -71
2023-12-03T23:37:43+01:00 Prass kernel: [101630.163141] usb 1-2: device descriptor read/64, error -71
2023-12-03T23:37:43+01:00 Prass kernel: [101630.400151] usb 1-2: device descriptor read/64, error -71
2023-12-03T23:37:44+01:00 Prass kernel: [101630.923914] usb 1-2: Device not responding to setup address.
2023-12-03T23:37:44+01:00 Prass kernel: [101631.130246] usb 1-2: Device not responding to setup address.
2023-12-03T23:37:44+01:00 Prass kernel: [101631.336147] usb 1-2: device not accepting address 24, error -71
2023-12-03T23:37:44+01:00 Prass kernel: [101631.472006] usb 1-2: Device not responding to setup address.
2023-12-03T23:37:44+01:00 Prass kernel: [101631.678284] usb 1-2: Device not responding to setup address.
2023-12-03T23:37:45+01:00 Prass kernel: [101631.884198] usb 1-2: device not accepting address 25, error -71
2023-12-03T23:37:45+01:00 Prass kernel: [101631.890238] usb usb1-port2: unable to enumerate USB device

this is the output of the following commands:

lsmod | grep serial

usbserial              22278  5 ch341,cp210x,ti_usb_3410_5052,pl2303,ftdi_sio
usbcore               208809  17 uas,ch341,etxhci_hcd,usblp,uhci_hcd,usb_storage,cp210x,usbserial,ti_usb_3410_5052,ehci_hcd,ehci_pci,pl2303,usbhid,ftdi_sio,cdc_acm,xhci_hcd,xhci_pci

and

lsusb -cui

|__usb1          1d6b:0002:0404 09  2.00  480MBit/s 0mA 1IF  (Linux 4.4.302+ xhci-hcd xHCI Host Controller 0000:08:00.3) hub
  |__1-1         f400:f400:0100 00  2.00  480MBit/s 200mA 1IF  (Synology DiskStation 6500338BB681C660)
  1-1:1.0         (IF) 08:06:50 2EPs () usb-storage host7 (synoboot)
ash-4.4# 

what can I do? My synology doesn't see the ZigBee Pen

robertklep commented 11 months ago

Your issue isn't with the drivers (they're loading fine, apart from the rndis one but that's not needed anyway) but with the connection between your device and your NAS. Try using a USB extension cord.

theorthoteam commented 11 months ago

thanks a lot @robertklep, I attached a usb hub and I connected the USB ZibBee pen on it. It worked! For some reason the kernel couldn't assign an id to the Zigbee Antenna but with usb hub kernel got that id. Anyway it worked!

You are a superhero ;-)

stagovic commented 9 months ago

Hi all, After having had some trouble with my sonoff zigbee stick after the update of my synology DS420+ to version 7.2 these could be resolved with using the drivers from "the raw folder". Obviously I felt a little bit too safe as I run into the "insmod" problem again after having updated to DSM 7.2.1-69057 Update 4. Does anyone have an idea why I get "insmod: ERROR: could not insert module /lib/modules/ch341.ko: Invalid module format" again and how to resolve this? Thanks in advance for any help.

I currently use these drivers: https://github.com/robertklep/dsm7-usb-serial-drivers/raw/main/modules/geminilake/dsm-7.2/ch341.ko https://github.com/robertklep/dsm7-usb-serial-drivers/raw/main/modules/geminilake/dsm-7.2/cp210x.ko https://github.com/robertklep/dsm7-usb-serial-drivers/raw/main/modules/geminilake/dsm-7.2/pl2303.ko https://github.com/robertklep/dsm7-usb-serial-drivers/raw/main/modules/geminilake/dsm-7.2/ti_usb_3410_5052.ko

robertklep commented 9 months ago

@stagovic the size of /lib/modules/ch341.ko should be 255928 bytes, and its MD5 checksum should be 93ee1e55dbc19d70b170f7a1ab72d4a1 (md5sum /lib/modules/ch341.ko). Can you confirm those values?

stegemanGit commented 9 months ago

Try using a USB extension cord.

Great tip! It also worked in my case.

NobodyIT commented 2 weeks ago

Hi all,

I have followed tried to install usb drivers for a usb zigbee devices on my synology but i get some trouble. The hardware is a synology DS223J - with DSM7.2 - (synology_rtd1619b_ds223j)

I downloaded the files from the following link; https://github.com/robertklep/dsm7-usb-serial-drivers/tree/main/modules/rtd1619b/dsm-7.2/modules/ch341.ko

when I try to install I get the following error: sudo insmod /lib/modules/ch341.ko insmod: ERROR: could not insert module /lib/modules/ch341.ko: Invalid module format

I am not a linux expert and almost certainly made some mistakes, any suggestions will be greatly appreciated. Thanks in advance for any help.

robertklep commented 2 weeks ago

@NobodyIT please follow the download instructions carefully. You're not downloading from the correct URL.

NobodyIT commented 2 weeks ago

@robertklep Thank you for now, I will try the procedure again