Developing on NVIDIA® Jetson™ for AI on the Edge

Level Shifting, UART and GPS Part 3 – NVIDIA Jetson TK1



With the wiring completed, we can try out our new GPS system.
Turn on the power and boot the Jetson. Once the Jetson is up and running, open a Terminal. Execute:

$ sudo cat /dev/TTHS1

You should see a stream of GPS information, which is in NMEA format. If not, you need to start trouble shooting. First make sure that you typed in the correct command. Next, it’s time to start checking the wiring. It doesn’t take much in the way of wiring error for things not to work. Check the connections. A good rule of thumb is to just connect it up right the first time so you don’t have to debug it. Just sayin’.

Software Installation

In order to use the GPS, we need to install some software:

$ sudo apt-get install gpsd gpsd-clients python-gps

which installs gpsd, a Linux daemon that interfaces with the GPS serial stream.
Once installed, we can turn on the gpsd daemon:

$ sudo gpsd /dev/ttyTHS1 -F /var/run/gpsd.sock

Once gpsd has been started, run:

$ xgps

After a while, the GPS will find the GPS satellites in your vicinity and triangulate your position. Xgps will show the satellites that it is using to calculate the position.

Note: It may take several minutes for the GPS to get a fix with the satellites. After the GPS synchs, the red light on the GPS board will flash about once every 15 seconds. If the GPS does not get a fix, it probably means that the signals from the satellites are not strong enough. The GPS device has an antenna built into it, but it may need an external antenna. The GPS board has a uFL connector, most external GPS antennas connect with SMA so you will need something like a SMA to uFL RF Adapter Cable


This is a very simple circuit to execute and have fun with, a good entry into breadboarding a prototype. It’s harder to describe than to actually build the circuit, it takes about 10 minutes all together to build the breadboard, wire it, and test it out. The project is actually useful after you have it finished, so it is definitely worth trying. Good luck!

Back to Part 2


4 Responses

  1. I’m having issues on the “$ sudo cat /dev/TTHS1” step. There is no file like that in my system. I am working on the TX1. Is there an equivalent file that I should be looking at. Also I haven’t used a level shifter because the voltage I measure on the TX1’s UART port is 3.3V. Is my thinking correct here?

    1. The TTHS1 device is determined by the UART port that the device is attached to. In this example, the TK1 is using UART 2, which maps to TTHS1. I haven’t tried this hardware combinations with the TX1, but I would guess that you’re ok with not having the level shifter.
      On the TX1, the mapping to /dev/TTHSx is determined by the UART being used. From what I understand, the header J21 8/10 is /dev/TTS0 (the serial console, which may cause issues at times). The header J17 UART is mapped to /dev/TTYHS2.
      You will still probably have to “cross the wires” so that TX->RX and vice versa.

    2. You may want to search /dev for something with a similar filename. I am currently working on the TK1, with Tegra version 21.3 and the Grinch terminal, and instead of appearing as /dev/TTHS1 my GPS unit appeared on /dev/ttyTHS1.

      1. Thanks for the advice. Still no luck though. I have ttyTHS1 ttyTHS2 and ttTHS3 in my dev folder. I’ve run the cat command on each of them. I’ve also tried hooking up to the UART on header J17. Then I tried changing the baud rate. No luck with any of it. I think part of the problem is that the UART on J21 is set up for serial console. There is a good tutorial on how to change that but it looks like it involves re-flashing the board which is something I want to avoid if possible.

        Good References:

Leave a Reply

Your email address will not be published. Required fields are marked *


Some links here are affiliate links. If you purchase through these links I will receive a small commission at no additional cost to you. As an Amazon Associate, I earn from qualifying purchases.

Books, Ideas & Other Curiosities