[bluetooth] device can't auto reconnect when turned on as it's not trusted

Bug #1331642 reported by Ricardo Salveti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-system-settings (Ubuntu)
Fix Released
Medium
Mathieu Trudel-Lapierre

Bug Description

current build number: 87
device name: flo
channel: ubuntu-touch/utopic-proposed
last update: 2014-06-18 15:21:48
version version: 87
version ubuntu: 20140618
version device: 20140530

After successfully creating a connection with a device (soundlink mini bose), it can't auto reconnect once the device is turned on again.

bluetoothd logs:
Jun 18 18:23:42 ubuntu-phablet bluetoothd[2244]: src/adapter.c:session_remove() Discovery session 0xb701bed0 with :1.61 deactivated
Jun 18 18:23:42 ubuntu-phablet bluetoothd[2244]: src/adapter.c:session_remove() Stopping discovery
Jun 18 18:23:42 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:hciops_stop_discovery() index 0
Jun 18 18:23:42 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:hciops_stop_inquiry() hci0
Jun 18 18:23:42 ubuntu-phablet bluetoothd[2244]: Stopping discovery
Jun 18 18:23:42 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:set_state() hci0: new state 0
Jun 18 18:23:44 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:conn_complete() status 0x00
Jun 18 18:23:44 ubuntu-phablet bluetoothd[2244]: src/adapter.c:adapter_get_device() 00:0C:8A:B5:21:56
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:remote_version_information() hci0 status 0
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:remote_features_information() hci0 status 0
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:remote_name_information() hci0 status 0
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:link_key_request() hci0 dba 00:0C:8A:B5:21:56
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:get_auth_info() hci0 dba 00:0C:8A:B5:21:56
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:link_key_request() kernel auth requirements = 0x04
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:link_key_request() Matching key found
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:link_key_request() link key type 0x04
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_confirm_cb() AVDTP: incoming connect from 00:0C:8A:B5:21:56
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/sink.c:sink_set_state() State changed /org/bluez/2244/hci0/dev_00_0C_8A_B5_21_56: SINK_STATE_DISCONNECTED -> SINK_STATE_CONNECTING
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: Can't find device agent
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/sink.c:sink_set_state() State changed /org/bluez/2244/hci0/dev_00_0C_8A_B5_21_56: SINK_STATE_CONNECTING -> SINK_STATE_DISCONNECTED
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_unref() 0xb701dd80: ref=0
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_unref() 0xb701dd80: freeing session and removing from list
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:session_cb()
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_confirm_cb() AVDTP: incoming connect from 00:0C:8A:B5:21:56
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/sink.c:sink_set_state() State changed /org/bluez/2244/hci0/dev_00_0C_8A_B5_21_56: SINK_STATE_DISCONNECTED -> SINK_STATE_CONNECTING
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: Can't find device agent
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/sink.c:sink_set_state() State changed /org/bluez/2244/hci0/dev_00_0C_8A_B5_21_56: SINK_STATE_CONNECTING -> SINK_STATE_DISCONNECTED
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_unref() 0xb701dd80: ref=0
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_unref() 0xb701dd80: freeing session and removing from list
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:session_cb()
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:link_key_request() hci0 dba 00:0C:8A:B5:21:56
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:get_auth_info() hci0 dba 00:0C:8A:B5:21:56
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:link_key_request() kernel auth requirements = 0x04
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:link_key_request() Matching key found
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:link_key_request() link key type 0x04
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:auth_complete() hci0 status 0
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:bonding_complete() status 0x00
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: src/adapter.c:adapter_get_device() 00:0C:8A:B5:21:56
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: src/device.c:device_bonding_complete() bonding (nil) status 0x00
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_confirm_cb() AVDTP: incoming connect from 00:0C:8A:B5:21:56
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/sink.c:sink_set_state() State changed /org/bluez/2244/hci0/dev_00_0C_8A_B5_21_56: SINK_STATE_DISCONNECTED -> SINK_STATE_CONNECTING
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: Can't find device agent
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/sink.c:sink_set_state() State changed /org/bluez/2244/hci0/dev_00_0C_8A_B5_21_56: SINK_STATE_CONNECTING -> SINK_STATE_DISCONNECTED
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_unref() 0xb701dd80: ref=0
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_unref() 0xb701dd80: freeing session and removing from list
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:session_cb()
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_confirm_cb() AVDTP: incoming connect from 00:0C:8A:B5:21:56
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/sink.c:sink_set_state() State changed /org/bluez/2244/hci0/dev_00_0C_8A_B5_21_56: SINK_STATE_DISCONNECTED -> SINK_STATE_CONNECTING
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: Can't find device agent
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/sink.c:sink_set_state() State changed /org/bluez/2244/hci0/dev_00_0C_8A_B5_21_56: SINK_STATE_CONNECTING -> SINK_STATE_DISCONNECTED
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_unref() 0xb701dd80: ref=0
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_unref() 0xb701dd80: freeing session and removing from list
Jun 18 18:23:45 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:session_cb()
Jun 18 18:23:46 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_confirm_cb() AVDTP: incoming connect from 00:0C:8A:B5:21:56
Jun 18 18:23:46 ubuntu-phablet bluetoothd[2244]: audio/sink.c:sink_set_state() State changed /org/bluez/2244/hci0/dev_00_0C_8A_B5_21_56: SINK_STATE_DISCONNECTED -> SINK_STATE_CONNECTING
Jun 18 18:23:46 ubuntu-phablet bluetoothd[2244]: Can't find device agent
Jun 18 18:23:46 ubuntu-phablet bluetoothd[2244]: audio/sink.c:sink_set_state() State changed /org/bluez/2244/hci0/dev_00_0C_8A_B5_21_56: SINK_STATE_CONNECTING -> SINK_STATE_DISCONNECTED
Jun 18 18:23:46 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_unref() 0xb701dd80: ref=0
Jun 18 18:23:46 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:avdtp_unref() 0xb701dd80: freeing session and removing from list
Jun 18 18:23:46 ubuntu-phablet bluetoothd[2244]: audio/avdtp.c:session_cb()
Jun 18 18:23:46 ubuntu-phablet bluetoothd[2244]: plugins/hciops.c:disconn_complete() handle 2 status 0x00
Jun 18 18:23:46 ubuntu-phablet bluetoothd[2244]: src/event.c:btd_event_disconn_complete()
Jun 18 18:23:46 ubuntu-phablet bluetoothd[2244]: src/adapter.c:adapter_remove_connection()

Related branches

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

After setting trusted to yes, it worked fine:
python3 `which bluez-test-device` trusted 00:0C:8A:B5:21:56 yes

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, is that something that should be done once when the device is paired, or is that something that should be done automatically on login after reboots and such? The settings app is not running all the time, it can't be responsible to do things like auto connection that could happen while it's not running...

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

It's something that should be done when a device is both successfully paired and connected.

Marking the device trusted allows them to reconnect automatically to bluez without the need for an agent (which the settings window sometimes provides)

Changed in ubuntu-system-settings (Ubuntu):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Sebastien Bacher (seb128) wrote :

The linked change landed in that update

ubuntu-system-settings (0.3+14.10.20140623-0ubuntu1) utopic; urgency=low

  [ Mathieu Trudel-Lapierre ]
  * Implement discoverability and some bluetooth fixes: -
    Discoverability: make the system visible to other bluetooth devices
    - Trusted: when successfully paired and connected, mark device as
    Trusted so it can automatically connect again. - Connect the Audio
    interface for all audio devices, including Headsets. Some bluetooth
    audio devices that don't contain a microphone still show up as
    Headsets, and won't connect successfully otherwise. This will still
    work for standard headsets, since Audio connects all audio
    interfaces. - Stop discovery when a device is selected for
    connection, and it sometimes causes connection attempts to fail.
    (LP: #1268047)

Changed in ubuntu-system-settings (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.