Skip to main content
shopping_basket Basket 0

Add GPS Time and Location to a Raspberry Pi Project

Andrew Back
Open source (hardware and software!) advocate, Treasurer and Director of the Free and Open Source Silicon Foundation, organiser of Wuthering Bytes technology festival and founder of the Open Source Hardware User Group.


May 15, 2021 10:24

Hi Andrew. I am just in the middle of constructing this and one of the shortfalls I have discovered is with the nice Phoenix case. Because of the way the pi is mounted means it isn't possible to use normal standoff supports for the GPS hat. I think it should be ok, but Im going to see if I can rig something up as I'd hate to have a short between the two boards.

0 Votes

July 4, 2019 07:10

Thanks Andrew. Worked a treat on latest version of Rasbian Buster, 3 July 2019.

0 Votes

April 8, 2019 07:43

hi @Andrew, i followed your instructions to the letter but i found a problem testing with $ gpsmon
any ideas ?

0 Votes

September 24, 2018 09:27

Great article Andrew, I followed your instructions to the letter and it works great.

What I am really hoping to do with this is to override the geolocation my 4G Huawie B310 router is giving my network devices. I am connected to.a 4G tower in Dayton Ohio, but T-Mobile is reporting my location as either Chicago Illinois (240 miles away), Philadelphia Pennsylvania (540 miles away), or Denver Colorado (1200 miles away).

This is only a problem with my two Rokus trying to stream DirecTVNow. I can only get news from those cities, never my local channels.

I have my RP3 B+ set up as a WiFi hotspot, but want to feed my TRUE location to those devices. I've looked for VPN/Proxy servers in my area, but there are none.

Any suggestions?

October 2, 2018 04:31

@TrevorWeir Glad to hear you got up and running! My guess is that your location is being done using GeoIP, i.e. websites/services looking up your IP address, which isn't great in terms of resolution since the address could be part of some block registered many miles away. Can't think how else devices are being assigned some sort of location via the router, since websites won't have access to cellular connection info. With Android apps you can elect to provide location info, which is derived via GPS. Not sure if you can do the same with standard web browsers. In terms of "giving location to devices", the Pi can make the GPS NMEA data available over the network. However, the question then would be how to get applications running on your devices — typically a web browser — to report that info back to the website so that it doesn't try to get your location via GeoIP.

October 8, 2018 07:10

@Andrew Back Well I played around for a couple weeks and came to the realization I personally don't have the skills required do it. I had a good time playing around with NTP, DHCP, and GPS but I wasn't going to be able to override T-Mobile. So I decided to go back to spending time with the family, and donated the Pi & GPS Hat to my daughters high school Principles of Engineering class. Thanks for the great tutorial though!

[Comment was deleted]

August 13, 2018 08:12

Or put one of these in RPi USB for cheap :

0 Votes

[Comment was deleted]

[Comment was deleted]

April 11, 2017 09:16

The Uptronics GPS module ( I feel is a better solution for two main reasons. 1) Although not officially supported it allows the stacking of two RPI Hats as it doesn't have an on board eeprom which allows it to be combined with a Sense Hat without the eeproms addresses clashing. 2) The Uptronics Hat has a much more powerful uBlox M8Q GPS module whilst still retaining battery backup.

Related Content

DesignSpark Electrical Logolinkedin