How to use UART on jetson nano? Getting �������������

I connected a serial device to my nano, and then:

sudo screen /dev/ttyUSB0 115200

I can see a bunch of ������������� on the screen being formed.

Here’s


lz@jetson:~$ sudo dmesg | grep tty
[    0.000000] Kernel command line: tegraid=21.1.2.0.0 ddr_die=4096M@2048M section=512M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,4 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1075 core_edp_ma=4000 gpt tegra_fbmem=0x800000@0x92ca9000 is_hdmi_initialised=1  earlycon=uart8250,mmio32,0x70006000  root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 
[    0.001779] console [tty0] enabled
[    1.123581] console [ttyS0] disabled
[    1.123684] 70006000.serial: ttyS0 at MMIO 0x70006000 (irq = 63, base_baud = 25500000) is a Tegra
[    1.123782] console [ttyS0] enabled
[    1.124707] 70006040.serial: ttyTHS1 at MMIO 0x70006040 (irq = 64, base_baud = 0) is a TEGRA_UART
[    1.125107] 70006200.serial: ttyTHS2 at MMIO 0x70006200 (irq = 65, base_baud = 0) is a TEGRA_UART

as you see the speed is 115200

What is wrong?

Hello @me0bssl,

I dont understand what is the problem. Here is a tutorial about using UART on Jetson Nano. It might be helpful to follow the steps like tutorial.

Regards.

hello me0bssl,

you’ll need to setup the communication with the serial port utility on your host machine, and the default baudrate is 115200/8n1.
you should check the port of your connected device.
here’s sample commands to setup the connection,for example, $ picocom -b 115200 /dev/ttyUSB*
thanks

lz@vm:~$ picocom -b 115200 /dev/ttyUSB0
picocom v3.1

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

what’s the pin connections you’d used? please also refer to ozguryildiz’s post #3,

I used his post. TX to RX, RX to TX. The weird thing is that I get these characters when I don’t connect the GND. When I connect GND, I get nothing

In your original post you used “screen”, which I’ve used many times, but this isn’t a terminal emulator in the usual sense (it manages a terminal, a subtle difference).

The TX to RX is correct if your UART is using a 3.3V logic level (assuming connection between PC and Jetson). A good question though (which is what @JerryChang is asking) is which pins on the Jetson? Some pins are part of serial console.

Also note that when a connection does work that if each side of the connection uses a different character set, then the data will work, but it will appear incorrect in a terminal.

ok, it worked:

lz@vm:~$ picocom -b 115200 /dev/ttyUSB0
picocom v3.1

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready
�
Ubuntu 18.04.5 LTS jetson ttyTHS1

jetson login:

but I see nothing more than this. I think it should display lots of kernel messages. Also, I couldn’t type the password. I tried typing and pressing enter and nothing happens.

You would try to enter your username at this login prompt, then enter password and you would have control of your jetson.

I don’t want to login into the nano, I want to see the kernel messages. so I can debug a problem in the kernel I compiled Also UART on GPIO HEADER - Jetson Nano - YouTube does that and it has no login, it starts printing kernel messages as soon as it boots

wrong video, I meant this: Jetson Nano - Serial Console - YouTube

ok, turns out that there are 2 different UART ports. The GPIO ones are not for kernel debugging, they only work afgter the boot is done. I changed to them and now I get the kernel output.

However I cannot write anything, just receive.

If I type anything, my FTDI does not light. It only lights when I receive.

However, if I type something in the arduino IDE, then it lights.

I tried both picocom and minicom

hello me0bssl,

Jetson Nano brings three UARTs out to the main connector.
please check Jetson Nano Developer Kit User Guide for the ports that used for serial port debug.
thanks

Further than @JerryChang’s comment about console uart, even if not in console, once looged in you can just issue:

dmesg

to get the whole Linux kernel messages. This may not tell the early boot stages, though.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.