This tutorial will guide you through the steps required to share your Nokia N95s built in GPS with your laptop, in Linux.
- First you need to grab a copy of ExtGPS (Update: software no longer exists) Symarctic ExtGPS is free for personal, non-commercial use.
- Now that you have ExtGPS installed, you can find it by choosing Menu -> Applications -> ExtGPS. You will be prompted to allow ExtGPS to use connectivity applications and to allow ExtGPS to use positioning data. Choose Yes for both.
- It may take quite a while before the GPS starts to receive a valid signal and get a fix. Make sure you are outside and have a clear view of the sky. The satellite icon will change from red to green once it has a fix.
- Make sure your phone is discoverable via Bluetooth. Choose Menu -> Tools -> Bluetooth. I chose to make my phone visible for 5 minutes.
- The next few steps are done from the command line. Here’s what I had to do on my Fedora 9 system.
[user@radon ~]$ sdptool search SP
Inquiring …
Searching for SP on aa:bb:cc:dd:ee:ff …
Service Name: Data Transfer
Service Description: Version
Service RecHandle: 0x1000f
Service Class ID List:
“Serial Port” (0x1101)
Protocol Descriptor List:
“L2CAP” (0x0100)Service Name: Symarctic ExtGPS
Service Description: Share phone’s built-in GPS module via Bluetooth
Service Provider: Symarctic Solutions
Service RecHandle: 0x10019
Service Class ID List:
“Serial Port” (0x1101)
Protocol Descriptor List:
“L2CAP” (0x0100)
“RFCOMM” (0x0003)
Channel: 5
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100 - The above output shows your phones Bluetooth MAC address, and that ExtGPS is exposing a serial port on Channel 5. We need to bind these together to make an entry in /dev.
[user@radon ~]$ sudo rfcomm bind 1 aa:bb:cc:dd:ee:ff 5
- The rfcomm bind paramaters above are the rfcomm device number, the phone’s Bluetooth MAC address, and the channel number as reported by sdptool. This creates a serial port at /dev/rfcomm1.
- At this point you should be able to stream raw NMEA sentences from your N95 directly to the console:
[user@radon ~]$ sudo cat /dev/rfcomm1
$GPGGA,022314.000,4826.67566,N,12322.19605,W,1,07,1.9,13.7,M,-18.3,M,,*52
$GPGLL,4826.67566,N,12322.19605,W,022314.000,A,A*4A
$GPGSA,A,3,30,29,10,21,24,26,15,,,,,,2.9,1.9,2.2*3D
$GPGST,022314.000,8.8,13.0,6.1,65.6,7.1,11.1,14.0*63
$GPGSV,3,1,11,05,09,179,,02,10,072,25,30,28,194,38,29,77,118,42*72
$GPGSV,3,2,11,10,42,059,36,16,24,315,27,21,45,256,43,24,84,024,40*79
$GPGSV,3,3,11,18,14,198,,26,10,114,38,15,09,128,33*49
$GPRMC,022314.000,A,4826.67566,N,12322.19605,W,0.1,159.6,151008,18.1,W,A*3B
$GPVTG,159.6,T,177.7,M,0.1,N,0.3,K,A*2C
^CWhile the NMEA sentences are streaming to the console, the Bluetooth icon in ExtGPS should change from red to green.
- We’re now connected so let’s do something a bit more useful. First, let’s run gpsd on the computer.
[user@radon ~]$ sudo /usr/sbin/gpsd -N /dev/rfcomm1
The -N paramater tells gpsd not to switch to background mode. I prefer doing it this way as I don’t leave gpsd running all the time. I only run it when I want to use it, then just hit ^C to close it. See the gpsd man page for more options.
- Now, from a second terminal window, try running xgps.
[user@radon ~]$ xgps
You should see something similar to the following:
- xgps is showing the usual GPS data. Latitude, Longitude, Altitude, Speed, etc.
- There are a number of applications available in Linux that can take advantage of a GPS device. I like using a combination of Kismet and GPSDrive while wardriving. If there is enough interest, I’ll write a tutorial on how I wardrive with Kismet and GPSDrive.
Thanks mate this guide is great. Worked perfectly in Ubuntu 9.10, except I used tangogps instead of xgps. I tried GPS drive, but I couldn’t work out how to use it =S It get’s the gps signal fine, but I didn’t know how to use it to get directions etc.
Thanks for the guide,
Matt
is it possible to do this in windows?? please please help.. thanks