Get Firefox!

Home Free Software Faq Blog Microblog GNU/Linux Faq Free Media Faq's NRI Faq Immigration Faq Notes Donations About me..

Sat, 02 Nov 2013

gpsd as a gelocation provider for Firefox

As you know with Firefox 3.5 geolocation is in-build into the browser. I was looking out for ways to integrate my gps with Firefox or for that matter any websites.
Let me give a brief use case of Geolcation .So if you are in a city while driving and you are looking for the nearest hotel of your favorite cuisine.So till now you would have to type in your location etc.But with geolocation , if you allow Firefox to give your location to a website you can get context sensistive searches.You can read more about geolocation in a browser @ http://www.mozilla.com/en-US/firefox/geolocation/

Now coming back to the original post that you want to use your own gps , to provide your location to firefox then recently someone has checked in a fix for it in firefox.So I anticipate for it to show up in 3.6.I will try out the nightly builds as Im extremely excited about this fix.
Update : Instructions to test gpsd on GNU/Linux with Mozilla Firefox
There is very little documentation on the topic of using GPSD with Mozilla as location provider.
After a few searches I came across this very little documentation buried in a bug on Bugzilla
So to test gpsd on GNU/Linux please make sure that your GPS connectivity is correctly established between your computer and your GPS device.
In my case I used a free open source application called Blue NMEA on my android phone and used Bluetooth to connect to it.
In my case the serial port bound to bluetooth was /dev/rfcomm0, so I did a simple cat on it using root.You can run any other command based on your GPS device to ensure the GPS is working fine with your computer.
# cat /dev/rfcomm0
Ensured that the GPS was running fine by seeing all the NMEA sentences.
Next step is to ensure that GPSd is working fine with your device.
Once gpsd daemon is working fine then we will proceed to make configuration changes in Mozilla Firefox as stated by Doug Turner in the bug 492328
I have modified a dead URL in the instructions and here are the revised instructions
1) Navigate to 'about:config'
2) Create a new string preference, name 'geo.gpsd.host.ipaddr' value '123.123.123.123'
3) Create a new boolean value, name 'geo.gpsd.logging.enabled' value 'true'
4) Open the error console, select 'messages'
5) Navigate to Live Example On Mozilla Developer Network
6) Scroll to the section of Live Result and Click on the button "Show My Location" and when Firefox prompts , Press Share My Location
7) Verify that there are messages in the error console starting with '*** GPSD GEO: Got info: ...'

posted at: 01:17 | category: /firefox | permanent link to this entry | Donate via Bitcoin