Today we shall be playing with Ubuntu Gutsy Gibbon and a dodgy bluetooth GPS gizmo bought for twenty odd quid on eBay….
First of all, note the extremely poor quality of the device and the way the power button sticks in when you press it too hard. Secondly, note the way that the ‘earth’ pin on the three pin socket adaptor snaps off in the wall. Hoorah for cheap electronics!
Right, on to the interesting bit. To start with, you’ll need to find the address of your new gizmo:
hcitool scan
You should get one or more device listings returned. Note the MAC address registered to your bluetooth GPS device.
00:11:67:80:xx:xx iNav GPS
Taking the address, you now need to create a serial port connection to your GPS device.
sdptool browse 00:11:67:80:xx:xx
Which then returns output describing your new shiny virtual serial port.
And then by editing this file.
sudo gedit /etc/bluetooth/rfcomm.conf
And adding this text.
rfcomm4 {
bind yes;
device < YOUR GPS DEVICES MAC ADDRESS>;
channel 1;
comment “Serial Port”;
}
You artfully create a way to invoke your serial port quickly and painlessly by typing:
rfcomm connect 4
Well done. If you’ve got this far, your GPS device is now ‘theoretically’ connected to your computer. All you need to do now, is get some data from it. If you’re still having problems, visit this thread. Without it you wouldn’t be reading this..
You’ll need a gps daemon to talk to the device. Oh look, here’s one:
sudo apt-get install gpsd gpsd-clients
Now, You’ll get a prompt suggesting your reconfigure the gpsd service. That’s so it knows whether or not to start up automatically next time. This is entirely up to you…. You may or may want to give your system a reboot. I had to, you mightn’t.
Now, start gpsd
gpsd -n /dev/rfcomm4
And try the gpsd client to see if it’s working
xgps
Now, if everything is cool, you should get some output. If not, try the Ubuntu thread linked to above, or post a comment here.
When everything is running smoothly, getting your GPS going should simply be a case of running two commands:
rfcomm connect 4
gpsd -n /dev/rfcomm4
You might notice that Linux GPS software is a wee bit thin on the ground, but you can alway try gpsdrive from the Ubuntu repos, or gpsman. If you find any other decent stuff, please post here as I’d love to give it a go.