I am trying to read data send by another device through UART,
Looking through the spreadsheet I found online, I connected RX to pin 10 and TX to pin 8 on the 40 pin header extension.
Then I opened port on /dev/ttyTHS0 and I could read the data sent by the device. But the problem I am facing now is that I cannot read data without granting su permission to my application. How can I avoid this ? I have had similar issue when using USB device to read the data, to fix it i just added my user to dialout group but that doesnt seem to work with THS0.
Please advice! Thanks
~$ ls -al /dev/ttyT*
crw--w---- 1 root tty 4, 143 Mar 30 10:24 /dev/ttyTCU0
crw--w---- 1 root tty 238, 0 Mar 30 10:24 /dev/ttyTHS0
crw-rw---- 1 root dialout 238, 1 Mar 30 10:24 /dev/ttyTHS1
crw-rw---- 1 root dialout 238, 4 Mar 30 10:24 /dev/ttyTHS4
As an extension to what @gtj mentions: A regular user is normally a member of group “tty”, but is not normally a member of group “dialout”. If you want to see who is a member of those groups: egrep '(tty|dialout)' /etc/group
Anyone working on development probably should be added to group “dialout”. If your user name is “ubuntu”, then this would add group “dialout” as a supplemental group to user “ubuntu”: sudo usermod -aG dialout ubuntu
(you’d then see ubuntu in group dialout when examining /etc/group…a similar useful group to add is “gpio”)
systemd-udevd.service - udev Kernel Device Manager
Loaded: loaded (/lib/systemd/system/systemd-udevd.service; static; vendor preset: enabled)
Active: active (running) since Tue 2021-03-30 23:54:40 +04; 51s ago
Docs: man:systemd-udevd.service(8)
man:udev(7)
Main PID: 2535 (systemd-udevd)
Status: "Processing with 20 children at max"
Tasks: 1
CGroup: /system.slice/systemd-udevd.service
└─2535 /lib/systemd/systemd-udevd
Mar 30 23:54:41 defuser-jetson systemd-udevd[3192]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Mar 30 23:54:41 defuser-jetson systemd-udevd[3192]: Could not generate persistent MAC address for dummy0: No such file or directory
Mar 30 23:54:41 defuser-jetson systemd-udevd[4207]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Mar 30 23:54:41 defuser-jetson systemd-udevd[3225]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Mar 30 23:54:41 defuser-jetson mtp-probe[4414]: checking bus 2, device 3: "/sys/devices/3610000.xhci/usb2/2-3/2-3.3"
Mar 30 23:54:41 defuser-jetson mtp-probe[4414]: bus: 2, device: 3 was not an MTP device
Mar 30 23:54:43 defuser-jetson systemd-udevd[5498]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Mar 30 23:54:43 defuser-jetson systemd-udevd[5498]: Could not generate persistent MAC address for l4tbr0: No such file or directory
Mar 30 23:54:43 defuser-jetson systemd-udevd[5508]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Mar 30 23:54:43 defuser-jetson systemd-udevd[5507]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Hi streakflash,
I’m also interested to communicate with UART without using sudo.
Did you do something else to make it work ? After entering this commands and rebooting i get permission denied while trying UART. sudo systemctl disable nvgetty.service