How to enable J44 serial /dev/ttyS0 in Jetson Nano

HI,

I need to read serial data from J44 as I am already using J41 for other serial communication.
It is used as serial console login and I can’t change permissions to enable read/write.

Current permissions:
crw–w---- 1 root tty 4, 64 jan 28 14:23 /dev/ttyS0

I change it:

sudo chmod 666 /dev/ttyS0

Add other user to tty group or to group:

sudo usermod -a -G tty user1
sudo chmod g+r /dev/ttyS0

When I make these changes, it works, but only for some seconds (it is a GPS receiver), then returns to default behavior.

I looked in udev rules for some tty which relates to S0:

/etc/udev/rules.d$ grep tty *
55-tegraserial.rules:KERNEL==“ttyTHS*”, MODE=“0666”

But it only handles the THS*.
Is there some ADD rule to make it work?

lsof output (mainly last 3 lines):

sudo lsof | grep tty
systemd-l 4076 root 7r REG 0,17 4096 16299 /sys/devices/virtual/tty/tty0/active
systemd-l 4076 root 14u CHR 4,6 0t0 3149 /dev/tty6
systemd-l 4076 root 19u CHR 4,1 0t0 3146 /dev/tty1
agetty 4940 root cwd DIR 179,1 4096 2 /
agetty 4940 root rtd DIR 179,1 4096 2 /
agetty 4940 root txt REG 179,1 52296 393835 /sbin/agetty
agetty 4940 root mem REG 179,1 43336 525768 /lib/aarch64-linux-gnu/libnss_files-2.27.so
agetty 4940 root mem REG 179,1 76592 525705 /lib/aarch64-linux-gnu/libnsl-2.27.so
agetty 4940 root mem REG 179,1 43344 525642 /lib/aarch64-linux-gnu/libnss_nis-2.27.so
agetty 4940 root mem REG 179,1 31344 525712 /lib/aarch64-linux-gnu/libnss_compat-2.27.so
agetty 4940 root mem REG 179,1 3008640 399917 /usr/lib/locale/locale-archive
agetty 4940 root mem REG 179,1 1341080 525589 /lib/aarch64-linux-gnu/libc-2.27.so
agetty 4940 root mem REG 179,1 125896 525586 /lib/aarch64-linux-gnu/ld-2.27.so
agetty 4940 root 0u CHR 510,0 0t0 18720 /dev/ttyGS0
agetty 4940 root 1u CHR 510,0 0t0 18720 /dev/ttyGS0
agetty 4940 root 2u CHR 510,0 0t0 18720 /dev/ttyGS0
gdm-x-ses 5368 gdm 0u CHR 4,1 0t0 3146 /dev/tty1
gmain 5368 5370 gdm 0u CHR 4,1 0t0 3146 /dev/tty1
gdbus 5368 5425 gdm 0u CHR 4,1 0t0 3146 /dev/tty1
Xorg 5371 root 0u CHR 4,1 0t0 3146 /dev/tty1
Xorg 5371 root 11u CHR 4,1 0t0 3146 /dev/tty1
InputThre 5371 5424 root 0u CHR 4,1 0t0 3146 /dev/tty1
InputThre 5371 5424 root 11u CHR 4,1 0t0 3146 /dev/tty1
login 9395 root mem REG 179,1 10152 525805 /lib/aarch64-linux-gnu/security/pam_securetty.so
login 9395 root 0u CHR 4,64 0t0 200 /dev/ttyS0
login 9395 root 1u CHR 4,64 0t0 200 /dev/ttyS0
login 9395 root 2u CHR 4,64 0t0 200 /dev/ttyS0

I also tried usb-serial in this case but I am using camera and wi-fi in USB inputs and is conflicting with usb-serial (DMA kernel error) so my only option is UART.

I have seen many other answers like modify nvgetty behavior, etc but I none is working. I also think that Nano has different behavior than other NVidia embedded boards, as I saw some answers with ttyS0 that works.

Has anyone knows how to change this behavior and enable J44 from Jetson Nano for normal serial operation?

Thank you,

hello d.pensator,

could you please refer to post #3 by using the THS2 and the J44 pin.
please also check similar discussion thread, Topic 121038.
thanks

Ok, you suggest other workarounds. In case of usb-serial I can not use because my adaptor is conflicting with Usb camera and Usb wifi already in use.
Thanks anyway

After research the best solution I found is from post post which renames /dev/ttyS) to /dev/ttyS1 or any other name.
It works for my needs as it is ok to rename and change permission each boot.

But for production will be needed another solution.

I will leave this topic open, if someone finds better solution please answer.