You are not logged in.
I have installed the Buez Bluetooth stack, as well as the KDE Bluetooth Framework, and it recognized my Bluetooth adapter, and is able to scan and locate devices. However, when I try to pair with a device, it never opens the PIN dialog, it simply gives me a connection error due to not being paired. I have configured /etc/bluetooth/hcid.conf to reflect "pin_helper /opt/kde/lib/kdebluetooth/kbluepin;" but it still doesn't open the dialog.
Here is the contents of my /etc/bluetooth/hcid.conf file:
#
# 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
#
# Use 'security user' to use the graphical pin helper only
# 'auto' means that for incoming connection the static number
# in the file /etc/bluetooth/pin is used.
security user;
# Pairing mode
# Allow to overwrite an existing pairing
pairing multi;
# PIN helper
# Use kdebluetooth's own pin helper.
# Errors messages can be found in the syslog.
# !! CHANGE ME !! Change the path according to your own setup
pin_helper /opt/kde/lib/kdebluetooth/kbluepin;
}
# Default settings for HCI devices
device {
# Local device class
# "Uncategorized computer", which pretends
# to support just about anything.
class 0xff0100;
# For some mobile phones you will have to tag your system
# as a Audio/Handsfree device to be able to use your computer
# as a Handsfree (only when connecting from the phone)
# class 0xff0408;
iscan enable; pscan enable;
lm accept;
lp hold,sniff,park;
# Authentication and Encryption
# If you enable this, a device *must* be paired to access any
# service on your computer
#auth enable;
#encrypt enable;
}
Here is some information I found in /var/log/everything.log:
Sep 3 00:57:29 AVERATEC hcid[2546]: link_key_request (sba=00:16:38:C1:7E:0D, dba=00:13:17:E8:7F:C8)
Sep 3 00:57:29 AVERATEC hcid[2546]: pin_code_request (sba=00:16:38:C1:7E:0D, dba=00:13:17:E8:7F:C8)
Sep 3 00:57:29 AVERATEC hcid[2546]: call_passkey_agent(): no agent registered
What should I do?
Bostoniman
Ba-zing Communications
Offline
Since bluez-utils was upgrade to 3.1, pin_helper is no longer used. You should have /etc/bluetooth/hcid.conf.pacnew on your system with the new format, which requires you to put your PIN in hcid.conf as follows:
# Default PIN code for incoming connections
passkey "BlueZ";
Also, if you haven't done this already, make sure dbus is running before starting the bluetooth daemons.
Offline
That's good to know about the passkey parameter. However, for my bluetooth headset, it has a PIN of its own that is required in order to pair with it. How do I configure BlueZ/kbluetoothd to prompt for the PIN for the headset when I attempt to connect with it? Also, I do have dbus running prior to bluetooth.
Bostoniman
Ba-zing Communications
Offline
Weird. I have almost a similar set up as you do (including the hcid.conf file), except for the fact that I use version 3.4 of bluez-libs and bluez-utils, and I was able to connect with a Bluetooth-enabled Samsung mobile to download pictures/movies/stuff. It never asked for a pairing key, though.
Offline
Yes, but this is not a phone that I am having the problem with. It's with a Bluetooth headset. I want to use it for things like Skype, etc, but the device has its own pairing key programmed into it, so that when you connect it with a phone, you can supply a pairing key for the phone to use.
Also, I updated my hcid.conf file to reflect the newer format:
#
# 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 "1111";
}
# Default settings for HCI devices
device {
# Local device name
# %d - device id
# %h - host name
name "AVERATEC";
# 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;
}
Bostoniman
Ba-zing Communications
Offline
Try running:
passkey-agent --default 1111
And while this is running, then try and make the connection. It works with my phone, so I don't see why it won't work with your headset. passkey-agent shouldn't output anything by the way, it'll just sit and hog the terminal.
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB Maxtor DiamondMax 10, 2x320GB WD Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB IBM TravelStar, Nvidia 5200Go 64MB
Offline
As pin-helper does not work any longer, I use the following method for pairing.
For every pairing request the bluetooth-daemon looks into:
/var/lib/bluetooth/YOUR_BD_ADDRESS/pincodes
if there is an entry for the new device.
You can get YOUR_BD_ADDRESS by executing hciconfig.
for instance:
/var/lib/bluetooth/00:06:DD:5A:6C:35/pincodes
put into this file an entry for every device you want to pair with:
00:30:7F:AB:11:7C 1234
(1 entry, 1 line)
You get the device-address with:
hcitool scan
hope that helps
a+
christian
Offline
Jeez, why the hell did no one from the bluez project write that pin_helper doesn't work anymore? I mean, what's the point of having software if it's not documented well? Duh, anyway, thanks chrismortimore, the passkey-agent trick worked well (I don't know why it's not in the kbluetoothd though ).
However, I'm now testing Bluetooth with a Nokia 6680 (runnign SymbianOS), and while it responds to l2pings, sdptool browse and I'm even able to pair with it (computer->Nokia), it can't connect the other way around. I mean, it doesn't even see that there is a computer device round there somewhere and says "No devices found".
I don't have rfcomm configured, because I don't know if it's really needed. If anyone has any suggestions regarding that Nokia thing (it works well with the Samsung mobile), I'd really appreciate help.
# HCId options
options {
autoinit yes;
security user;
pairing multi;
# Default PIN code for incoming connections
#passkey "1111";
}
# Default settings for HCI devices
device {
name "Deck Bluez";
# Local device class
class 0x3e0100;
# "Uncategorized computer", which pretends
# to support just about anything.
#class 0xff0100;
# Handsfree dongle
#class 0xff0408;
iscan enable; pscan enable;
lm accept;
lp rswitch,hold,sniff,park;
}
Offline
However, I'm now testing Bluetooth with a Nokia 6680 (runnign SymbianOS), and while it responds to l2pings, sdptool browse and I'm even able to pair with it (computer->Nokia), it can't connect the other way around. I mean, it doesn't even see that there is a computer device round there somewhere and says "No devices found".
I'm having this problem too with a N70 (Symbian also), and I've tracked it down to pscan and iscan. Despite having both enabled in hcid.conf, as you have above, I find that iscan doesn't always show up in hciconfig, and iscan is the one that makes the PC discoverable. So after starting bluetooth, I've been checking hciconfig, and if iscan isn't there, I do
hciconfig hci0 piscan
to enable both. The pscan/iscan details are in man hcid.conf, btw.
I have to say that since the move to blues-libs/utils 3.x, I've had nothing but problems with Bluetooth. I see they're up to 3.5 now - maybe I'll try that tomorrow. :x
Offline
I'm having this problem too with a N70 (Symbian also), and I've tracked it down to pscan and iscan. Despite having both enabled in hcid.conf, as you have above, I find that iscan doesn't always show up in hciconfig, and iscan is the one that makes the PC discoverable. So after starting bluetooth, I've been checking hciconfig, and if iscan isn't there, I do
hciconfig hci0 piscan
Thanks!
If only I could find a way to use kbluepin for pairing management... anyone knows if its in the kdebluetooth SVN?
Offline