Jetson Nano how to use UART on /ttyTHS1

Hello, i have problem with reading data via UART from my jetson nano board.
I have gps module to read from, it works perfectly via serial usb adapter.
I need to use J41 UART port pins 8 and 10, which is must be set to /dev/ttyTHS1

But there is no any output on this device:

sudo sh -c 'cat < /dev/ttyTHS1'
...

To check that the device is detected i connected it to J44 pins, which are set on /dev/ttyS0:

sudo sh -c 'cat < /dev/ttyS0'
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
$GPTXT,01,01,01,NMEA unknown msg*58
...

How to read any data from UART on /ttyTHS1?

There is some additional output, which can help in solving the problem:

ls /etc/systemd/system/getty.target.wants
getty@tty1.service  serial-getty@ttyGS0.service
sudo cat /proc/cmdline
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,2 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1075 core_edp_ma=4000 tegra_fbmem=0x800000@0x92cb7000 is_hdmi_initialised=1  root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0    root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 quiet
sudo cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:Tegra mmio:0x70006000 irq:63 tx:815394 rx:893726 fe:16 brk:1380 oe:4 RTS|CTS|DTR|RI
1: uart:unknown port:00000000 irq:0
2: uart:unknown port:00000000 irq:0
3: uart:unknown port:00000000 irq:0
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,2 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1075 core_edp_ma=4000 tegra_fbmem=0x800000@0x92cb7000 is_hdmi_initialised=1  root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0    root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 quiet
[    0.001780] console [tty0] enabled
[    1.045425] console [ttyS0] disabled
[    1.045524] 70006000.serial: ttyS0 at MMIO 0x70006000 (irq = 63, base_baud = 25500000) is a Tegra
[    1.045657] console [ttyS0] enabled
[    1.046636] 70006040.serial: ttyTHS1 at MMIO 0x70006040 (irq = 64, base_baud = 0) is a TEGRA_UART
[    1.047069] 70006200.serial: ttyTHS2 at MMIO 0x70006200 (irq = 65, base_baud = 0) is a TEGRA_UART

As i can see, many people have the same problem, but there is still no solution:

https://devtalk.nvidia.com/default/topic/1052252/jetson-nano/jetson-nano-serial-communication/post/5341697/

Try stopping and disabling the nvgetty service. This starts a console on ttyTHS1.
systemctl stop nvgetty
systemctl disable nvgetty

1 Like

Its works now, thanks a lot!

I’m trying to communicate via packet serial to another device over ttyTHS1. I’ve verified matching baud rates. It seems that even after I stop/disable nvgetty, there is still something happening on my serial port even before i connect my other device. if i “cat /dev/ttyTHS1” it spits out gibberish, while i would actually expect nothing, if i have nothing connect to that serial port and have disabled the console on this serial port. Anyone have ideas on this?