Bluetooth GPS on Ubuntu Gutsy
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.
This entry was posted on Tuesday, October 16th, 2007 at 10:58 pm and is filed under . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Post to del.icio.us
Post to Slashdot
Digg this
October 27th, 2007 at 7:54 pm
Thanks, 2 days I search hoe to connect bluetooth through serial port
October 28th, 2007 at 12:27 pm
Happy to help mate
December 3rd, 2007 at 8:16 pm
Thanks,
Very good description. It worked immediately.
I use it with an Iblue 747. The type of gps reported is: iBT-GPS
My next step is to explore gpsd.
Dick van Harten.
December 17th, 2007 at 10:32 pm
Excellent tutorial, thanks a lot.
March 17th, 2008 at 5:28 am
Hi,
I have a Mainnav MG-910 and after i give the “rfcomm
connect 4″ command I get “Can’t connect RFCOMM socket : connection reset by peer”. Could you give me any help?
March 23rd, 2008 at 7:33 pm
Check out tangoGPS - http://www.tangogps.org/
The source compiles & runs fine on Debian (and probably on every distribution), don’t let the main page mislead you.
July 8th, 2008 at 1:34 am
hi, i messed around with the rfcomm.conf
can anyone help? could you tell me how to compile it properly?
file now i thing is useless, i’m very new to linux so compiling is not my thing
August 2nd, 2008 at 6:40 am
Ever feel your phone could be more communicative? A prototype developed by German and Swedish researchers uses pulses of heat on your skin to get the message across, and to direct you using GPS.