Gentoo Archives: gentoo-user

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