Installing cp210x driver

home automation
ayosnato
Posts: 4
youtube meble na wymiar Warszawa
Joined: Sat Apr 03, 2021 8:23 am

Re: Installing cp210x driver

Post by ayosnato »

father.mande wrote:Hi,
ayosnato wrote:Thanks for all the help in this forum. I am able to get zigbee2mqtt working again with the new file provided here.
On a side note, how do i set this up so that i dont need to keep on loading the module after system startup? Seems the file is being deleted every time the system starts up and i have to copy the file and load the module again.
depends of your usage :
You want to load it at boot ... os use any solution provide to add your own start_up at boot divers posts about this
you can also use Entware start_up script and add your own command to load module 'not lost at boot, not updated if internal (as usual) update is used.

You want to load it for a specific application, change the start-stop.sh in /usr/local/AppCentral/YOUR_APKG/CONTROL/start-stop.sh
add insmod (path to a safe place in any share for ex.) in start paragraph, even rmmod in stop.
you can eventually add a test to don't reload it, even fault is not blocking.
just take attention, in case of update of the APKH this change is lost ... so have a backup.

Philippe.
yabaikai wrote:
ayosnato wrote:Thanks for all the help in this forum. I am able to get zigbee2mqtt working again with the new file provided here.

On a side note, how do i set this up so that i dont need to keep on loading the module after system startup? Seems the file is being deleted every time the system starts up and i have to copy the file and load the module again.
Philippe provided good instructions, but if you need a little more help:
You should setup a boot script in /volume1/.@plugins/etc/init.d
I think scripts starting with "Sxx" are for startup and "Kxx" are for shutdown, so startup is the choice here.
Everything in here by default is a symlink, but I think you can just make a .sh file straight in this directory, I have one of these and it works.
The number you give it decides the order in which it executes, so I'd do it before docker (S50docker-ce on mine).

And this is the syntax of mine:
insmod /<path-to-where-driver-is-saved>/cp210x.ko
Thanks for all the help. I was able to set this up so that the module is inserted at startup and available for use.
nickwild999
Posts: 5
Joined: Wed Sep 20, 2023 2:33 am

Re: Installing cp210x driver

Post by nickwild999 »

HI,

Sorry to resurrect an old topic, but I would like to get a zigbee dongle working on my Asustor AS6604T with ADM 4.2.1.RGE2.

I have attached a my demsg log, I believe I need the cp210x driver will this be installed.

How is best to do this? Can I use Phillipe's Octoprint package or a cp210 or ch341?

Thanks in anticipation for any help
dmesg.txt.zip
(20.53 KiB) Downloaded 91 times
User avatar
father.mande
Posts: 1817
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: Installing cp210x driver

Post by father.mande »

nickwild999 wrote:HI,

Sorry to resurrect an old topic, but I would like to get a zigbee dongle working on my Asustor AS6604T with ADM 4.2.1.RGE2.
I have attached a my demsg log, I believe I need the cp210x driver will this be installed.
How is best to do this? Can I use Phillipe's Octoprint package or a cp210 or ch341?
Thanks in anticipation for any help
Yes you can used, version I provide with Octoprint, but take attention to the version
CP210x exist for 4.1.x and another for 4.2.x after kernel change by Asustor

I can put it here if you are not 100% sure.

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
nickwild999
Posts: 5
Joined: Wed Sep 20, 2023 2:33 am

Re: Installing cp210x driver

Post by nickwild999 »

Thanks Phillipe that is really helpful, I will try and hunt it out though and let you know if I cant find the right one

Is there any way to find out which driver the AS6604T needs for its chipset? Is it the cp210 or the 341?

As you mentioned in another post the zigbee2mqtt mentions the 341 but there is no indication of anything from the demsg log.

Thanks again for your help
Last edited by nickwild999 on Thu Sep 21, 2023 2:14 pm, edited 1 time in total.
nickwild999
Posts: 5
Joined: Wed Sep 20, 2023 2:33 am

Re: Installing cp210x driver

Post by nickwild999 »

I have found your updated drivers here I think...??

https://forum.asustor.com/viewtopic.php ... z&start=10

Should I install Octoprint from App Centre first and then follow your procedures detailed above?

EDIT: I installed from App Central, but it seems old version and does not run

Code: Select all

nick@AS6604T:/volume1/.@plugins/AppCentral/octoprint/modules $ ls
4.14.x/ 5.4.x/
Thanks
User avatar
father.mande
Posts: 1817
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: Installing cp210x driver

Post by father.mande »

Hi,

Sorry for late replies ...

1 you don't need octoprint (so remove ti) to get modules

2 you can load all modules without risk, the kernel select the good one when the hardware is plugged.
... when you are sure of the correct one ... you can clean the launch to get only the module require.

3 you can get the tar attached here, to get the modules (3) with version for ADM before_4.1.0.RLQ1 and version for newest (after)
put in safe place, you can try by loading module using : insmod /path/to/module.ko (module = ch431.ko or cp210x.ko)

4 if it works, you must add it in script to be loaded automatically
... if it's for a specific APKG, a good solution (but to be redo when APKG is updated in AppCentral) is to add the load of module in the start-stop.sh of the APKG and modules in APKG folder
for ex.
mkdir /usr/local/AppCentral/APKG_NAME/my_modules
cp -p /path/to/module.ko /usr/local/AppCentral/APKG_NAME/my_modules
(replace module.ko bu correct name)
start-stop.sh is in : /usr/local/AppCentral/APKG_NAME/CONTROL/
... search for start and add a small shell code like :

Code: Select all

lsmod | grep -q module ## module can be replaced by cp210x or ch341 in your case
if [ $? -ne 0 ] ; then
insmod /usr/local/AppCentral/APKG_NAME/my_modules/module.ko
fi
do it for each module ch341.ko and/or cp210x.ko
... then restart the APKG

With this the module is loaded (if not already done) before your APKG start.

You can used other solution at A.D.M. level (so not attached to APKG) even the module can be loaded after APKG (not a problem in lot of case)
... using a start_up script or using Entware APKG init.d folder launched at each boot ...

file for x86_64 5.13.x kernel :
modules_usb_serial_5.13.x.tgz
modules for ADM 4.0 to 4.1.0.RLQ1 or after for 5.23.x kernel
(674.48 KiB) Downloaded 117 times
Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
nickwild999
Posts: 5
Joined: Wed Sep 20, 2023 2:33 am

Re: Installing cp210x driver

Post by nickwild999 »

Thanks so much Phillipe for all your advice.

I would want to do this at ADM level and I am not confident to tamper with an Entware package.

So my final questions (hopefully) is where should I save this that is "safe" could this be in a shared folder or does it have to be more in the system?

And could you point me in the direction of a start up script and where this should be saved to load every boot.

Merci
nickwild999
Posts: 5
Joined: Wed Sep 20, 2023 2:33 am

Re: Installing cp210x driver

Post by nickwild999 »

I think I have found all this earlier in the post. Thanks again
User avatar
father.mande
Posts: 1817
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: Installing cp210x driver

Post by father.mande »

Hi,

Good, but don't hesitate to ask for more detail if needed.

Entware din't require to be modded, it's an apkg adding more than 2500 packages to the ADM and Entware use script in /opt/etc/init.d/Snxxxx script during boot phase (S for start nn for priority and xxx for script def., so it's relatively easy to add your own start_up script without any molding or change.

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
eaparicio@ymail.com
Posts: 3
Joined: Sun Feb 27, 2022 12:18 am

Re: Installing cp210x driver

Post by eaparicio@ymail.com »

father.mande wrote:Hi,

Good, but don't hesitate to ask for more detail if needed.

Entware din't require to be modded, it's an apkg adding more than 2500 packages to the ADM and Entware use script in /opt/etc/init.d/Snxxxx script during boot phase (S for start nn for priority and xxx for script def., so it's relatively easy to add your own start_up script without any molding or change.

Philippe.
Hello, I have seen that you and @Nazar78 are the experts in these drivers. After the last ADM update, the driver has stopped working, with the error

insmod: can't insert 'cp210x.ko': invalid module format

Can you check it please?
Post Reply

Return to “Domoticz”