I have a TX2 running L4T 28.1 in a carrier board and need to use the serial port. The serial port on the carrier board maps to ttyS0 which by default is owned by root and belongs to group tty. I’ve added user ubuntu to group tty (which is what I log in as) however by default the group doesn’t have read access to ttyS0. sudo chmod g+r /dev/ttyS0 fixes it, but this doesn’t persist through a reboot. I’ve tried creating various udev rules (99-z_setup.rules):
KERNEL=="ttyS0", NAME="ttyS0", SYMLINK+="my_tty", GROUP:="tty", MODE:="0660", OWNER:="ubuntu"
KERNEL=="ttyS0", NAME="ttyS0", SYMLINK+="my_tty", GROUP:="tty", MODE:="0660"
KERNEL=="ttyS0", NAME="ttyS0", SYMLINK+="my_tty", GROUP="tty", MODE="0660"
these result in:
lrwxrwxrwx 1 root root 5 Aug 1 13:34 my_tty -> ttyS0
crw--w---- 1 root tty 4, 64 Aug 1 13:34 ttyS0
so I still can’t access it. I also tried
KERNEL=="ttyS0", ACTION=="add", PROGRAM="/usr/bin/sudo /home/ubuntu/bin/setup_tty.sh"
with setup_tty.sh containing
#!/bin/bash
chmod g+r /dev/ttyS0
echo "setup_tty ran" >> /home/ubuntu/bin/tty.log
It echos to the tty.log file so I know the script runs, but the permissions are still
crw--w---- 1 root tty 4, 64 Aug 1 13:44 ttyS0
It’s like the group / owner / mode settings are being ignored or being overwritten.
Any ideas?
Thanks,
Jason