'

Royaltek RBT-2210 Ubuntu.

July 27th, 2008 by Andrea Matesi 2098 Views

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 Chipset Sirf Star III by various online reviewers. Shortly 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 & errors, here's my working experience. Note that even if this guide is made with the RBT-2210 in mind, the following info should generally apply 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 some hands-on. First thing first we need to know the device's MAC address, so let's open a terminal and let's type this:

  • sudo hcitool scan

You'll receive some output similar to this:

Scanning ...
        00:0A:3A:2C:CE:DB       BlueGPS 2CCEDB

Now we know the MAC Address, we need to disover the device's channel, so let's type the following:

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

If you get no output from the previous command, then launch this instead:

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

You should receive something like that:

Service Name: SPP
Service RecHandle: 0x10000
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
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 (simply ignore the rest).

OK, at this point we need to make some more definitive modifications, so we'll edit the rfcomm config file, in such a way that the changes we made, are stored and easily available next time.

  • sudo vi /etc/bluetooth/rfcomm.conf

At the EOF let's paste the following:

#
# 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 let's connect the rfcomm port:

  • sudo rfcomm connect 2

If everything is fine, we'll receive similar output:

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

Now we have all it takes for a working BT GPS receiver; let's open a new terminal and install some software able to take advantage of that:

  • sudo apt-get install gpsd gpsdrive

Let's launch the gpsd on the right RF port:

  • sudo gpsd /dev/rfcomm2

At this point the config game is over: prepare the car and experiment with gpsdrive!

  • gpsdrive

Upon next reboot, if you're willing to use your GPS BT receiver again, simply power it up, start your PC, make sure the BT Service is UP and running and launch gpsd with the right port; then 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 we are able to fool the SW and make him know that, on a specific serial port, is connected a GPS device; on my example we'll create a symlink from the (previously created) rfcomm 2 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" is connected a generic GPS receiver and everything should work.

Posted in GPS, Tips and Tricks. | 2 Comments »

2 responses to “Royaltek RBT-2210 Ubuntu.”

  1. ZoltanNo Gravatar says:

    Thanks! This is helped me.

  2. IlijaNo Gravatar says:

    Worked for me. Now it's time to play with quantum navigator :)