O'Reilly logo

Raspberry Pi for Secret Agents by Stefan Sjogelid

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tracking the Pi's whereabouts using GPS

Go right ahead and connect your GPS gadget to the USB port. Most GPS units appear to Linux as serial ports with device names starting with tty then commonly followed by ACM0 or USB0. Type in the following command and focus on the last line:

pi@raspberrypi ~ $ dmesg -T | grep tty
Tracking the Pi's whereabouts using GPS

USB GPS receiver identifying as ttyACM0

The first couple of lines talk about the serial port built into the Pi (ttyAMA0). On the last line, however, a USB device is identified which is most likely our GPS unit and will be accessible as /dev/ttyACM0. We can confirm that it's a GPS by trying to read from it using the following command, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required