Whenever get serial data through ttyTHS1, the file is reset constantly


I’m developing a device what can get data like CAN, GPS from autonomous drive vehicle.

When I get GPS data through /dev/ttyTHS1, The problem is happnend. ‘ttyTHS1’ is recreated constantly.

But I can get CAN data through /dev/ttyACM

Here my development environmnet.

Board: nVidia Jetson NANO
OS: Ubuntu 18.04 (for Jetson NANO board from nVidia)
JetPack: 4.3version
Middleware: ROS melodic
ROS package: ros-melodic-nmea-msgs, ros-melodic-msgs

Let’s start the first of my story.

This device can start all of programs & ros nodes automatically whenever turned on.
Because I implemented using ‘systemd & service’.

So i can see like below picture with ‘rosnode list’ as soon as I turned on this device.

There is nmea_serial_driver_node, that means the device ran ros & the node successfully.

But the node is terminated soon (in 1 minute).

Then I re-run the node with roslaunch like below.

roslaunch nmea_navsat_driver nmea_serial_driver.launch

But It’s finished by force with ‘[FATAL] permission denied error’ on the left window of the picture.

I thought this is problem related in the permission of user groups.

So I checked the group of /dev/ttyTHS1 file as you can see the terminal window of bottom right corner.

Then I added tty, dialout, and root group to my user with below command.

sudo adduser *sgr-100-nano root dialout tty
*current user name

And I could verify it like the top right in the picture.

Also, I changed the access permission of ‘/dev/ttyTHS1’.

sudo chmod 777 ttyTHS1

Then I re-run the nmea node with roslaunch.

Step 2 was half success.
I could run the nmea node without ‘[FATAL] permission denied error’ as below.

However, if I send messages, the node is finished by force again.

But, if I check the message directly with ‘cat’ command not ROS.
I can see the message sent is normally operating as below.

  • I made this message on PC(windows) desktop and sent to Jetson NANO.

From above, I guess Jetson NANO can read the message thorough ttyTHS1 successfully.

On the other hand, ROS node can’t read and It is terminated by force.

So I tried to find out of the root cause. At last, I could see the ‘/dev/ttyTHS1’ is recreated constantly.

Also, from the reason, access permission of the file is changed to original. You can see this.

I don’t know why ‘/dev/ttyTHS1’ is recreated whenever It gets message.

Others are okay such as ttyACM0~2(CAN), ttyUSB0

Help me please!

hello doozua,

may I know what’s the kernel failure from Nano side. please gather it with $ dmesg

please have below two different approaches for your testing.

  1. please execute getty running at background,
    for example, on Jetson-Nano.
    $ sudo /sbin/getty -a ubuntu -L 115200 ttyTHS<port> &

  2. please have a try to stop the nvgetty service for verification,
    $ systemctl stop nvgetty systemctl disable nvgetty

1 Like

Thank you for quick answering. Unfortunately, it didn’t work though.

Here I attach the result.

(Sorry, I don’t know why the picture has red light)

And here What I gathered dmesg. It’s kind of long. so I uploaded as .txt file.
dmesg.txt (59.0 KB)

Thank you.

hello doozua,

according to your logs, I did not see failures from kernel side while the issue happened.
could you please also access Nano Data Sheet, and check [Chapter-4.7.3 UART] for reference. thanks