8

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?

4
  • Why have you disabled Bluetooth? Why are you you using obsolete cmdline settings? – Milliways Feb 26 '20 at 11:50
  • Correct me if I'm wrong, but your issue is that your computer won't recognize a USB to UART dongle (code 71 means "no response packet received within the prescribed bus turn-around time", meaning the device is not replying to USB commands). This is not really a Pi-4 related issue. – Dmitry Grigoryev Feb 26 '20 at 12:02
  • @DmitryGrigoryev I've tried this with 3 other cables, they all report the same and go extremely hot. Could you please suggest the right way to connect it? – Unmanned Player Feb 26 '20 at 16:26
  • 2
    @Milliways I might've read this page incorrectly then. Hence the question. Sorry, if I'm wrong. What is the correct cmdline? – Unmanned Player Feb 26 '20 at 16:27
6

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:
8
  • 2
    I don't think he's got the pins mixed up TXD on the USB serial cable goes to RXD on the pi and vice versa. – justinjt Feb 26 '20 at 21:12
  • 1
    @justinjt If you see it from that side you may be right... – Ingo Feb 26 '20 at 21:35
  • @justinjt If the pins were swapped, I'd at least see some garbage. But here, I don't see anything. I'll try your method right now and see how far I go. – Unmanned Player Feb 27 '20 at 5:42
  • @justinjt kernel: [174467.510879] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32 This happened. I swapped them to the order as show in your image and I saw a ? on screen and syslog reported this. I call as picocom /dev/ttyUSB0 -b 115200 -r -l. – Unmanned Player Feb 27 '20 at 5:52
  • @UnmannedPlayer I said I don't think you have the pins swapped. The way you have it in the original picture is correct. RPI TXD -> usbserial RXD, usbserial TXD -> RPI RXD – justinjt Feb 27 '20 at 8:13
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.

1
  • There's a tiny problem though. I have a buildroot based build and it doesn't have raspi-config in it. I was building this for a router. Thanks though. – Unmanned Player Mar 2 '20 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.