18

My config.txt has:

dtoverlay=pi3-disable-bt
enable_uart=1

at the end and my cmdline.txt has:

root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200

And here's how I've connected it:

enter image description here

I followed this based on some other examples on this site. But when I connect my picocom exits saying FATAL: cannot open /dev/ttyUSB0: No such file or directory and I see these error on my syslog:

kernel: usb 1-3: new full-speed USB device number 5 using xhci_hcd
kernel: usb 1-3: device descriptor read/64, error -71
kernel: usb 1-3: device descriptor read/64, error -71
kernel: usb 1-3: new full-speed USB device number 6 using xhci_hcd
kernel: usb 1-3: device descriptor read/64, error -71
kernel: usb 1-3: device descriptor read/64, error -71
kernel: usb usb1-port3: attempt power cycle
kernel: xhci_hcd 0000:05:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
kernel: usb 1-3: new full-speed USB device number 7 using xhci_hcd
kernel: usb 1-3: Device not responding to setup address.
kernel: usb 1-3: Device not responding to setup address.
kernel: usb 3-2.3: USB disconnect, device number 6

(I think, I may have fried my serial cable).

What is the correct way to open the serial console from a Linux desktop?

Unmanned Player
  • 291
  • 1
  • 2
  • 5

2 Answers2

20

First a complete picture with "official" colored wires. enter image description here Thanks to fiery for providing this picture to connect an USB to TTL serial adapter.

As shown in the pinout you have mixed up TXD (pin 8) and RXD (pin 10). Maybe it is the reason why your adapter get hot?

pinout

Then to /boot/config.txt I have only added

enable_uart=1

No need to disable bluetooth. My /boot/cmdline.txt looks like this:

console=serial0,115200 root=PARTUUID=738a4d67-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

If you want to have also a normal terminal attached then you must add console=tty1 to the line so it should similar to this:

console=serial0,115200 console=tty1 root=PARTUUID=738a4d67-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet

This is the default cmdline.txt on Raspbian Buster Lite but this will not show all boot messages on the serial console. Of course don't touch your PARTUUID. I use the nice tiny program tio (terminal IO) that is exactly made for serial terminal connections and works out of the box. After installing it with sudo apt install tio I call it with:

lxdesktop ~$ tio /dev/ttyUSB0
tio /dev/ttyUSB0
[tio 21:06:05] tio v1.32
[tio 21:06:05] Press ctrl-t q to quit
[tio 21:06:05] Connected

raspberrypi login:
Ingo
  • 42,961
  • 20
  • 87
  • 207
1

This "correct" way is to run sudo raspi-config Select Interfacing Options / Serial then specify you want a Serial console.

This is explained in How do I make serial work on the Raspberry Pi3 or later

There is nothing wrong with the link you referenced (which should be edited into your Question - along with any other detail) - if you actually followed it. Despite your comment you must have followed some obsolete instructions to come up with your cmdline.txt.

Both my tutorial and the Foundation tutorial contain additional detail (which was needed when the Pi3 was first released, but the appropriate settings are now done in raspi-config).

Other Issues

Your cmdline.txt is obsolete (experienced users make a backup copy of system files BEFORE modifying them). You should change the root=PARTUUID=738a4d67-02 to match your SD Card - the appropriate PARTUUID can be found by running

cat /etc/fstab

Which will contain a line like:-

PARTUUID=f6650ff2-02  /               ext4    defaults,noatime  0       1

It is difficult to see WHAT you are doing to produce the error:-

FATAL: cannot open /dev/ttyUSB0: No such file or directory and I see these error on my syslog:

This has NOTHING to do with serial console! Indeed there will NOT be a /dev/ttyUSB0 unless you have a serial device plugged in to the Pi.

Milliways
  • 62,573
  • 32
  • 113
  • 225