Ch340g adapter: strange characters

I'm working on USB 2.0 CH340G TTL Converter Adapter
in an attempt to flash OpenWRT to TL-WR1043ND v2.1.
I use Macbook Pro mid 2012, with Mojave.

It looks like it's connecting. And a message "Autobooting in 1 second" should appear, then I should type "tpl". However, the message that shows up is unreadable:

albertus:dev johanna$ sudo cu -l /dev/cu.wchusbserial1410 -s 115200
?C?ap??j????ion?.0?5?  Ҋ4:?)
srZC?5?????n 1	j
                 ??E?r_i+????_co˥??211)'B??&?ѥ dd?LJ??t
? 4 M?C?cu: Got hangup signal…??5aaMM	???)

albertus:dev johanna$ sudo cu -l /dev/cu.wchusbserial1410 -s 115200
Sorry, try again.
?C?UI??с1.1.BRչ 1??01j??:14'?Jj

?Hh5????on?L	j
                 ath?}?nitZX?5?nfiI??J: (L3??) d?? ?+?5
                                                       tap? 0A00????j
                                                                     Ta?Bb??, hZ+	?(0??յXXM	???)
?X?vX???= (??,??ᬂx8	???)
 ?j	5

I enabled all the character encodings, but it never shows up right. (The only readable message "hang up" shows up when I pull the device out) And whatever I type in, it doesn't react at all.
Does anyone know what it's supposed to be saying, is it somewhat working? Connection seems to be really there, so I think the driver is OK.

I would appreciate your info!

Don't use such adapters.
Search for CP2102, PL2303, etc.

Check the connections first, especially GND. My CH340 adapters usually work fine although the CP2102 is better. I would not recommend the PL230x (bad experience with older hardware).

1 Like

Thank you very much for your suggestions. I didn't know that there are a few other possibilities. I will check the connection, perhaps borrow a windows machine to give it a try, but I will look for CP2102 before spending too much time with ch340.
Now, I checked the description of what I bought; it actually says this:

Isn't it supposed to be the same?
Are the ones that only say CP2102, with red board, all the same, regardless of the price and the origin? Cheap ones are from China....

With such text they are cheating the customers.
Just search for PL2303 on the site you mentioned at the beginning.
Please also see a similar discussion here: Ubiquiti Loco M5 USB TTL connecting - #10 by AndrewZ

There are different manufacturers of USB-to-TTL adapters. The product description contains the names of the most famous ones - here is a short list of manufacturers and their ICs:

Prolific: PL2303
SiLabs: CP2102

They are soldered onto different boards, some (most?) are even fake, so make sure to buy from reliable sellers. Mine have always worked, with the exception of one CH341A-based programmer where the logic level was too high (the PCB design was bad, this could be fixed).

Usually, you want a 3.3V version and please make sure to only connect Rx, Tx and GND - never connect VCC.

If same adpater remove the 3 leds


That quoted behaviour often indicates either an unreliable GND connection or wrong voltage settings (which might damage the board).

@Annick Thank you for your hint ! Yeah, it's the same one. I will give it a try, but perhaps first I will check GND connection, as both @slh and @andyboeh mention. Perhaps I should really solder pins. I just put the male jack of jumper cable in the hole, but the holes are larger than the pinheads. The connection was probably not stable after all.

I do that as well, but I usually use a rubber band to pull the pin header into one direction in order to improve contact.

Try to see if you can find a jst connector that fits.

What is the advantage compared to a simple pin header?

You don't have to solder, just insert. It is meant as an easy solution, for a quick and dirty connection, that you will use only for a couple of minutes.

What am I not understanding here? The JST header needs to be soldered as well or it "fits" to the holes in exactly the same way as any other pin header!?

NB: I'm not questioning the header, this works way better than the cables. But why JST and not "simple" pin headers?

I think we are just talking about the same object, but each with a different name :wink:
As long as you can insert a multiple pin headers that fit, it will work. Whatever precise connector type it is.

1 Like

Agreed - I was questioning the JST because you need a crimping tool for the cables whereas you can just use dupont cables (jumper cables) with pin headers (sockets):

That's it, we are talking about the same thing. What I had in mind was a shrouded pin header, despite I don't know why a shrouded one would be better :rofl:
A single line pin header would just be fine. Happy soldering (or not).

Thank you all for various tips! I'm planing on soldering pins that I took out of the male end of a jumper cable. I tore the plastic part out to get the pin. I have quite a few of them, so I don't have to buy anything.
I had thought that I could get away with soldering, but if stable contact does play an important role, I guess it's good to solder... I do have tools for it. Only, I don't have dupont pins, but I guess male jacks would do...



Now, I soldered some pins (from male jack of jumper cables), the connection seems OK. I discovered a few things: there are two contradictory instructions about setting the voltage, and I had followed the wrong one: i.e. I was supposedly setting it 5V. But, I checked the voltage, and it wasn't even 4V. This adapter is 3.3V without any shorting of pins. Now, I checked the voltage, and one of Tx or Rx got about 3.3V, but the other one got only about 2.5V.

Nonetheless, with turning on and off and messing around, I got the following: sorry, it's long!

albertus:dev johanna$ sudo cu -l /dev/cu.usbserial-1410 -s 115200
??UI?ot ?)r??Ju
?HapL?jSco.???1.??5?   1???҂?)
s?ZC???K??on ?	j
?t?= ??0?????j           ??l_c?˥??211J'B??&??% dd?J??t
? 4 M?C?Y.?B0x8X???, 0?? 0?)?…??5aa?M	???)
?C?ap??j????ion?.0?5?  5??҂?)
s?ZC?5?????n 1	j
                 a?E??_i?ZW+?_co?V?178)?B???ѥ ddr?J???
ta?= ??00?00?HT?(l? ?Z+	? (??,???dJC!U? va??́= (??? •??•? 0xeJC?6?j	5
                                                                             j??ՙId •?? De?Z?V?? 0?b"?٥?eId????7
    ??镁8MB?????or 㫹с= 1&j
                           ?+͡?  8?S?H?ծ˝?def?]??envi?˵??t
?????ria?HO????ɥ?l?WLANj??ձe n??f????!!!!
Q.? s?+?5
         Net:? a??u??c_e??}??itiX??9..??ѡ?s_s?[ZZ%??}??l:????valu???•5
                                                                      Nﲅ??d a䖕?? in2??͡. U?˝?fix?
                          ????? a䖕?? in?+͡. U?˝?fixe
                                                    ???essC?ath_V+?}?net????ial鯖??͕?mas-?,??00?C?S?K???n  KKK?S1?!e?*
ath?????eg_Z??? com??ѕ
:?,?? 0x8?????? c֖???11S?et
                                              ath???eg_?+?}?an ?˕5
'??1 0????000?,?? 0x7??j?eth1???be:f᧬???:4LC?eth???5
                                                    ethb e?+j
                                                             ?ѥ?g ??81L?ʂto ??8?LXL?V?A]?K??tinJ??1 se?ˑ?
## B?
     ??? i?XV?at 9撂??? .ɩ
??SW?ѥ?g kY.??...C?H??    0.000000] Li?ux?version 4.14.80 ?hs?uilder@buildbox0?) ?gcc version 7.3.? (?penWrt GCC 7.3.0?63?06e62839bfb80a44?17?6cbd4a285d672ea7?))?#0 Mon Mar 4 13:?1:?9 2019
[ ?  ?.000000] bootcon?ol? [early0] enable?
?[    0.?00?00] SoC: Qualcom? A?heros QCA9558 ve? 1?rev 0
[  ? 0?000000] Determin?d ?hysical RAM map:?
                                            [    0.00000?] ?memory: 04000000?@ ?0000000 (usable)?
                 [    0.000000] ?ni?rd not found or ?mp?y ? disabling in?tr?
[ ?  ?.000000] Primary?in?truction cache 6?kB? VIPT, 4-way, li?es?ze 32 bytes.
[    0.000000] P?im?ry data cache 32?B,?4-way, VIPT, cac?e ?liases, linesize?32?bytes
?[    0.000000] M?va?le zone start fo? e?ch node?0-?x0000000003fffff?]
[    0.?00?00] Early memory?no?e ranges
?  ? 0.000000]   nod?  ?0: [mem 0x000000?00?000000-0x0000000?03?fffff]
[ ?  0.000000] Init?em?setup node 0 [me? 0?00?0000000000000-0x?00?000003ffffff]
[    0.000?00? r?ndom: get_random?by?es called from s?ar?_kernel+0x8c/0x4?4 ?ith?[    0.00000?] ?uilt 1 zonelists? m?bility grouping ?n.? Total pages: 16?56?
                                                                             [    0.00?00?] Kernel command?li?e:  board=TL-WR1?43?D-v2  console=tt?S0?115200 roo?[    0.000000] D?nt?y cache hash tab?e ?ntries: 8192 (or?er? 3, 32768 bytes)?
                                                                              ?    0.000000] In?de?cache hash table?en?ries: 4096 (orde?: ?, 16384 bytes)
[ ?  0.000000] Writ?ng?ErrCtl register=?00?0000
[    0.000?00? R?adback ErrCtl re?is?er=00000000
[?  ?0.000000] Memory? 5?588K/65536K avai?ab?e (3408K kernel ?od?, 180K rwdata, 8?4K?rodata, 296K ini?, ?01K bss, 5948K r?se?ved, 0K cma-rese?ve?)
[    0?00?000] SLUB: HWali?n=?2, Order=0-3, Mi?Ob?ects=0, CPUs=1, ?od?s=1
[    0.00?00?] NR_IRQS: 51
[    0.0?00?0] Clocks: CPU:7?0.?00MHz, DDR:600.0?0M?z, AHB:200.000MH?, ?ef:40.000MHz
?  ? 0.000000] clock?ou?ce: MIPS: mask: ?xf?ffffff max_cycle?: ?xffffffff, max_i?le?ns: 5309056796 n?
[    0.?00?07] sched_clock:?32?bits at 360MHz, ?es?lution 2ns, wrap? e?ery 5965232126ns?
        [    0.?08?95] Calibrating ?el?y loop... 358.80?Bo?oMIPS (lpj=17940?8)?
                                                                               [?[ ?  0.080083] Moun?-c?che hash table e?tr?es? 1024 (order:?0,?40?6 bytes)
[    0.0871?4]?Mountpoint-cache?ha?h table entries:?10?4 (order: 0, 409? b?tes)
[   ?0.?96453] devtmpfs:?in?tialized
[    0.?00?62] clocksource:?ji?fies: mask: 0xff?ff?ff max_cycles: 0?ff?fffff, max_idle_?s:?1911260446275000? n?
[  ? 0?110861] futex ha?h ?able entries: 25? (?rder: -1, 3072 b?te?)
?    0.117779] NE?: ?egistered protoc?l ?amily 16
[?   0.125970] MIP?: ?achine is TP-LIN? T?-WR1043ND v2
[ ?  ?.626748] clockso?rc?: ?witched to cl?ck?ou?ce MIPS
[    ?.6?6465] NET: Regis?er?d protocol famil? 2?
                                                 [ ?  ?.641816] TCP est?bl?shed hash table ?nt?ies: 1024 (order? 0? 4096 bytes)
[    0.649282] T?P ?ind hash table e?tr?es: 1024 (order:?0,?4096 bytes)
[ ?  ?.656057] TCP: Ha?h ?ables configured?(e?tablished 1024 b?nd?1024)
[    0.6629?5]?UDP hash table e?tr?es: 256 (order: ?, ?096 bytes)
[   ?0.?69216] UDP-Lite ?as? t?ble entries: ?56?(o?der: 0, 4096 byt?s)?
                                                                       [    0.?76?27] NET: Registe?ed?protocol family ?
[?  ?0.682765] Crashl?g ?llocated RAM at ?dd?es? 0x3f00000
?[    0.70?79?] squashfs: vers?on?4.0 (2009/01/31)?Ph?llip Lougherr?er?0
?  ? 0.707032] jffs2? v?rsion 2.2 (NAND)?(S?MMARY) (LZMA) (R?IM?) (CMODE_PRIORIT?) ?c) 2001-2006 Red?Ha?, Inc.
[    0.72563?] ?o scheduler noop?re?istered
[ ?  ?.729850] io sche?ul?r deadline regis?er?d (default)
[    0.7359?5]?Se?ial: 8250/16550 ?ri?er, 1 ports, IRQ?sh?ring disabled
??  ? 0.767692] seria?82?0.0: ttyS0 at MM?O ?x18020000 (irq =?11? base_baud = 250?00?) is a 16550A
[    0.776877] console [ttyS0] enabled
[    0.776877] console [ttyS0] enabled
[    0.784281] bootconsole [early0] disabled
[    0.784281] bootconsole [early0] disabled
[    0.802982] loop: module loaded
[    0.808208] m25p80 spi0.0: found s25fl064k, expected m25p80
[    0.826271] m25p80 spi0.0: s25fl064k (8192 Kbytes)
[    0.831638] 5 tp-link partitions found on MTD device spi0.0
[    0.837318] Creating 5 MTD partitions on "spi0.0":
[    0.842185] 0x000000000000-0x000000020000 : "u-boot"
[    0.848921] 0x000000020000-0x00000018ea3c : "kernel"
[    0.855809] 0x00000018ea3c-0x0000007f0000 : "rootfs"
[    0.862276] mtd: device 2 (rootfs) set to be root filesystem
[    0.868131] 1 squashfs-split partitions found on MTD device rootfs
[    0.874405] 0x000000630000-0x0000007f0000 : "rootfs_data"
[    0.882003] 0x0000007f0000-0x000000800000 : "art"
[    0.888692] 0x000000020000-0x0000007f0000 : "firmware"
[    0.896619] libphy: Fixed MDIO Bus: probed
[    0.915705] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
[    1.607154] libphy: ag71xx_mdio: probed
[    2.238272] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[    2.249566] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    2.566741] random: fast init done
[    2.878317] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:SGMII
[    2.886271] ipip: IPv4 and MPLS over IPv4 tunneling driver
[    2.892423] NET: Registered protocol family 17
[    2.898705] 8021q: 802.1Q VLAN Support v1.8
[    2.909428] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    2.925052] devtmpfs: mounted
[    2.933399] Freeing unused kernel memory: 296K
[    2.937964] This architecture does not have kernel memory protection.
- booting 3.0-6007 -
- found board tl-wr1043nd-v2 -
[    4.576886] eth1: link up (1000Mbps/Full duplex)
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- mounting jffs2 partition /dev/mtdblock3 to /tmp/overlay -
[    7.699289] jffs2: notice: (402) jffs2_build_xattr_subsystem: complete building xattr subsystem, 92 of xdatum (3 unchecked, 89 orphan) and 107 of xref (89 dead, 0 orphan) found.
/tmp/overlay is a mountpoint
- switching to overlay -
[    7.912939] overlayfs: upper fs does not support tmpfile.
[    7.964461] eth1: link down
- run init -
init started: BusyBox v1.29.3 ()

Please press Enter to activate this console. sysinit: run /etc/rc.d/S10boot boot 
sysinit: - apply uci defaults -
sysinit: - loading modules -
[    8.392736] udevd[446]: starting version 173
[   10.047879] usbcore: registered new interface driver usbfs
[   10.053519] usbcore: registered new interface driver hub
[   10.059073] usbcore: registered new device driver usb
[   10.088870] tun: Universal TUN/TAP device driver, 1.6
[   10.105076] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.119104] ehci-platform: EHCI generic platform driver
[   10.124481] ehci-platform ehci-platform.0: EHCI Host Controller
[   10.130571] ehci-platform ehci-platform.0: new USB bus registered, assigned bus number 1
[   10.140874] ehci-platform ehci-platform.0: TX-TX IDP fix enabled
[   10.146996] ehci-platform ehci-platform.0: irq 48, io mem 0x1b000000
[   10.176793] ehci-platform ehci-platform.0: USB 2.0 started, EHCI 1.00
[   10.185854] hub 1-0:1.0: USB hub found
[   10.242969] hub 1-0:1.0: 1 port detected
[   10.247479] ehci-platform ehci-platform.1: EHCI Host Controller
[   10.253508] ehci-platform ehci-platform.1: new USB bus registered, assigned bus number 2
[   10.263859] ehci-platform ehci-platform.1: TX-TX IDP fix enabled
[   10.269992] ehci-platform ehci-platform.1: irq 49, io mem 0x1b400000
[   10.296820] ehci-platform ehci-platform.1: USB 2.0 started, EHCI 1.00
[   10.312732] hub 2-0:1.0: USB hub found
[   10.320877] hub 2-0:1.0: 1 port detected
[   10.341000] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   10.605529] u32 classifier
[   10.608339]     input device check on
[   10.612050]     Actions configured
[   10.651257] Mirror/redirect action on
[   10.919064] arp_tables: arp_tables: (C) 2002 David S. Miller
[   10.961317] Loading modules backported from Linux version v4.19-rc5-0-g6bf4ca7fbc85
[   10.969140] Backport generated by backports.git v4.19-rc5-1-0-g05571dcd
[   11.355552] ieee80211 phy0: Atheros AR9550 Rev:0 mem=0xb8100000, irq=47
[   11.371681] Ebtables v2.0 registered
[616] 01:00:11 addif: INTERFACE="teql0" cfgs=""
[   11.713671] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.902979] xt_time: kernel timezone is -0000
[   12.093524] lib80211: common routines for IEEE802.11 drivers
[758] 01:00:12 addif: INTERFACE="wlan0" cfgs=""
[   12.238212] PPP generic driver version 2.4.2
[   12.267499] NET: Registered protocol family 24
sysinit: - loading modules finished -
sysinit: run /etc/rc.d/S30sysctl boot 
sysinit: run /etc/rc.d/S40network boot 
[   14.272130] eth1: link up (1000Mbps/Full duplex)
[   14.277664] eth1: link down
[   16.223552] eth1: link up (1000Mbps/Full duplex)
[   16.229081] eth1: link down
[   16.349889] eth1: link up (1000Mbps/Full duplex)
[   16.439754] br-can: port 1(eth1) entered blocking state
[   16.445067] br-can: port 1(eth1) entered disabled state
[   16.450637] device eth1 entered promiscuous mode
[1180] 01:00:16 addif: INTERFACE="br-can" cfgs="can "
[   17.376865] br-can: port 1(eth1) entered blocking state
[   17.382181] br-can: port 1(eth1) entered forwarding state
[   19.618290] eth0: link up (1000Mbps/Full duplex)
[1642] 01:00:21 addif: INTERFACE="wlan0" cfgs=""
sysinit: Configuration file: /var/run/hostapd-phy0.conf
[   21.686430] br-can: port 2(wlan0) entered blocking state
[   21.691878] br-can: port 2(wlan0) entered disabled state
[   21.697522] device wlan0 entered promiscuous mode
sysinit: wlan0: interface state UNINITIALIZED->C[   21.706422] random: hostapd: uninitialized urandom read (7 bytes read)
s[   21.714538] random: hostapd: uninitialized urandom read (1024 bytes read)
ysinit: Using interface wlan0 with hwaddr e8:de:27:fd:2a:7e and ssid "St.Walburg_HOTSPLOTS"
[   21.749865] br-can: port 2(wlan0) entered blocking state
[   21.755270] br-can: port 2(wlan0) entered forwarding state
sysinit: wlan0: interface state COUNTRY_UPDATE->ENABLED
sysinit: wlan0: AP-ENABLED 
[   23.868304] device wlan0 left promiscuous mode
[   23.872886] br-can: port 2(wlan0) entered disabled state
[   23.959903] br-can: port 2(wlan0) entered blocking state
[   23.965300] br-can: port 2(wlan0) entered disabled state
[   23.970991] device wlan0 entered promiscuous mode
[   23.975812] br-can: port 2(wlan0) entered blocking state
[   23.981247] br-can: port 2(wlan0) entered forwarding state
sysinit: - network started -
sysinit: run /etc/rc.d/S45firewall boot 
sysinit: Loading defaults
sysinit: Loading synflood protection
sysinit: Adding custom chains
sysinit: Loading zones
sysinit: Loading forwardings
sysinit: Loading redirects
sysinit: Loading rules
sysinit: Loading includes
sysinit: Optimizing conntrack
sysinit: Loading interfaces
sysinit: run /etc/rc.d/S50cron boot 
sysinit: run /etc/rc.d/S50dropbear boot 
[   29.839922] random: dropbear: uninitialized urandom read (32 bytes read)
sysinit: run /etc/rc.d/S50ntpclient boot 
sysinit: run /etc/rc.d/S50uhttpd boot 
sysinit: run /etc/rc.d/S60dnsmasq boot 
[   30.502540] random: dnsmasq: uninitialized urandom read (128 bytes read)
[   30.509422] random: dnsmasq: uninitialized urandom read (48 bytes read)
sysinit: run /etc/rc.d/S93hotsplots boot 
sysinit: run /etc/rc.d/S94chilli boot 
sysinit: run /etc/rc.d/S95done boot 
sysinit: run /etc/rc.d/S96hsvpn boot 
[   31.845920] hsvpn: module license 'HOTSPLOTS' taints kernel.
[   31.851727] Disabling lock debugging due to kernel taint
[   31.996267] HSVPN legacy support
[   32.008028] tunnel-net=
[   32.126460] HSVPN initialized
[   32.304940] random: curl: uninitialized urandom read (127 bytes read)
[   32.311539] random: curl: uninitialized urandom read (1024 bytes read)
[   32.331506] random: curl: uninitialized urandom read (127 bytes read)
[2215] 01:00:32 addif: INTERFACE="tun.hs" cfgs=""
[   34.304067] tunnel 1: add link id=3612940187 prio=100 fwmark=0
sysinit: 3612940187
[   34.330941] link 3612940187: disconnect: new server
sysinit: run /etc/rc.d/S96led boot 
sysinit: setting up led USB
sysinit: setting up led WLAN
sysinit: run /etc/rc.d/S98sysntpd boot 
sysinit: run /etc/rc.d/S99hs_watchd boot 
[   46.496753] link 3612940187: disconnect: link timeout
[   46.501948] link 3612940187: disconnect: new server
[   58.736755] link 3612940187: disconnect: link timeout
[   58.741936] link 3612940187: disconnect: new server
[   70.976753] link 3612940187: disconnect: link timeout
[   70.981928] link 3612940187: disconnect: new server
[   78.931302] random: crng init done
[   78.934768] random: 1 urandom warning(s) missed due to ratelimiting
[   83.216758] link 3612940187: disconnect: link timeout
[   83.221942] link 3612940187: disconnect: new server
[   95.456754] link 3612940187: disconnect: link timeout
[   95.461943] link 3612940187: disconnect: new server

You see in the beginning it's still mixed up, but still it was running, and gradually it became readable, and at some point, there was no more incomprehenvie signs.

However, I read it and don't know what I'm supposed to do: there was no word of booting or flashing or so, I typed "tpl", but it doesn't seems to have done anything.....

First, am I right to assume that I didn't fry the board? Second, i see that it says something was crashing, and hotsplots taints the kernel. Hotsplots is the wifi provider I used to have, and they gave me this router that was leased for 60Euro/Mo.
I wonder if the router is hopelessly contaminated by hotsplots, that I can't save?

I will appreciate your hints !!