Reader small image

You're reading from  Raspberry Pi for Secret Agents

Product typeBook
Published inApr 2013
PublisherPackt
ISBN-139781849695787
Edition1st Edition
Concepts
Right arrow
Author (1)
Stefan Sjogelid
Stefan Sjogelid
author image
Stefan Sjogelid

Stefan Sjogelid grew up in the 1980s in Sweden, getting hooked on 8-bit consoles, Amigas, and BBSes. With a background in system and network administration, he packed his bags for Southeast Asia and continued to work in IT for many years, before love and a magic 8 ball told him to seek new opportunities in the North American continent. The Raspberry Pi is the latest gadget to grab Stefan's attention, and after much tinkering and learning a great deal about the unique properties of the Pi, he launched the PiLFS website (http://www.intestinate.com/pilfs), which teaches readers how to build their own GNU/Linux distribution and applications that are particularly useful on Raspberry Pi.
Read more about Stefan Sjogelid

Right arrow

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

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, where [XXXX] should be replaced by the name of your device:

pi@raspberrypi ~ $ cat /dev/tty[XXXX]

A GPS conforming to the NMEA standard will start flooding your screen with sentences beginning with a code such as $GPGGA followed by comma-separated data (see http://aprs.gids.nl/nmea/ if you're curious about those messages). Even if your GPS outputs...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Raspberry Pi for Secret Agents
Published in: Apr 2013Publisher: PacktISBN-13: 9781849695787

Author (1)

author image
Stefan Sjogelid

Stefan Sjogelid grew up in the 1980s in Sweden, getting hooked on 8-bit consoles, Amigas, and BBSes. With a background in system and network administration, he packed his bags for Southeast Asia and continued to work in IT for many years, before love and a magic 8 ball told him to seek new opportunities in the North American continent. The Raspberry Pi is the latest gadget to grab Stefan's attention, and after much tinkering and learning a great deal about the unique properties of the Pi, he launched the PiLFS website (http://www.intestinate.com/pilfs), which teaches readers how to build their own GNU/Linux distribution and applications that are particularly useful on Raspberry Pi.
Read more about Stefan Sjogelid