04
Jan
08

Using a HL-340 USB Serial Adapter against 2.6.23 linux kernel

This device is:

idVendor 0x4348
idProduct 0x5523

There is a patch in -mm kernel tree, so I guess it goes to 2.6.24 soon. But if you don’t want to wait, here is a solution using the new ch341 usb serial driver:


wget http://www.csie.ntu.edu.tw/~b94101/ch341_drv.tar.bz2

Then extract the files and comment out lines 301 and 303 of ch341.c file and also line 35 of the tty_ioctl.c file.

Finally run ins.sh to compile and load the modules and use minicom, cu, cutecom or what you prefer to connect to the /dev/ttyUSB0 device.

I’ve seen some people trying to use pl2303 driver with a little patch to use this device. It doesn’t work.


8 Responses to “Using a HL-340 USB Serial Adapter against 2.6.23 linux kernel”


  1. March 3, 2008 at 13:33

    That works! There are too much people spreading the pl2303 patch… and exactly, this didn’t work. This one works perfect!

    Thank you.

  2. 2 axiohm
    April 2, 2008 at 13:00

    i tried to install the package in Ubuntu 7.04 with 2.6.20 kernel version and it failed doing so.

    How can i install the driver to my Ubuntu box?

    Thanks!

  3. 3 slyfox
    May 22, 2008 at 03:45

    Indeed, linux supports ch341 now. Remember to put pl2303 in /etc/modprobe.d/blacklist to prevent the kernel from using it as the converter.
    The correct converter should be ch341-uart.

  4. 4 Kanwar
    October 14, 2008 at 03:22

    I have this version of linux

    Linux version 2.6.24-19-generic (buildd@terranova) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Wed Aug 20 22:56:21 UTC 2008

    I tried the first post steps for my HL-340 USB to Serial Converter. All the data I receive is garbage.I did not install any patch for 2.6.24. Where to find this patch?
    I have set the 115200 baud rate from the GTK terminal.Here is my terminal dump.

    root@kanwar-laptop:/home/kanwar/Desktop/ch341_drv# /bin/sh ins.sh
    make -C /lib/modules/2.6.24-19-generic/build SUBDIRS=/home/kanwar/Desktop/ch341_drv modules
    make[1]: Entering directory `/usr/src/linux-headers-2.6.24-19-generic’
    Building modules, stage 2.
    MODPOST 2 modules
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-19-generic’
    insmod: error inserting ‘tty_ioctl.ko’: -1 Invalid module format
    insmod: error inserting ‘ch341.ko’: -1 File exists

    I also tried to add a line
    blacklist pl2303 in blacklist file.Still the same.

    Any help will be appreciated. I am new to linux and i have just started to play with it.

    Thanks.

  5. 5 Stream
    October 15, 2008 at 02:21

    Rebooting the system will fix this issue.

  6. 6 sam
    October 29, 2008 at 14:10

    okkkkkkkkkkkkkkkkkkkkkkkkkkkkk

  7. 7 Desperate
    February 3, 2009 at 11:24

    Is there any chance of putting HL-340 with this vendor id and product id, working in MAC OS X?


Leave a Reply




that's me, duh! :) click to know a bit more.

by language

flickr photostream

Caixa Forum

Caixa Forum

More Photos

blog stats

  • 47,873 hits

Twitter Updates