Monday, April 21, 2008

Gumstix - The Bluetooth passkey

I installed a new OS into my Gumstix and then tried to pair the Bluetooth device with my Mac.  It failed because it would not accept the passkey.  I had to log into the Gumstix using the serial port from a PC and hunt around the system.

In /etc/bluetooth/hcid.conf you will find the passkey that you have to tell the Mac about.  Here is the relevant part of my 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 auto;

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

There's the default password, this image is using BlueZ. You can either use this value as it is or edit it and use your new value.  After editing the file (if you choose to do this), you must restart the Bluetooth subsystem either by rebooting the Gumstix or by using the command:

/etc/init.d/bluetooth restart
  
Now you can use your new passkey for pairing from your host computer.

1 comment:

Vivek Raghunathan said...

Thanks a lot mate. You made my day.

Was trying to figure this out.