Bug 656291

Summary: Bluetooth pairing does not save linkkeys
Product: [Fedora] Fedora Reporter: Mike Wohlgemuth <mjw>
Component: bluezAssignee: Bastien Nocera <bnocera>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: bnocera, devel.niks, dwmw2, kukabu, marcel, pakaka1i, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 17:26:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mike Wohlgemuth 2010-11-23 12:46:59 UTC
Description of problem:

I have a USB bluetooth adapter which I mainly use to tether my netbook to my Android phone.  Under Fedora 13, bluetooth pairing results in a file 

/var/lib/bluetooth/nn:nn:nn:nn:nn:nn/linkkeys

which contains the link key generated during pairing.  Under Fedora 14, pairing works properly, however, the linkkeys file is not retained, so any time I attempt to connect to my phone's access point, I must go through the pairing process again.



Version-Release number of selected component (if applicable):

bluez-4.77-1.fc14.i686

How reproducible:
Always

Steps to Reproduce:
1.  Pair with android phone by clicking on the bluetooth icon in the system tray, and selecting "Set up new device..."
2.  Attempt to connect to the new access point with the Network Manager applet
3.
  
Actual results:
I am now prompted to pair with the phone again

Expected results:
The link key should be stored, so that I am not prompted to pair with the phone every time I wish to use it's access point

Additional info:

I have been able to use the following as a work around:

Pair with the phone under Fedora 14.  Move the USB bluetooth adapter to a machine running Fedora 13 and give the USB adapter the same name as it had under the Fedora 14 netbook.  Pair with the phone under Fedora 13.  Copy /var/lib/bluetooth/nn:nn:nn:nn:nn:nn/linkkeys from the Fedora 13 box to the Fedora 14 netbook.  Move the USB bluetooth adapter back to the Fedora 14 netbook.  I can now use the NetworkManager applet to connect to the bluetooth access point without having to go through the pairing process again.

Comment 1 Bastien Nocera 2010-12-08 10:36:06 UTC
(In reply to comment #0)
> Description of problem:
> 
> I have a USB bluetooth adapter which I mainly use to tether my netbook to my
> Android phone.  Under Fedora 13, bluetooth pairing results in a file 
> 
> /var/lib/bluetooth/nn:nn:nn:nn:nn:nn/linkkeys
> 
> which contains the link key generated during pairing.  Under Fedora 14, pairing
> works properly, however, the linkkeys file is not retained, so any time I
> attempt to connect to my phone's access point, I must go through the pairing
> process again.

You'll need to run bluetoothd with debug enabled. Try running, as root:
killall bluetoothd
bluetoothd -d -n
And attach the output of that last command when reproducing the bug (eg. when pairing your phone).

Comment 2 Mike Wohlgemuth 2010-12-28 18:16:59 UTC
Here is the requested debugging output:


bluetoothd[2637]: Bluetooth deamon 4.77
bluetoothd[2637]: src/main.c:parse_config() parsing main.conf
bluetoothd[2637]: src/main.c:parse_config() discovto=0
bluetoothd[2637]: src/main.c:parse_config() pairto=0
bluetoothd[2637]: src/main.c:parse_config() pageto=8192
bluetoothd[2637]: src/main.c:parse_config() name=%h-%d
bluetoothd[2637]: src/main.c:parse_config() class=0x000100
bluetoothd[2637]: src/main.c:parse_config() discov_interval=0
bluetoothd[2637]: src/main.c:parse_config() Key file does not have key 'DeviceID'
bluetoothd[2637]: Starting SDP server
bluetoothd[2637]: src/plugin.c:plugin_init() Loading builtin plugins
bluetoothd[2637]: src/plugin.c:add_plugin() Loading audio plugin
bluetoothd[2637]: src/plugin.c:add_plugin() Loading input plugin
bluetoothd[2637]: src/plugin.c:add_plugin() Loading serial plugin
bluetoothd[2637]: src/plugin.c:add_plugin() Loading network plugin
bluetoothd[2637]: src/plugin.c:add_plugin() Loading service plugin
bluetoothd[2637]: src/plugin.c:add_plugin() Loading cable plugin
bluetoothd[2637]: src/plugin.c:add_plugin() Loading hciops plugin
bluetoothd[2637]: src/plugin.c:add_plugin() Loading formfactor plugin
bluetoothd[2637]: src/plugin.c:add_plugin() Loading storage plugin
bluetoothd[2637]: src/plugin.c:plugin_init() Loading plugins /usr/lib/bluetooth/plugins
bluetoothd[2637]: plugins/service.c:register_interface() path /org/bluez/2637/any
bluetoothd[2637]: plugins/service.c:register_interface() Registered interface org.bluez.Service on path /org/bluez/2637/any
bluetoothd[2637]: plugins/cable.c:cable_init() Setup cable plugin
bluetoothd[2637]: network/manager.c:read_config() Config options: Security=true
bluetoothd[2637]: Parsing /etc/bluetooth/input.conf failed: No such file or directory
bluetoothd[2637]: Parsing /etc/bluetooth/audio.conf failed: No such file or directory
bluetoothd[2637]: audio/unix.c:unix_init() Unix socket created: 9
bluetoothd[2637]: audio/headset.c:telephony_ready_ind() Telephony plugin initialized
bluetoothd[2637]: audio/headset.c:print_ag_features() HFP AG features: "Ability to reject a call" "Enhanced call status" "Extended Error Result Codes" 
bluetoothd[2637]: HCI dev 0 registered
bluetoothd[2637]: plugins/hciops.c:init_device() child 2638 forked
bluetoothd[2637]: src/adapter.c:btd_adapter_ref() 0x24d4250: ref=1
bluetoothd[2637]: src/main.c:main() Entering main loop
bluetoothd[2637]: src/rfkill.c:rfkill_event() RFKILL event idx 0 type 2 op 0 soft 0 hard 0
bluetoothd[2637]: src/rfkill.c:rfkill_event() RFKILL event idx 1 type 1 op 0 soft 0 hard 0
bluetoothd[2637]: HCI dev 0 up
bluetoothd[2637]: Starting security manager 0
bluetoothd[2637]: src/adapter.c:btd_adapter_set_class() Changing Major/Minor class to 0x000100
bluetoothd[2637]: plugins/service.c:register_interface() path /org/bluez/2637/hci0
bluetoothd[2637]: plugins/service.c:register_interface() Registered interface org.bluez.Service on path /org/bluez/2637/hci0
bluetoothd[2637]: network/manager.c:network_server_probe() path /org/bluez/2637/hci0
bluetoothd[2637]: src/adapter.c:btd_adapter_ref() 0x24d4250: ref=2
bluetoothd[2637]: network/server.c:server_register() Registered interface org.bluez.NetworkServer on path /org/bluez/2637/hci0
bluetoothd[2637]: serial/manager.c:proxy_probe() path /org/bluez/2637/hci0
bluetoothd[2637]: src/adapter.c:btd_adapter_ref() 0x24d4250: ref=3
bluetoothd[2637]: serial/proxy.c:proxy_register() Registered interface org.bluez.SerialProxyManager on path /org/bluez/2637/hci0
bluetoothd[2637]: Parsing /etc/bluetooth/serial.conf failed: No such file or directory
bluetoothd[2637]: src/adapter.c:btd_adapter_ref() 0x24d4250: ref=4
bluetoothd[2637]: audio/manager.c:headset_server_probe() path /org/bluez/2637/hci0
bluetoothd[2637]: src/adapter.c:btd_adapter_ref() 0x24d4250: ref=5
bluetoothd[2637]: audio/manager.c:audio_adapter_ref() 0x24d46d0: ref=1
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10000
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000003-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001108-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001112-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001203-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10001
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000003-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000111e-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000111f-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001203-0000-1000-8000-00805f9
bluetoothd[2637]: audio/manager.c:a2dp_server_probe() path /org/bluez/2637/hci0
bluetoothd[2637]: audio/manager.c:audio_adapter_ref() 0x24d46d0: ref=2
bluetoothd[2637]: audio/avdtp.c:avdtp_register_sep() SEP 0x24d5700 registered: type:0 codec:0 seid:1
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10002
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000019-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110a-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110d-0000-1000-8000-00805f9
bluetoothd[2637]: audio/manager.c:avrcp_server_probe() path /org/bluez/2637/hci0
bluetoothd[2637]: audio/manager.c:audio_adapter_ref() 0x24d46d0: ref=3
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10003
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110c-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10004
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[2637]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[2637]: plugins/formfactor.c:formfactor_probe() Setting 0x000100 for major/minor device class
bluetoothd[2637]: Clearing blocked list failed: Invalid argument (22)
bluetoothd[2637]: Adapter /org/bluez/2637/hci0 has been enabled
bluetoothd[2637]: plugins/hciops.c:child_exit() child 2638 exited
bluetoothd[2637]: src/adapter.c:adapter_update_tx_power() inquiry respone tx power level is 0
bluetoothd[2637]: src/adapter.c:register_agent() Agent registered for hci0 at :1.53:/org/bluez/agent/hci0
bluetoothd[2637]: Discovery session 0x24d45a0 with :1.81 activated
bluetoothd[2637]: src/adapter.c:session_ref() 0x24d45a0: ref=1
bluetoothd[2637]: src/adapter.c:session_unref() 0x24d45a0: ref=0
bluetoothd[2637]: src/adapter.c:session_remove() Discovery session 0x24d45a0 with :1.81 deactivated
bluetoothd[2637]: src/adapter.c:session_remove() Stopping discovery
bluetoothd[2637]: Stopping discovery
bluetoothd[2637]: src/adapter.c:adapter_get_device() 00:21:BA:E6:F7:91
bluetoothd[2637]: src/adapter.c:adapter_create_device() 00:21:BA:E6:F7:91
bluetoothd[2637]: src/device.c:device_create() Creating device /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91
bluetoothd[2637]: src/device.c:btd_device_ref() 0x24d73f8: ref=1
bluetoothd[2637]: src/device.c:bonding_request_new() /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91: requesting bonding
bluetoothd[2637]: src/device.c:bonding_request_new() Temporary agent registered for /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91 at :1.81:/org/bluez/agent/wizard
bluetoothd[2637]: src/adapter.c:adapter_get_device() 00:21:BA:E6:F7:91
bluetoothd[2637]: Authentication requested
bluetoothd[2637]: link_key_request (sba=00:02:72:AC:CD:16, dba=00:21:BA:E6:F7:91)
bluetoothd[2637]: src/security.c:link_key_request() kernel auth requirements = 0x03
bluetoothd[2637]: pin_code_request (sba=00:02:72:AC:CD:16, dba=00:21:BA:E6:F7:91)
bluetoothd[2637]: src/adapter.c:adapter_get_device() 00:21:BA:E6:F7:91
bluetoothd[2637]: src/device.c:device_request_authentication() /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91: requesting agent authentication
bluetoothd[2637]: link_key_notify (sba=00:02:72:AC:CD:16, dba=00:21:BA:E6:F7:91, type=6)
bluetoothd[2637]: src/adapter.c:adapter_get_device() 00:21:BA:E6:F7:91
bluetoothd[2637]: src/dbus-hci.c:hcid_dbus_bonding_process_complete() status=00
bluetoothd[2637]: src/adapter.c:adapter_get_device() 00:21:BA:E6:F7:91
bluetoothd[2637]: src/device.c:btd_device_ref() 0x24d73f8: ref=2
bluetoothd[2637]: src/agent.c:agent_release() Releasing agent :1.81, /org/bluez/agent/wizard
bluetoothd[2637]: src/device.c:device_probe_drivers() Probe drivers for /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91
bluetoothd[2637]: serial/manager.c:serial_probe() path /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91: 0000111f-0000-1000-8000-00805f9b34fb
bluetoothd[2637]: serial/port.c:create_serial_device() Registered interface org.bluez.Serial on path /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91
bluetoothd[2637]: serial/manager.c:serial_probe() path /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91: 00001112-0000-1000-8000-00805f9b34fb
bluetoothd[2637]: serial/manager.c:serial_probe() path /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91: 00001105-0000-1000-8000-00805f9b34fb
bluetoothd[2637]: serial/manager.c:serial_probe() path /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91: 0000112f-0000-1000-8000-00805f9b34fb
bluetoothd[2637]: input/manager.c:headset_probe() path /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91
bluetoothd[2637]: probe failed with driver input-headset for device /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91
bluetoothd[2637]: src/adapter.c:adapter_get_device() 00:21:BA:E6:F7:91
bluetoothd[2637]: src/device.c:btd_device_ref() 0x24d73f8: ref=3
bluetoothd[2637]: audio/device.c:audio_device_register() Registered interface org.bluez.Audio on path /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91
bluetoothd[2637]: audio/manager.c:handle_uuid() server not enabled for 00001112-0000-1000-8000-00805f9b34fb (0x1112)
bluetoothd[2637]: audio/manager.c:handle_uuid() server not enabled for 0000111f-0000-1000-8000-00805f9b34fb (0x111f)
bluetoothd[2637]: audio/manager.c:handle_uuid() server not enabled for 0000110a-0000-1000-8000-00805f9b34fb (0x110a)
bluetoothd[2637]: audio/manager.c:handle_uuid() Found AV Target
bluetoothd[2637]: audio/control.c:control_init() Registered interface org.bluez.Control on path /org/bluez/2637/hci0/dev_00_21_BA_E6_F7_91
bluetoothd[2637]: audio/manager.c:handle_uuid() Found AV Target
bluetoothd[2637]: src/device.c:btd_device_unref() 0x24d73f8: ref=2

Comment 3 F. Fellini 2011-02-08 11:02:56 UTC
I can confirm Mike Wohlgemuth's problem is the same that I encountered, though I encountered this after F13 to F14 upgrade. Mike Wohlgemuth's (Comment 1) solution works, and problem-solution is reproducible every time.
I made sure to delete my adapter's profile from "/var/lib/bluetooth/", and to delete associated devices from phone with every try.

Comment 4 Fedora End Of Life 2012-08-16 17:26:14 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping