sending message to slave computer by UART/serial port

I’m not good at computer communication at low level. And I want to send some message through the Xavier’s UART in the 40-pin Expansion Header. I can not figure out where is the ttyTHS0 and how I can use it.
There is an error as following when I try to open the ttyTHS0 port in python.

import serial
ser = serial.Serial()
ser.baudrate = 115200
ser.port = '/dev/ttyTHS0'

error traceback as follows,
could not open port ttyTHS0: no such file or directory: ‘ttyTHS0’
But I can find ttyTHS0 is in /dev.
So how can I send message to slave computer by serial port in python?

Once I upgraded to JetPack 4.2, there was a built-in service running a login shell on that serial port; I disabled said service and the permissions of ttyTHS0 returned to appropriate settings:

sudo systemctl stop nvgetty.service
sudo systemctl disable nvgetty.service

It looks like this is also mentioned here:

Hi WasabiFan, I disabled the nvgetty.service and reboot Xavier, and still got the could not open port ttyTHS0: no such file or firectory: 'ttyTHS0' error.

hello aspirinkb,

according to Topic 1053941, could you please have a try to use UART2.
we might need to check if this issue only with UART1/ttyS0.