I have the Adafruit Ultimate GPS Breakout wired to my Jetson TX2’s J21 header (see image below) as follows:
- VIN to pin 1.
- GND to pin 6.
- TX to pin 8.
- RX to pin 10.
The GPS red LED light is blinking which I assume is a good sign, now how do I program it to track and display location?
That particular serial UART is already in use as a serial console. The J17 connector, next to the J21 you are using, has an unused UART. J17 would more or less “just work” under most conditions (assuming 3.3V UART level). This is accessible on the Jetson as either “/dev/ttyTHS2” or “/dev/ttyS2” (“THS” is Tegra High Speed, and uses DMA, whereas “S” is just the standard serial UART driver…pick one and stick with it).
Can you switch to J17? If not, then you will need to disable serial console in both Linux and U-Boot.
Oh I didn’t realize J21’s UART was already in use. Which pins on the J17 header are UART (J17 pinout below)?
J17 is its own separate header. Six pins, 0.1" spacing, directly between the J21 connector and the power button (a single row of six pins perpendicular to J21).
Pin 1 is ground.
Pin 2 is CTS (clear-to-send).
Pin 3 is is not normally be used (some UARTs can receive or provide power over this pin, but not in this case).
Pin 4 is TXD (transmit data).
Pin 5 is RXD (recieve data).
Pin 6 is RTS (request-to-send).
Oh my mistake, the screenshot above is J26. I see, where you’re referring to now:

Thank you for clarifying. Now on the software side, how do I program it?
Other than being sure both sides of a serial UART connection are set to the same speed/settings there isn’t really anything to program.
A good example is to use loopback mode. You can simply wire the TX to RX with a jumper, and anything yo8u send to TX should show up on RX. Optionally, if flow control is to be used, you could wire RTS to CTS with a jumper. I like “gtkterm” as a terminal program, so something like this with the correct pins jumpered:
sudo apt-get install gtkterm
gtkterm -b 8 -t 1 -s 115200 -p /dev/ttyTHS2
When you type you should see the text echo back. If you get a permission denied, then it probably means your user needs to be added to group “dialout”:
sudo usermod -a -G dialout <your_user_name>
Of course if you use “sudo”, then you don’t need to add group dialout. The default admin account tends to also already be a member of group “dialout”.
Note that in the loopback case a UART will always agree with itself about settings. That example is the default for serial console and a good rate for a lot of purposes: Speed 115200, 8-bits, no parity, one stop bit.
When programming to talk to a serial UART you just open it like a file, or read/write like a file. Some setup can be done via “ioctl” function calls. An ioctl function call (see “man ioctl”) is used for non-standardized commands which particular device drivers know about, but which other devices may have no understanding of. Examples of what an ioctl might be used for is to forcibly set speed 115200, 8-bits, no parity, one stop bit…and so on. If you have gtkterm running at both ends of a two-computer setup, then you will be able to echo gtkterm text. Failure of echo tends to imply a difference in speed or some other setting.