Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 48

Thread: Using Bluetooth GPS

  1. #31
    Join Date
    Jan 2007
    Beans
    76

    Re: Using Bluetooth GPS

    I have two problems with this plus one annoyance.

    Firstly, this does work for me but I have to run the

    $ rfcomm connect 0

    command, then kill it with ^C and then run it again. It never works the first time and always works the second time. Any suggestions?

    However, running gpsd automatically fills up my logs with crap if the gps receiver is off. After about three hours I have >3GB of gpsd warnings in two separate log files. Considering that my laptop has a tiny 8GB SSD, this is a serious problem so I have to start gpsd manually.

    Is there some way of starting all this automatically (this is the annoyance) so that the rfcomm connect command and then gpsd are run when the gps receiver is on and in range?

  2. #32
    Join Date
    Jan 2010
    Beans
    4

    Re: Using Bluetooth GPS

    Quote Originally Posted by Thalarse View Post
    Unfortunately this doesn't seem to work for me.

    The gps receiver shows up on hcitool scan as "00:0A:3A:25:7E:BD BT GPS"
    But when I do the sdptool browser I get "Browsing 00:0A:3A:25:7E:BD ..." And that's it.
    Try:
    sdptool browse --l2cap 00:11:22:33:44:55

    That worked with my GPS when sdptool browser gave that same what you said.

    I think I've got the wrong channel, perhaps, but I'm not sure. I don't know how to get the info out of the bluetooth receiver any other way.
    Check what that sdptool browse -l2cap says and try that channel.

    I had problems with backtrack linux and nokia bluetooth gps and I wrote short "tutorial" about that: http://www.petrilopia.net/wordpress/...cktrack-linux/ maybe it helps you?

  3. #33
    Join Date
    Oct 2005
    Beans
    220

    Re: Using Bluetooth GPS

    resurrecting a bit of old thread here - strange problem, blue tooth gps dongle is connected and working fine, xgps and gpspipe -r both receive data and function. However im finding no other program seems to want to work, specificly GmapCatcher and gpsdrive... Both appear to indicate the gps is unavailable but I can't find any further information on it.

    This is how im currently starting the gps:

    Code:
    sudo service gpsd stop
    sudo rfcomm connect 4
    sudo gpsd -D 5 -nN /dev/rfcomm4
    Followed all of the normal guides, the only thing I can seem to remember is in 9.10 having a similar problem (now running 10.04), and perhaps todo with permissions. Other than that im at a loss.

  4. #34
    Join Date
    Sep 2009
    Location
    Holland
    Beans
    20
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Using Bluetooth GPS

    I followed the instructions in this guide but didn't get data from the gps although connection was established. xgps reported "gpsd stopped sending data" after a while.

    When I made the connection with the commands Gorlist describes it works with both xgps and Navit!

  5. #35
    Join Date
    Jan 2010
    Beans
    6

    Question Re: Using Bluetooth GPS

    Hi! Thanks for the great howto!
    I got stuck at a late step:
    Code:
    rfcomm connect 4
    did not work (permission denied), but
    Code:
    sudo rfcomm connect 4
    did work.
    So I used the latter plus this. (Idea from https://answers.launchpad.net/ubuntu...question/70933)
    Code:
     chown me:me /dev/rfcomm4
    No error here.
    Code:
    gpsd /dev/rfcomm4
    The command seems to complete without any error.

    However, xgps displays nothing; gpsdrive says "no gps".
    Any ideas?

  6. #36
    Join Date
    May 2007
    Location
    College Park
    Beans
    26
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Using Bluetooth GPS

    I think i'm beating a goat w/ an old stone or horse with a stick or however you say it but I figured I would give it a try.

    So I went through many different tutorials to setup all my bluetooth stuff. Well I have a connection now.

    With:
    Code:
    sudo cat /etc/rfcomm4
    I get stuff like
    Code:
    $GPGGA,224017.000,3859.6387,N,07655.5266,W,2,04,5.8,16.5,M,-33.5,M,0.8,0000*71
    $GPRMC,224017.000,A,3859.6387,N,07655.5266,W,0.00,114.17,010710,,,D*75
    $GPVTG,114.17,T,,M,0.00,N,0.0,K,D*0A
    $GPGGA,224018.000,3859.6388,N,07655.5254,W,2,04,5.8,15.8,M,-33.5,M,0.8,0000*7E
    $GPRMC,224018.000,A,3859.6388,N,07655.5254,W,0.00,114.17,010710,,,D*74
    $GPVTG,114.17,T,,M,0.00,N,0.0,K,D*0A
    $GPGGA,224019.000,3859.6389,N,07655.5249,W,2,04,5.8,15.4,M,-33.5,M,0.8,0000*7E
    $GPRMC,224019.000,A,3859.6389,N,07655.5249,W,0.00,114.17,010710,,,D*78
    $GPVTG,114.17,T,,M,0.00,N,0.0,K,D*0A
    $GPGGA,224020.000,3859.6391,N,07655.5241,W,2,04,5.8,14.8,M,-33.5,M,1.8,0000*79
    $GPGSA,A,3,07,13,11,08,,,,,,,,,7.9,5.8,5.4*3D
    $GPGSV,3,1,11,07,79,213,36,19,53,047,,08,52,311,26,11,43,165,23*76
    $GPGSV,3,2,11,28,30,292,19,03,23,053,22,13,12,201,30,06,11,052,17*72
    $GPGSV,3,3,11,24,10,039,18,17,06,231,21,48,21,243,34*43
    $GPRMC,224020.000,A,3859.6391,N,07655.5241,W,0.00,114.17,010710,,,D*73
    $GPVTG,114.17,T,,M,0.00,N,0.0,K,D*0A
    $GPGGA,224021.000,3859.6392,N,07655.5233,W,2,04,5.8,14.3,M,-33.5,M,2.8,0000*76
    $GPRMC,224021.000,A,3859.6392,N,07655.5233,W,0.00,114.17,010710,,,D*74
    $GPVTG,114.17,T,,M,0.00,N,0.0,K,D*0A
    So i'm obviously getting data in but none of the programs can read it (xgps, tangogps...)

    I'm hoping I missed something simple. Anyone have any ideas?

  7. #37
    Join Date
    Sep 2006
    Location
    Finland
    Beans
    166
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Using Bluetooth GPS

    This is correct raw gps (NMEA) data that all gps-units receive. So search for a program to parse that.

    i.e. all programs use this through their own or a 3rd party api.

    Use keyword NMEA in the ubuntu software center. I don't have any gps-units to test atm.
    Last edited by gvoima; July 2nd, 2010 at 12:10 AM.
    "Software is like sex, it's better when it's free." ~Torvalds

  8. #38
    Join Date
    Jul 2010
    Beans
    2

    Re: Using Bluetooth GPS

    Hi. I'm new to forum and Ubuntu. I went to all the steps from this howto. Many thanks for that.
    At the end I got some mess coming form the GPS. xgps tells that it's connected at 4800bps. I'm sure that my GSpace GS-R238 works at 38400. How to make rfcomm connect at correct speed?
    M.

  9. #39
    Join Date
    Jul 2010
    Beans
    2

    Re: Using Bluetooth GPS

    I think I got it!
    Something has happened to GPS itself. I did factory reset on it and it works fine now.
    Thx.

  10. #40
    Join Date
    Apr 2009
    Beans
    4

    Post Re: Using Bluetooth GPS

    Ok. This is the solution I have for Ubuntu 10.04 LTS through VMWare Fusion 2.0.7 on a MacBook Pro with a Globalsat BT-338 bluetooth unit.

    Download bluez-utils, gpsd and gpsd-clients

    sudo apt-get install bluez-utils
    sudo apt-get install gpsd-clients
    sudo apt-get install gpsd

    Then

    sudo gedit /etc/bluetooth/hcid.conf

    This is what my hcid.conf looks like. Paste it in and save it

    #
    # HCI daemon configuration file.
    #

    # HCId options
    options {
    # Automatically initialize new devices
    autoinit yes;

    # Security Manager mode
    # none - Security manager disabled
    # auto - Use local PIN for incoming connections
    # user - Always ask user for a PIN
    #
    security none;

    # Pairing mode
    # none - Pairing disabled
    # multi - Allow pairing with already paired devices
    # once - Pair once and deny successive attempts
    pairing multi;

    # PIN helper
    pin_helper /usr/bin/bluepin;

    # D-Bus PIN helper
    #dbus_pin_helper;
    }

    # Default settings for HCI devices
    device {
    # Local device name
    # %d - device id
    # %h - host name
    name "My Laptop Ubuntu";

    # Local device class
    class 0x3e0100;

    # Default packet type
    #pkt_type DH1,DM1,HV1;

    # Inquiry and Page scan
    iscan enable; pscan enable;

    # Default link mode
    # none - no specific policy
    # accept - always accept incoming connections
    # master - become master on incoming connections,
    # deny role switch on outgoing connections
    lm accept;

    # Default link policy
    # none - no specific policy
    # rswitch - allow role switch
    # hold - allow hold mode
    # sniff - allow sniff mode
    # park - allow park mode
    lp rswitch,hold,sniff,park;

    # Authentication and Encryption (Security Mode 3)
    #auth enable;
    #encrypt enable;
    }

    Save it. I then rebooted as the init.d restart command didn't work

    Turn the GPS unit on

    hcitool scan

    Note the MAC address of the bluetooth unit

    sdptool search SP

    Note the channel number

    sudo gedit /etc/bluetooth/rfcomm.conf

    Paste the following at the end of the file, and save the file.

    rfcomm4 {
    bind yes;
    device < GPS MAC ADDRESS>;
    channel <CHANNEL NUMBER>;
    comment "Serial Port";
    }

    I then found that to connect reliably switch the order of gpsd and rfcomm commands worked

    sudo gpsd -b /dev/rfcomm4
    sudo rfcomm bind rfcomm4

    Then run cgps or xgps or whatever you have to look at the GPS data

    To disconnect

    sudo killall gpsd
    sudo rfcomm release 4

    To reconnect

    sudo gpsd -b /dev/rfcomm4
    sudo rfcomm bind rfcomm4

    And that only took about 18 hours of pissing about and I've had to type it in twice because this forum timed out my login the first time. So I hope someone finds it useful.

    PS. Thanks to NinoCass for the bulk of my solution.
    Last edited by mattbrook; August 1st, 2010 at 03:16 PM.

Page 4 of 5 FirstFirst ... 2345 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •