Skip to content

notes on adding parity control to ch341 linux usb serial driver

Notifications You must be signed in to change notification settings

karlp/ch341-linux

Repository files navigation

!!OBSOLETE!!

Note, somone finally had the patience/pigheadedness to break down the lkml enough to actuallly
allow a bugfix to this driver, and parity/flowcontrol/wordsize are now all properly supported since about 4.9/4.10, 
with a bunch more little fixes and cleanups around the 4.10/4.11.  You shouldn't need any of this work anymore,
nor should you need you need any other drivers for these parts.

~~~~~ original notes below ~~~~~~


notes on adding parity control support to ch341.c, the linux driver for, 
as BSD calls it, "the worst usb serial chip in the world"

it actually works just fine in windows, and in linux with no-parity, at least
for the basic usages I have for it, but yeah, it's ugly datasheet world :)

http://wch-ic.com/product/usb/ch341.asp

Now to just actually edit the kernel module...

Enabling debug from the kernel module:
sudo su -c 'echo "file ch341.c +p" > /sys/kernel/debug/dynamic_debug/control'
or
sudo su -c 'echo "module ch341 +p" > /sys/kernel/debug/dynamic_debug/control'

Building it (from a linux tree checkout matching your running kernel on
fedora...)
make -C /lib/modules/`uname -r`/build M=`pwd`/drivers/usb/serial modules

(First time, to get that running kernel... notes to self...
make mrproper
cp /boot/config-xxxx .config
make oldconfig
make
make modules
sudo make modules_install
sudo make install
~reboot here~


I have the YSUMA01-341A, plus what ever's inside the 485 dongle
YSUMA01-341A  	http://item.taobao.com/item.htm?id=14541759710
YS-CH341T	http://item.taobao.com/item.htm?id=16318219421
YS-CH340T	http://item.taobao.com/item.htm?id=17164157198
HL-340		http://item.taobao.com/item.htm?id=17786652096

~ TO GET VirtualBox working again ...
yum install VirtualBox-kmodsrc
cd "somewhere" && tar -xf /usr/share/VirtualBox-kmod-4.3.18/VirtualBox-kmod-4.3.18.tar.xz
cd vboxdrv && make && sudo make install
cd vboxnetflt && make && sudo make install
cd vboxnetadp && make && sudo make install
sudo systemctl restart systemd-modules-load.service

About

notes on adding parity control to ch341 linux usb serial driver

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published