I recently bought a Bluetooth GPS Antennae, it is the famous Royaltek RBT-2210, known for offering an amazing 23 hours of battery life (replaceble by using standard commodity Nokia mobile batteries), and powered by the critically acclaimed (by several online reviewers) Chipset Sirf Star III. In short, an acceptable fast device, with good precision, excellent battery life and great bang-for-the-buck.

I have Ubuntu 8.04.1 X86_64 updated with latest kernel (2.6.24-20).

I searched for wiki infos and howtos to make this gps bluetooth receiver work correctly under my favourite open source distro, and after some trial & error, here's my working experience.

Note: this guide is made with the RBT-2210 in mind, 'though the info should be adaptable to every other working Bluetooth GPS receiver on the market, like the Holux BT-321.

My introductory statement takes for granted the following requirements:

- a Linux laptop or PC (I used Ubuntu).
- Working Bluetooth Device or dongle.
- GPS Bluetooth receiver (mine is Royaltek RBT-2210).
- Internet.

For the bluetooth configuration file, I used a pretty standard one (just in case, here it is my /etc/bluetooth/hcid.conf):

#
# 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 user;

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

        # Default PIN code for incoming connections
        passkey "1234";
}

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

        # Local device class
        class 0x000100;

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

        # Inquiry and Page scan
        iscan enable; pscan enable;
        discovto 0;

        # Default link mode
        #   none   - no specific policy
        #   accept - always accept incoming connections

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

        # Inquiry and Page scan
        iscan enable; pscan enable;
        discovto 0;

        # 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;
}

You get this and all BT related stuff by installing the bluetooth meta package from Synaptic.

OK, now for some hands-on.

First thing first you need to find the device's MAC address, so open a terminal and type:

  • sudo hcitool scan

You'll receive some output similar to the below:

Scanning ...
        <strong>00:0A:3A:2C:CE:DB</strong>       BlueGPS 2CCEDB

Once you know the device's MAC Address, you'll need to disover the device's channel.

To find the device's channel, type the following:

  • sudo sdptool browse 00:0A:3A:2C:CE:DB

If you get no output from the previous command, then type the below command instead:

  • sudo sdptool records 00:0A:3A:2C:CE:DB

You should receive some output similar to the below:

Service Name: SPP
Service RecHandle: 0x10000
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    <strong>Channel: 1</strong>
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100

Failed to connect to SDP server on 00:0A:3A:2C:CE:DB: Connection timed out

The important part being the channel number in bold (just ignore the rest).

OK, at this stage, you'll need to make some changes for things to work.

Edit the rfcomm config file, so the changes you make are saved and available for the next time you'd like to use the device.

  • sudo vi /etc/bluetooth/rfcomm.conf

At the EOF paste the below:

#
# Configurazione porta rfcomm 2 per RBT-2210 GPS Bluetooth
#
rfcomm2 {
bind yes;
device 00:0A:3A:2C:CE:DB;
channel 1;
comment "Serial Port";
}

Now connect the rfcomm port:

  • sudo rfcomm connect 2

If everything is working alright, you'll see something as the below:

Connected /dev/rfcomm2 to 00:0A:3A:2C:CE:DB on channel 1
Press CTRL-C for hangup

Alright, so now you have all it takes for a working BT GPS receiver.

Open a new terminal and install some software to take advantage of it:

  • sudo apt-get install gpsd gpsdrive

Now launch gpsd on the right RF port:

  • sudo gpsd /dev/rfcomm2

At this point the configuration game is over: get in the car and experiment with gpsdrive!

  • gpsdrive

Upon the next reboot, if you're willing to use your GPS BT receiver again, simply power it up, start your PC, make sure your BT Service is UP and running and launch gpsd with the right port.

Afterwards launch your favourite program.

ADDENDUM: If, for some reasons, you'd need to use a serial port, there is the possibility to link the rfcomm port to a standard serial port. This is especially useful with Windows emulated software; this way you're able to fool the SW and make it know that, on a specific serial port, there's a GPS device; if you followed my example, you'd create a symlink From the rfcomm 2 (refer to above description for what that is), To the serial port ttYS1 (COM2 for the emulated Windows program).

  • sudo ln -sb /dev/rfcomm2 /dev/ttyS1

Now from your Windows program, inside the configuration options, you can specify that at the "COM2" ther's connected a generic GPS receiver and everything should work.

Rate this post

2 comments on “Royaltek RBT-2210 Ubuntu.

Comments are closed.