Minor garbling on serial console TTY

I've attached a serial console to my WR-741ND to try and help figure something out. I get lots of nice clear text if I do something like logread, however a simple ls has lots of readable but some consistently garbled content: same places, same ASCII type graphics characters - generally start and end of line.

I read the advice on the device page re the using pull-up/-down resistors, but am not seeing any improvement. I don't have an oscilloscope to look at wave forms in full detail. Are there any tests I can do with a multimeter to try and see if it is an electrical signal issue?

Or are there some things like terminal type, use of terminal control characters (I tried ls --color=none for example) that might be causing it?

The most likely reasons involve unreliable cabling (bad GND soldering) or too long cables (try to keep them under or around 20 cm).


Thanks for the suggestion. I greatly shortened the wire I was using, although it was a shielded pair from a desktop PC CD audio cable (serial header fits socket very nicely :)) so fairly noise immune I think. Anyway, it made no difference.

After more investigation I found the router and serial-USB device I was using had very different ground potentials. Router was using the supplied wall-wart, while the serial-USB was an Arduino Uno with chip removed (so the RX/TX could be wired to router) powered via USB from laptop.

Ground pin of router to ground of Arduino was ~4V! I think various incantations of pulling router TX and / or RX to Arduino 3.3V / 0V were helping get at least RX or TX work better, but there must have been some odd currents flowing around and probably confusing serial signals, hence the "tearing" and misprints in things like the OpenWRT serial console banner.

After rewiring things so that router is powered with 5V to the 4th pin on serial header from another PC USB port the grounds match, and serial output seems to be perfectly clean but still needs the pull-up mentioned in the Hardware page.

One thing that threw me though is that the filesystem does seem to have some very strangely named files with non-printing characters in them.

This is from a "good" device (random uname command to show no mangling, then ls of root directory):

root@WN604-A:/# uname -a
Linux WN604-A 4.19.115 #0 Sat May 9 18:02:17 2020 mips GNU/Linux
root@WN604-A:/# ls
bin      etc      lib      overlay  rom      sbin     tmp      var
dev      init     mnt      proc     root     sys      usr      www

While I see this on the TL-WR741ND that I'm playing with:

root@OpenWrt:/# uname -a
Linux OpenWrt 4.14.214 #0 Tue Jan 12 22:55:26 2021 mips GNU/Linux
root@OpenWrt:/# ls
 -lq           enie^Cbinash:  nash:          sh:            ▒
:              etc            nd             sys            ▒▒▒▒
Is             found          overlay        t              ▒▒▒▒
[J             h:             proc           tmp
ash::          init           rom            usr
bin            lib            root           var
dev            mnt            sbin           www

/rom looks clean and the mangling looks like it is in /overlay/upper. I'm using the WR741 build that is in the 19.07 tree, but since it is a 4+32 device maybe this hasn't been fully configured properly, leading to the mangled filesystem. I'm also not getting any wifi - which is the original reason I started playing around wiht the serial connection.