Skip to content

Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341)

Here is what dmesg reports :
New USB device found, idVendor=1a86, idProduct=7523
New USB device strings: Mfr=0, Product=2, SerialNumber=0
Product: USB2.0-Ser!

It works fine with the ch341 driver, I just had to add one line to drivers/usb/serial/ch341.c:
static struct usb_device_id id_table [] = {
{ USB_DEVICE(0x4348, 0x5523) },
{ USB_DEVICE(0x1a86, 0x7523) },
{ },
};

The relevant lines from my .config are:
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_CH341=m

From the module comments:
ch341.c implements a serial port driver for the Winchiphead CH341.

The CH341 device can be used to implement an RS232 asynchronous serial port, an IEEE-1284 parallel printer port or a memory-like interface. In all cases the CH341 supports an I2C interface as well. This driver only supports the asynchronous serial interface.

I'm currently using a "vanilla" kernel 2.6.25.4.
  • Twitter
  • Bookmark Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341)
  • Mixx Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341)
  • Bloglines Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341)
  • Technorati Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341)
  • Fark this: Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341)
  • Bookmark Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341) at YahooMyWeb
  • Bookmark Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341) at Furl.net
  • Bookmark Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341) at reddit.com
  • Bookmark Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341) at blinklist.com
  • Bookmark Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341) at Spurl.net
  • Bookmark Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341) at NewsVine
  • Bookmark Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341) at Simpy.com
  • Bookmark Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341) at blogmarks
  • Bookmark Using the HL-340 USB-serial adapter with Linux (1a86:7523, driver ch341) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Print this article!
  • E-mail this story to a friend!
  • Identi.ca

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

crox on :

With the new 2.6.26 kernel you don't need to change anything, it's already there.

net blues on :

Just compiled under centos 5.4 i386
Linux atom.home.loc 2.6.18-348.el5 #1 SMP Tue Jan 8 17:57:28 EST 2013 i686 i686 i386 GNU/Linux

In addition to info above
had to comment out what is suggested here
http://softwarelivre.org/gud-ba/blog/using-a-hl-340-usb-serial-adapter-against-2.6.23-linux-kernel

AND
everything after
EXPORT_SYMBOL_GPL(tty_encode_baud_rate);
in tty_ioctl.c
and also remove the
.usb_driver line
in ch341.c (circa line 320).
after compiling and insterting
I got
drivers/usb/serial/usb-serial.c: USB Serial support registered for ch341-uart
ch341 4-1:1.0: ch341-uart converter detected
usb 4-1: ch341-uart converter now attached to ttyUSB3
usbcore: registered new driver ch341

Haven't tried connecting anything yet, but it seems it will work...

Carlos on :

if anyone have problems with ch341 drivers on Ubuntu 14.04 I have a patched driver and it works with 3.13.X kernel:

https://www.mediafire.com/?3ph5x6ttc7ddde4

thanks to:

http://stackoverflow.com/questions/23040820/driver-ch341-usb-adapter-serial-port-or-qserialport-not-works-in-linux

The author does not allow comments to this entry

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options