Re: ch341

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 07, 2016 at 04:42:21AM -0800, Russell Senior wrote:

> I just bought a bag of usb-serial converters off of ebay, from china for
> super low price (~$2/each).  I just plugged a couple of them in,
> connected together through a null-modem adapter.  When I plug them, on
> both stock ubuntu 16.04's kernel and 4.8.9 built from git, I get a
> reasonable looking dmesg:
> 
> [822616.501963] usb 2-2.3: new full-speed USB device number 16 using xhci_hcd
> [822616.602985] usb 2-2.3: New USB device found, idVendor=1a86, idProduct=7523
> [822616.602988] usb 2-2.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
> [822616.602989] usb 2-2.3: Product: USB2.0-Ser!
> [822617.633618] usbcore: registered new interface driver usbserial
> [822617.633638] usbcore: registered new interface driver usbserial_generic
> [822617.633653] usbserial: USB Serial support registered for generic
> [822617.638736] usbcore: registered new interface driver ch341
> [822617.638755] usbserial: USB Serial support registered for ch341-uart
> [822617.638770] ch341 2-2.3:1.0: ch341-uart converter detected
> [822617.640272] usb 2-2.3: ch341-uart converter now attached to ttyUSB0
> [822625.294363] usb 2-2.2: new full-speed USB device number 17 using xhci_hcd
> [822625.395324] usb 2-2.2: New USB device found, idVendor=1a86, idProduct=7523
> [822625.395327] usb 2-2.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
> [822625.395328] usb 2-2.2: Product: USB2.0-Ser!
> [822625.396487] ch341 2-2.2:1.0: ch341-uart converter detected
> [822625.397575] usb 2-2.2: ch341-uart converter now attached to ttyUSB1
> 
> I attach the tty's with GNU screen (but I have also tried microcom and
> minicom with the same results).  This was my first experience with or
> even awareness of ch341. I have much more experience with pl2303 and
> somewhat less with ftdi.  With these ch341, when I type in an 'a' on one
> terminal, I get 0x01 out the other terminal.  If I type in a 'b', I get
> an 0x02, etc, on up to 'z' yielding 0x1a.
> 
> I found your name/contact in the git commits.
> 
> Any idea what is going on?

Sounds like it could be related to an incorrect line setting (e.g. the
devices are using 5-bit words). Some changes just went in that add
support for changing this. Could you try building a kernel based on the
usb-next branch of:

	git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git

and see if that works better?

> My leading theory at the moment is that the manufacturer didn't populate
> all the parts, and the vendor got an great deal on them, which they
> passed on to me!

Note that some of these converters use TTL-level signalling which could
appear as corrupt transfers if you try to connect it to an RS232 port
(but not when connecting to another device also using TTL).

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux