JetsonNano, Linux, "dev/ttyTHS1", Python

My name is Marcin Wasylewski and I am a Python programmer from Poland. I need your help with my Jetson Nano. I describe all below:
I have a Jetson Nano with microSD card with linux system. On this card I have a python programm which uses a ‘dev/ttyTHS1’ connection with my other device (serial_port = serial.Serial(“/dev/ttyTHS1”, 115200). And on this microSD card my programm works very good.
Unfortunately when I COPY this programm and paste to another card with linux system and run it on the same Jetson, there are some problems with connection on this port… Exact the SAME programm but there is an error with connection…,I found that there are some problems with permissions to connect on this “dev/ttyTHS1”. Can you help me? What you can suggest to do? Merry Christmas and Happy New Year
Marcin Wasylewski


Welcome to the NVIDIA Developer forums. I am moving this topic to the Jetson category for better visibility.

1 Like

hello marcin.wasylewski,

may I know what exactly the repo steps.
you had… Nano-A and SD-A. the application is on SD-A and it works normally.

now… you copy the app to SD-B and running the same on Nano-A?

I will also suggest that the exact error be listed. I want to mention something which is common though, in spite of not knowing if this is related to your problem. Check the permissions of “/dev/ttyTHS1”:
ls -l /dev/ttyTHS1

The group will either be tty or dialout. If it is tty, then the port is already in use as the serial console. There are things you could do to disable serial console (not advisable, serial console is a very nice development tool), but if it is dialout then it should be free to use. However, if it is dialout, then you need to add your user to supplemental group dialout. For example, if your user’s name is “nvidia”, then you would give permission like this:
sudo usermod -aG dialout nvidia
(don’t do this with group “tty”; any tty group will revert to dialout once serial console is disabled)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.