Click to See Complete Forum and Search --> : Bluetooth PIN


Landy
10-28-2004, 03:18 PM
Hey guys, this is something thats been outstanding on my list of things to do for some time now.

I've got my bluetooth device working fine, thats ok, I can send things to my phone and then tell my phone to accept them. But I cannot pair the two as it asks for a PIN which I do not have.

I have followed several guides with no joy.
http://www.jeremythompson.uklinux.net/RH9-0/Bluez.html
http://www.unix-ag.uni-kl.de/~leonard/linux-n6600-howto.html
http://www.koeniglich.de/p3nfs/bluetooth.linux
http://www.westmaster.com/zidek/p900/bluetooth/

I've followed what I can from them about setting the PIN to no avail. Has anybody gotten this working?

Heres the contents of my files /etc/bluetooth/hcid.conf, /etc/bluetooth/givepin, /etc/bluetooth/pin

HCID.conf
#
# HCI daemon configuration file.
#
# $Id: hcid.conf,v 1.3 2002/07/18 18:12:46 maxk Exp $
#

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

# PIN helper
pin_helper /etc/bluetooth/pin;
}

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

# Local device class
class 0x100;

# 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,master;
#
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 hold,sniff;
#
lp hold,sniff,park;

# Authentication and Encryption
#auth enable;
#encrypt enable;
}

/etc/bluetooth/givepin
##############givepin##########
!/bin/sh
echo "PIN:1234"
################

/etc/bluetooth/pin
PIN:1234

Landy
10-29-2004, 05:51 PM
"Help, Help, no, please don't let me get sucked under these other topics" the little topic said. "Ok, I won't", Landy to the rescue again.

Landy
11-08-2004, 04:27 AM
Just for those who may be coming back to this. I updated to Mandrake 10.1 with KDE 3.3 and this came with kdebluetooth and its own pin features.

I just copied the kbebluetooth pin program over to /etc/bluetooth and then changed the hcid.conf from

# PIN helper
pin_helper /etc/bluetooth/pin;

to

# PIN helper
pin_helper /etc/bluetooth/kdebluepin;

Not too sure thats what its called, but this should ebe able to be repeated for anyone looking for help.

Cheers

leonpmu
11-08-2004, 06:08 AM
Good stuff dude, and thanks for posting how you got it right in the end :D

Landy
11-08-2004, 06:24 AM
I have to post solutions. I can't count the amount of times I've been looking for the fix to a problem to be met with loads of dead threads or ones ending with, "Thanks, I it fixed now" :rolleyes: