Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jakzim87 opened this issue Nov 6, 2023 · 50 comments
Open

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

jakzim87 opened this issue Nov 6, 2023 · 50 comments
Assignees
Labels
bug Something isn't working

Comments

@jakzim87
Copy link

jakzim87 commented Nov 6, 2023

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?

@jakzim87 jakzim87 added the bug Something isn't working label Nov 6, 2023
@robertklep
Copy link
Owner

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
Copy link
Author

jakzim87 commented Nov 6, 2023

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

@robertklep
Copy link
Owner

Please make sure that you follow the correct downloading instructions!

@jakzim87
Copy link
Author

jakzim87 commented Nov 7, 2023

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
Copy link

arajeet commented Nov 7, 2023

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
Copy link

arajeet commented Nov 7, 2023

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
Copy link
Owner

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

@c4coer
Copy link

c4coer commented Nov 18, 2023

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
Copy link

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
Copy link

brrrgh commented Nov 23, 2023

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
Copy link
Owner

@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
Copy link

brrrgh commented Nov 23, 2023

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
Copy link
Owner

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
Copy link

brrrgh commented Nov 23, 2023

wohoo, you’re my hero!
Thanks a lot

@theorthoteam
Copy link

theorthoteam commented Dec 3, 2023

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
Copy link
Owner

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
Copy link

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
Copy link

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
Copy link
Owner

@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
Copy link

Try using a USB extension cord.

Great tip! It also worked in my case.

@NobodyIT
Copy link

NobodyIT commented Nov 4, 2024

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
Copy link
Owner

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

@NobodyIT
Copy link

NobodyIT commented Nov 4, 2024

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

@konclave
Copy link

@robertklep Thank you for your repo and the time you're spending supporting it.

If I see the following messages in the dmesg, does that mean that drivers doesn't fit my system?

cp210x: version magic '4.4.180+ SMP mod_unload ' should be '4.4.302+ SMP mod_unload '
[ 1156.402556] ch341: version magic '4.4.180+ SMP mod_unload ' should be '4.4.302+ SMP mod_unload '

That is the OS version: Linux NoisyDemon 4.4.302+ #72806 SMP Thu Sep 5 13:44:44 CST 2024 x86_64 GNU/Linux synology_geminilake_720+

And I've installed the drivers from this path: /dsm7-usb-serial-drivers/raw/main/modules/geminilake/dsm-7.2/

@robertklep
Copy link
Owner

@konclave yes, that would mean that the module version doesn't match the kernel version. Which version of DSM are you running? Perhaps I need to add additional versions.

For the time being, you can try using the ApolloLake modules instead, that platform uses the same kernel version as your NAS is doing (I don't know if that will actually work, though).

@konclave
Copy link

konclave commented Nov 27, 2024

@robertklep I have DSM 7.2.2-72806.
And it seems like I've found the source of the issue – the previously downloaded 7.1 drivers were not replaced by the newly downloaded, but the new ones were renamed to ko.1. So, I've loaded the 7.1 drivers instead.

But now I don't have the ttyUSB device for some reason. As I understand, it should be visible, if the usbserial module is loaded. From the lsmod output I see that it's loaded:

usbserial              22278  5 ch341,cp210x,ti_usb_3410_5052,pl2303,ftdi_sio

But still no /dev/ttyUSB, only ttyACM0 is there.

Thank you, anyway, I'll try to go throw the other threads and figure out what's wrong.

@d3nbo
Copy link

d3nbo commented Nov 29, 2024

I have the same problem since 2 days. Synology did roll out 7.2.2-72806 Update 2, this could be the problem.

@robertklep
Copy link
Owner

@konclave you can probably use ttyACM instead of ttyUSB without any issues. The difference is that ttyACM devices are created by the cdc-acm.ko driver and the ttyUSB devices are created by the drivers that depend on usbserial (which also means that you don't even need the drivers that I provide since cdc-acm.ko, which comes with DSM still, should be sufficient)

@robertklep
Copy link
Owner

@d3nbo the exact same problem? With an incorrect version magic error?

@d3nbo
Copy link

d3nbo commented Nov 29, 2024

Good news, it's runnig now. As I am not an IT expert, still a little clueless

I did not have the exact same, but ttyUSB0 was missing suddenly, when it was working before. I have a RS2418+, so I used denverton.

Problem was when using /usr/local/etc/rc.d/usb-serial-drivers.sh start

/usr/local/etc/rc.d/usb-serial-drivers.sh: line 7: syntax error near unexpected token newline' /usr/local/etc/rc.d/usb-serial-drivers.sh: line 7: '

Thank you for your great work!!

@robertklep
Copy link
Owner

@d3nbo sounds like you may not have downloaded the script correctly.

@Davidou2510
Copy link

@robertklep

Hello,
Have the same "invalid module format" with dsm 7.2.2-72806 update 3
DS224+ geminilake

Don't understand what I did wrong as I already used the same command lines on another syno (appololake this time) and it worked perfectly.

Is the last DSM update the problem ?

Bests

@robertklep
Copy link
Owner

@Davidou2510 can you run the command file against any of the modules that you downloaded?

So for example:

file /lib/modules/ch341.ko

@Davidou2510
Copy link

@robertklep
Thanks for your answer
It's a brand new NAS.
So I just erased it and I'm installing 7.2.2-72806 again.
Then will let you know
Bests
David

@Davidou2510
Copy link

@robertklep
Thanks for your answer

The command 'file /lib/modules/ch341.ko' has returned as "command not found" in /lib/modules
Am I in the right folder ? Or should I run this command in cd /dev ?

Now, after new dsm install, I can see the ttyUSB0.
The new problem is that ZHA cannot connect to it.

Also, the rndis_host.ko file returned a "unknown symbol in module". Is that the problem ?

Bests
David

@Davidou2510
Copy link

@robertklep

My bad. Made a mistake when creating Home Assistant and didn't include zha services...

Everything seems to run fine now.

Let you know.

Thanks for your help

@Freedom1301
Copy link

Freedom1301 commented Mar 3, 2025

@Davidou2510 can you run the command file against any of the modules that you downloaded?

So for example:

file /lib/modules/ch341.ko

@robertklep
Hello,
Also I have newest update 7.2.2-72806 Update 3 DS224+ - same problem than others.
I am using CC2531 zigbee dongle.

When I try run the command as you recommend.....
write it...
-sh: file: command not found

Do you have any idea please?

@robertklep
Copy link
Owner

@Freedom1301 if you have the same problem, it's for the same reason: you didn't follow the downloading instructions correctly.

@robertklep
Copy link
Owner

@Freedom1301 those are correct, assuming that your NAS uses the Gemini Lake platform. So what is the problem exactly?

@Freedom1301
Copy link

Freedom1301 commented Mar 3, 2025

@Freedom1301 those are correct, assuming that your NAS uses the Gemini Lake platform. So what is the problem exactly?

Yes my DS224+ is using GeminiLake platform.

I did not see any TTYUSB driver in /dev folder.

All commands was without any errors....

I am using CC2531 dongle can be unsupported?

@robertklep
Copy link
Owner

robertklep commented Mar 4, 2025

@Freedom1301 does /dev/ttyACM0 exist? If so, that's probably the one you need.

If it doesn't exist, please post the output of the following commands:

lsusb -cui

And:

lsmod | grep usbserial

@Freedom1301
Copy link

@Freedom1301 does /dev/ttyACM0 exist? If so, that's probably the one you need.

If it doesn't exist, please post the output of the following commands:

lsusb -cui

And:

lsmod | grep usbserial

/dev/ttyACM0 doesn´t exist.

lsusb -cui
|__usb1 1d6b:0002:0404 09 2.00 480MBit/s 0mA 1IF (Linux 4.4.302+ xhci-hcd xHCI Host Controller 0000:00:15.0) hub
|__1-1 0451:16ae:6165 00 2.00 12MBit/s 100mA 1IF (Texas Instruments CC2531 USB Dongle ffffffd1ffffffbdffffffdaffffffb4)
1-1:1.0 (IF) ff:ff:ff 1EP (Vendor Specific) usbfs
|__1-4 f400:f400:0100 00 2.00 480MBit/s 200mA 1IF (Synology DiskStation 65004430EB36DF32)
1-4:1.0 (IF) 08:06:50 2EPs () usb-storage host2 (synoboot)

lsmod | grep usbserial
usbserial 22278 5 ch341,cp210x,ti_usb_3410_5052,pl2303,ftdi_sio
usbcore 209065 18 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

@robertklep
Copy link
Owner

@Freedom1301 all the drivers have been loaded properly, so either your device isn't supported or there's a hardware issue (which for instance can happen if you don't have an extension cord).

Can you give a link to exactly which device you have, and which firmware it's running? FWIW, the CC2531 is an outdated device and I wouldn't really recommend using it as a coordinator.

@Freedom1301
Copy link

Freedom1301 commented Mar 4, 2025

@robertklep
I am using extentsion cord.
Link https://www.ti.com/product/CC2531#description for my coordinator.

If you mean that is too old, could you recomend some different type?

Thanks

@Freedom1301
Copy link

@robertklep
maybe this one ?
ZigBee EFR32MG21

Thanks

@robertklep
Copy link
Owner

@Freedom1301 I wouldn't recommend anything with an EFR32, the CC2652's are much more stable.

I don't know which serial chip that CC2531 dongle uses, but clearly it's not supported by any of the drivers that I provide 😢

@Freedom1301
Copy link

@robertklep so I need buy the new one coordinator. Thank you very much for you support. 👌

@MarcelAarsman
Copy link

@robertklep my DS224+ is also using GeminiLake platform

The insmod of rndis_host.ko is showing an error. Is this a problem? The rest works fine.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests