Check bootloader logs via UART

Hi,

I have a Jetson Xavier NX board, with which I have connected a USB-TTL Serial cable. The cable is this which has

  • Red: +5V
  • Black: GND
  • Green: TxD
  • White: RxD

and the chip that is used is PL2303.

Here is the relevant output of dmesg | grep Prolific on my host machine:

[686342.604682] usb 1-1: new full-speed USB device number 62 using xhci_hcd
[686342.757633] usb 1-1: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 3.00
[686342.757646] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[686342.757652] usb 1-1: Product: USB-Serial Controller
[686342.757656] usb 1-1: Manufacturer: Prolific Technology Inc.
[686342.759409] pl2303 1-1:1.0: pl2303 converter detected
[686342.760425] usb 1-1: pl2303 converter now attached to ttyUSB0
[686386.176902] usb 1-1: USB disconnect, device number 62
[686386.177183] pl2303 ttyUSB0: pl2303_set_control_lines - failed: -19
[686386.177197] pl2303 ttyUSB0: error sending break = -19
[686386.177507] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[686386.177555] pl2303 1-1:1.0: device disconnected

I have connected it to J14 header on pins 3,4 and 7 on my board i.e white to 3, green to 4 and black to 7 as mentioned in the Developer Kit.

On the host PC, I am using minicom. I ran sudo minicom, which gave me the error: minicom: cannot open /dev/modem: No such file or directory.

Post that, I ran sudo minicom -D /dev/ttyUSB0, as that was the only difference in ls /dev when I removed or added the cable.

This gave me active terminal like this:

Welcome to minicom 2.7.1
OPTIONS: I18n
Compiled on Dec 23 2019, 02:06:26.
Port /dev/ttyUSB0, 15:13:21
Press CTRL-A Z for help on special keys

I restarted my board, waiting for logs to show up here but I didn’t get anything.

The output for dmesg | grep THC on the board is:

[ 1.542048] 3100000.serial: ttyTHS0 at MMIO 0x3100000 (irq = 47, base_baud = 0) is a TEGRA_UART
[ 1.543422] 3110000.serial: ttyTHS1 at MMIO 0x3110000 (irq = 48, base_baud = 0) is a TEGRA_UART
[ 1.544422] 3140000.serial: ttyTHS4 at MMIO 0x3140000 (irq = 49, base_baud = 0) is a TEGRA_UART

This is the result of ls /dev/tty* on my host PC:

/dev/tty /dev/tty17 /dev/tty26 /dev/tty35 /dev/tty44 /dev/tty53 /dev/tty62 /dev/ttyS11 /dev/ttyS20 /dev/ttyS3
/dev/tty0 /dev/tty18 /dev/tty27 /dev/tty36 /dev/tty45 /dev/tty54 /dev/tty63 /dev/ttyS12 /dev/ttyS21 /dev/ttyS30
/dev/tty1 /dev/tty19 /dev/tty28 /dev/tty37 /dev/tty46 /dev/tty55 /dev/tty7 /dev/ttyS13 /dev/ttyS22 /dev/ttyS31
/dev/tty10 /dev/tty2 /dev/tty29 /dev/tty38 /dev/tty47 /dev/tty56 /dev/tty8 /dev/ttyS14 /dev/ttyS23 /dev/ttyS4
/dev/tty11 /dev/tty20 /dev/tty3 /dev/tty39 /dev/tty48 /dev/tty57 /dev/tty9 /dev/ttyS15 /dev/ttyS24 /dev/ttyS5
/dev/tty12 /dev/tty21 /dev/tty30 /dev/tty4 /dev/tty49 /dev/tty58 /dev/ttyACM0 /dev/ttyS16 /dev/ttyS25 /dev/ttyS6
/dev/tty13 /dev/tty22 /dev/tty31 /dev/tty40 /dev/tty5 /dev/tty59 /dev/ttyprintk /dev/ttyS17 /dev/ttyS26 /dev/ttyS7
/dev/tty14 /dev/tty23 /dev/tty32 /dev/tty41 /dev/tty50 /dev/tty6 /dev/ttyS0 /dev/ttyS18 /dev/ttyS27 /dev/ttyS8
/dev/tty15 /dev/tty24 /dev/tty33 /dev/tty42 /dev/tty51 /dev/tty60 /dev/ttyS1 /dev/ttyS19 /dev/ttyS28 /dev/ttyS9
/dev/tty16 /dev/tty25 /dev/tty34 /dev/tty43 /dev/tty52 /dev/tty61 /dev/ttyS10 /dev/ttyS2 /dev/ttyS29 /dev/ttyUSB0

Is there anything else I should be doing?

I also tried removing ‘quiet’ from /boot/extlinux/extlinux.conf as mentioned in some issue, but it’s still not giving me any output on the host PC.

Any help would be greatly appreciated.

Hi,

Please make sure you are using the correct baud rate. Also, I don’t quite understand that you said there is no log on your minicom, then where did you dump those dmesg logs?

Thanks for the reply.

Please make sure you are using the correct baud rate.

I checked the baud rate on minicom and this is what I found:

Serial device: /dev/ttyUSB0
Lockfile location: /var/lock
Bps/Par/Bits: 115200 8N1

So I suppose the baud rate being used is 115200 bps. Is this not the correct baud rate? I saw the answer by Jerry here, which mentioned the use of picocom -b 115200 /dev/ttyUSBx, so I thought the baud rate was correct.

Also, I don’t quite understand that you said there is no log on your minicom, then where did you dump those dmesg logs?

Apologies if it wasn’t clear. I’ve already flashed the Xavier NX board with an OS, I ran dmesg | grep THC on the board to get the above mentioned output.

I also ran dmesg | grep Prolific on the host machine and I’ve shared that output above as well.

I’m actually trying to see the bootloader logs to see if my Trusted Application is working or not. (as mentioned here - I want to see where do I get these logs)

My question is where did you run “dmesg”? Is it also from the uart console?

Never mind, I was able to get the logs. From your link, I realised that my white and green wires were exchanged on the board due to which I wasn’t receiving any data. The guide clearly mentions how do we connect a UART cable to get the required kernel logs.

Thanks a lot for your help!

1 Like