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.

Posted by Chris

Post to del.icio.us Post to del.icio.us

Post to Slashdot Post to Slashdot

Digg this Digg this

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.

14 Responses to “Bluetooth GPS on Ubuntu Gutsy”

  1. Holmss Says:

    Thanks, 2 days I search hoe to connect bluetooth through serial port ;)

  2. chris Says:

    Happy to help mate :-)

  3. dick van harten Says:

    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.

  4. Hakki Kotek Says:

    Excellent tutorial, thanks a lot. :D

  5. Cristi Says:

    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?

  6. ahven Says:

    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.

  7. luigi Says:

    hi, i messed around with the rfcomm.conf
    file now i thing is useless, i’m very new to linux so compiling is not my thing :-) can anyone help? could you tell me how to compile it properly?

  8. bluetooth Says:

    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.

  9. lucapost Says:

    I have mainnav mg-950d data logger, and with gpsd I have e great success!

    Now, what I can download track data from my device to my linux box?

  10. eduardo Says:

    Hello,

    I just can’t get it working
    The xgps stays blank
    I’ve also tried the gpsdrive, merkaator, and others
    My receiver is recognized and I can connect using rfcomm but get no sign in the above softwares
    Any hint?

  11. eduardo Says:

    By the way, the gps is a holux 1000

  12. thorsten Says:

    Very nice. :) My HOLUX_M-1000 is working with above steps perfectly. Thanks

  13. neuntoeter Says:

    Thanks for this tutorial!! This saved my day!

    I can now use my iBlue 747a+ with bluetooth under kubuntu!

  14. ferdi Says:

    Great info, but I wrote otherwise about this topic at my blog

Leave a Reply