I am using NVIDIA Jetson TX2 with an Auvidea J120 carrier board. The J7 connector on the board is the UART.
I am trying to connect TX2 with my PC through a USB to Serial Cable, and communicate via putty, however I am not able to do that. I have attached the image of the pin configuration. I am using Pins 2, 3, and 6 of the J7 connector.
I need to be able to send serial commands (strings; words like ‘start’ and ‘stop’) from my PC and want Jetson TX2 to receive them, so that I can use these serial commands to start and stop a python program doing a particular task.
Please help me figure out what I am doing wrong. Here is the picture of my setup.
Thank you.
Are any of those separate wires for TX/RX of the UART? If so, then you really should switch to a quality twisted pair (but for all I know this might just be power delivery). I often use spare ethernet cable for longer UART lines since it has twisted pair and shielding.
What settings are you trying to use? Anything faster than 115200 should use two stop bits.
PuTTY will work, but have you verified (perhaps with an oscilloscope) that when you type in that the content actually goes to the UART you expect? I find picking the right port under Windows can be a bit more confusing than under Linux.
Consider first using a loopback test. For the port you are interested in on the Jetson side, jumper its TX and RX together; and jumper the CTS and RTS together. Then open a terminal program on the Jetson (my favorite is “gtkterm
”; see “sudo apt-get gtkterm
”, but others like minicom also work). See if typing in text echoes back. If it does echo, then remove the CTS-to-RTS jumper and test again…if it fails, then you have on flow control and perhaps did not intend this. Do the same thing from the PC side as well.
Note that you can use your terminal program to pick the same settings you are expecting. In a normal case communications can fail if each side is not using the exact same settings. Loopback has the advantage that a UART will never disagree with itself, and so if there is no traffic, then you’ll know the settings are not at fault. If each end is able to use loopback at the same settings, then you can expect that combining the two ends without loopback should also work.
An example of opening gtkterm
at 115200 8N1 (no flow control):
gtkterm -b 8 -t 1 -s 115200 -p /dev/ttyTHS2
…but note that your user must be a member of group “dialout
” in the default Ubuntu system. If the UART you are trying to use is group “tty
”, then it means the UART is already in use for serial console. If you use “sudo
”, then you won’t have to worry about group “dialout
”. To see who is a member of “dialout
”:
grep 'dialout' /etc/group