Skip to content

Part 4. Reading from the GPS

Rachel edited this page Jul 27, 2016 · 4 revisions

Cool fact: The Fona also has a built-in GPS.

Not-so-cool fact: The Pi can only make one serial connection.

Which leads us to an interesting conundrum - how can you collect GPS data from the Fona and still use the cellular connection (handled by PPPD) to stream that data?

You could handle all the cellular AT commands yourself, but they are way complicated and way better handled by PPPD.

I scoured the internet (so you don't have to), and all I could find was a very complicated way to try (and most likely fail) to give the Pi virtual serial ports.

So instead of doing that, I decided to figure out a way that I could start and stop the PPPD connection and read GPS info in between. The results weren't just successful - I was pleasantly surprised to find out that the Fona was very capable of handling rapid changes in the cellular connection.

So here's how to do it!

<< Part 3: Cellular Testing - Part 4: GPS Usage >>