Comments (12)
Thank you for help dml... but...
A bit struggling through.
don't know how to compile. I have found instructions using commands like 'make' and 'insmod', but i'm getting errors when i'm using them.
I have managed to copy (and change the name) the driver file from this site to folder /lib/modules/5.10.60-qnap/ch341.ko followed up with chmod 644 /lib/modules/5.10.60-qnap/ch341.koa) So i'm not sure why i need to download the kernel file from the site you mentioned.
b) what to do next?Also read that you need to redo this after every reboot?
Because drivers are in memory in QNap?You're help is really appreciated. thx!
To compile the module correctly you have to use kernel source code from the sourceforge link above. You may need to edit Makefile from this repo to set a proper KERNELDIR variable pointing to the extracted kernel source code/directory. Then follow readme.txt instructions (mainly do make and make load to compile the module). Then do insmod pathtocompiledmodule/ch34x.ko and at the end modprobe ch34x and voila, your driver is ready to work. If you dont get a proper /dev/ttyUSB0 try 'mknod /dev/ttyUSB0 c 188 0'
If you still struggling with module compiler and you trust some random dml from the internet you can get my pre-compiled version for qnap 5.10 kernel here.
You can also find a compiled version within USB serial drivers 5.0.0 package on qnap forum: https://forum.qnap.com/viewtopic.php?f=320&t=150684&start=30 but on this version I had some communication delays thus I used this repo for my own compilation...
Hope that helps!
/dml
from ch341ser.
Interestingly, my tutorial is mainly based on how the module is to be launched. I did not change anything in the code. I just downloaded it from the Chinese side (their side) while it was still working. After a while someone sent a Pull Request. That is all. I can try but I don't know what their reaction will be...
from ch341ser.
Hi @stman How did you install on ubuntu? I can't see the device in my list I am on Ubuntu 20
I have the file in my drivers list
/usr/lib/modules/5.4.0-52-generic/kernel/drivers/usb/serial/ch341.ko
but lsusb doesnt show the device when i connect it
from ch341ser.
Test On CentOS Linux release 8.3.2011 succesfull
it's works!
from ch341ser.
Hi @stman How did you install on ubuntu? I can't see the device in my list I am on Ubuntu 20
I have the file in my drivers list
/usr/lib/modules/5.4.0-52-generic/kernel/drivers/usb/serial/ch341.ko
but lsusb doesnt show the device when i connect it
Hello.
On Ubuntu, you need to perform the following :
- Place yourself in the directory of the new CH341 source code you downloaded here.
- Compile the source code with
sudo make
- Then you need to suppress the old CH341 module that is already installed typing this command :
sudo rmmod ch341
- Then you need to install the new module
sudo make load
or you can alternatively load it manualy withsudo insmod ch34x.ko
- Please note that these installation are temporary, and you would need to do this process after every boot.
I managed to make it persistant using a hack, but there is a more official way of doing it with modprobe
command.
What I did to make it persistant after reboot was that I erased the old module file "ch341.ko" in the module directory for ubuntu (It's something after /lib/ ... " but I don't remember it right now, so you will have to find this info yourself), I copied the new freshly compiled ch34x.ko to this same directory, but renamed it into ch341.ko, and of course, I changed this file access rights group and owner so that they correspond to what is set for all other modules present in this directory, and then I rebooted and it worked fine.
According to what I have read, the modprobe
command can do the same, but in an automated way. The only difficulty I noticed was that it was necessary to remove the old module, both on disk and in RAM in order to have the new recompiled one taken into consideration.
Then I test unpluging and repluging my CH341 device, and display the debug message with the dmesg
command, that show if the device was well recognized or not, meaning, if the new module replacing the old one that doesn't work, is working normaly.
Please let me know how it worked out for you,
Kind regards,
Frederic.
from ch341ser.
Works like a charm under QNAP QTS 5.0.0:
5.10.60-qnap #1 SMP Tue May 31 09:28:39 CST 2022 x86_64 GNU/Linux
Got a lag under my zigbee coordinator (cc2652P) on a version from USBSerialdrivers_5.0.0_x86_64.qpkg
, but from this repo, the module is 50% smaller thus faster - zero delays.
Thanks!
from ch341ser.
Great to hear that !
from ch341ser.
I think the way to go would be to identify the difference between this module and the official one at https://github.com/torvalds/linux/blob/master/drivers/usb/serial/ch341.c (which pretends to actually support 1a86:7523) :
https://github.com/torvalds/linux/blob/aae703b02f92bde9264366c545e87cec451de471/drivers/usb/serial/ch341.c#L86
and (if CH341SER is under a GPL license), extract and merge the actual changes affecting the communication.
from ch341ser.
Great to hear it works for QNAP as wel... but...
How did you manage to install?
Does it also work for QTS 5.0.1 kernel 5.10.60?
from ch341ser.
Great to hear it works for QNAP as wel... but...
How did you manage to install?
Does it also work for QTS 5.0.1 kernel 5.10.60?
Yes it works for me on 5.10.60.
You have to get qts5.0 toolchain/kernel source from https://sourceforge.net/projects/qosgpl/ and you are ready to compile the module from this repo
Regrds,
dml
from ch341ser.
Thank you for help dml... but...
A bit struggling through.
don't know how to compile. I have found instructions using commands like 'make' and 'insmod', but i'm getting errors when i'm using them.
I have managed to copy (and change the name) the driver file from this site to folder /lib/modules/5.10.60-qnap/ch341.ko followed up with chmod 644 /lib/modules/5.10.60-qnap/ch341.ko
a) So i'm not sure why i need to download the kernel file from the site you mentioned.
b) what to do next?
Also read that you need to redo this after every reboot?
Because drivers are in memory in QNap?
You're help is really appreciated. thx!
from ch341ser.
Well, compiling is still a bridge to far for me for now :(
But your file and instruction did the trick. Works like a charm.
So thx!
from ch341ser.
Related Issues (20)
- RPi 4 - Invalid module format HOT 1
- test ok in ubuntu 22.04
- Missing instructions for SecureBoot HOT 1
- on manjaro linux device detected but not initialized. HOT 3
- `make` error on Linux Mint 20.2 HOT 24
- make error on arch linux —— ch34x.c:1294:27: error: initialization of ‘void (*)(struct tty_struct *, struct usb HOT 5
- Repo transfer
- CH340G
- incompatible-pointer-types error near ch34x_device.set_termios
- Build failed on PopOS 22.04
- Build failed on kernel 5.14.21 HOT 1
- initialization of ‘unsigned int - Werror=incompatible-pointer-types HOT 1
- CH340 keeps repetedly connecting and disconnecting HOT 1
- Device not recognized HOT 1
- brltty driver blocks use of CH340
- Segmentation Fault when accessing the tty device after load
- can`t make HOT 2
- This driver is too old, please refer to the new repo: https://github.com/WCHSoftGroup/ch341ser_linux HOT 1
- insmod: ERROR: could not insert module ch34x.ko: Key was rejected by service
- Can't make file on Ubuntu
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ch341ser.