Gentoo Archives: gentoo-user

From: R0b0t1 <r030t1@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Struggling with CH340 serial<=>USB converter (Arduino related)
Date: Tue, 25 Jul 2017 19:24:41
Message-Id: CAAD4mYi1rHe9ajngeg5nLmmhJq6OMsdA+C-CQKidLnx1_XmN6A@mail.gmail.com
In Reply to: [gentoo-user] Struggling with CH340 serial<=>USB converter (Arduino related) by tuxic@posteo.de
1 On Tue, Jul 25, 2017 at 12:17 PM, <tuxic@××××××.de> wrote:
2 > Hi,
3 >
4 > (yes, I also have a FTDI USB<=>serial adapter...in this case I need to
5 > get my CH340 based work)
6 >
7 > this drives me crazy...
8 >
9 > My CH340G USB<=>serial adaptor is recognized as
10 > (lsusb)
11 > Bus 007 Device 011: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
12 > (dmesg)
13 > [52255.016438] usb 7-4: new full-speed USB device number 11 using ohci-pci
14 > [52255.167432] usb 7-4: New USB device found, idVendor=1a86, idProduct=7523
15 > [52255.167439] usb 7-4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
16 > [52255.167443] usb 7-4: Product: USB2.0-Serial
17 > [52255.169580] ch341 7-4:1.0: ch341-uart converter detected
18 > [52255.179543] usb 7-4: ch341-uart converter now attached to ttyUSB3
19 >
20 >
21 > But that's it.
22 >
23 > It does not seem to react on any kind of action I try to achieve with
24 > avrdude (I skipped the arduino IDE to get one variable off this
25 > eqyitation...).
26 >
27 > I instructed avrdude to "speak to the board" like this:
28 > avrdude -p ATmega2560 -c arduino -P /dev/ttyUSB3 -b 9600
29 >
30 > ...but the only reaction I get is ...timeouts...
31 >
32 > I have no clue what to do next.
33 >
34 > How can I devide the things which are working so far from those
35 > which are not working.
36 >
37 > The ATmega2560 board is working - I can flash it via buspirate (ICSP).
38 > I burned a bootloader with that...just to mention...not wanting to
39 > start an Arduino discussion on a Gentoo mailinglist...only to
40 > explain the context a little bit...
41 >
42 > What is the status of the ch340/ch341 driver?
43 > (I am running kernel 4.12.3 vanilla right off Linus desktop so to
44 > say...)
45 >
46 > Thanks a lot for any help in advance!
47 > Cheers
48 > Meino
49 >
50
51 If the device creates a /dev node there is probably no issue with the
52 driver. The default Arduino speed is now 57,600, are you sure 9,600 is
53 right? Before that it was 38,400. Use the ICSP interface to flash a
54 program that prints things via serial and see if you can receive them.
55 If your serial connection is unreliable you will get garbled
56 characters.
57
58 Avrdude should eventually time out with a message, what is that message?
59
60 I have been experiencing similar problems that you have described with
61 various Arduino and Arduino-derived boards and so far have not been
62 able to explain it. Most of the time they work perfectly but some do
63 not and the bootloader seems to refuse to work.
64
65 R0b0t1.

Replies