Skip to content

Connect/disconnect infinite loop  #41

@robertopierpaoli

Description

@robertopierpaoli

I'm running on Ubuntu Linux 15.10 32 bit, inside a Virtualbox VM.
The BT4.0 dongle is an ASUS device providing a Broadcom BCM20702A0 module.

Library versions are:

  • libglib2 2.46.1-1
  • libglib2-dev 2.46.1-1
  • libdbus-1-dev 1.10.0-1ubuntu1
  • libudev-dev 225-1ubuntu9.1
  • automake 1:1.15-1ubuntu1
  • libtool 2.4.2-1.11

To compete the compile phase and to run fliclib I had to install the further following packages:

  • libical-dev
  • libreadline-dev
  • libjson-glib-1.0-0
  • libsoup2.4-1

I have built bluez 5.39 from sources, applying the two suggested options (enable-experimental, enable-library).

No other bluetooth service is running, since none is installed in the system.

This is how I have proceeded:

  1. hciconfig -a hci0 reset

  2. I have launched bluetoothd from the src directory
    $> ./bluetoothd -nEd

  3. Through the interactive bluetoothctl shell:
    [bluetooth] power off
    [bluetooth] power on

  4. From the i386 distibution folder
    $> ./daemon -l -f flic.sqlite3

  5. Same as above, but in a different shell
    $> ./flic
    startScan
    (click on the button =>) Button discovered: 80:E4:DA:70:F2:0A
    (button pressed for 10s then released =>) connect 80:E4:DA:70:F2:0A

At this point a infinite loop of "connect" / "disconnect" has started.

I have attached some outputs as excerpt in txt files. They are also pasted below.

I don't get what I did wrong...

Any help?

Thanks in advance,

Roberto

btmon_excerpt.txt
bluetoothctl_shell.txt
bluetoothd.txt
flic_client.txt
flic_deamon.txt
syslog_excerpt.txt

[btmon]
`
@ Device Connected: 80:E4:DA:70:F2:0A (1) flags 0x0000
02 01 06 11 07 1b c5 d5 a5 02 00 dc 9e e4 11 e7 ................
26 c0 df 2a f0 09 09 66 30 31 38 63 50 49 4b &..*...f018cPIK

HCI Event: Command Status (0x0f) plen 4 [hci0] 155.783300
LE Read Remote Used Features (0x08|0x0016) ncmd 1
Status: Success (0x00)
HCI Event: LE Meta Event (0x3e) plen 12 [hci0] 155.959897
LE Read Remote Used Features (0x04)
Status: Remote User Terminated Connection (0x13)
Handle: 64
Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
LE Encryption
HCI Event: Disconnect Complete (0x05) plen 4 [hci0] 155.961853
Status: Success (0x00)
Handle: 64
Reason: Remote User Terminated Connection (0x13)
@ Device Disconnected: 80:E4:DA:70:F2:0A (1) reason 3
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 [hci0] 155.983964
Type: Passive (0x00)
Interval: 60.000 msec (0x0060)
Window: 30.000 msec (0x0030)
Own address type: Public (0x00)
Filter policy: Ignore not in white list (0x01)
HCI Event: Command Complete (0x0e) plen 4 [hci0] 155.985747
LE Set Scan Parameters (0x08|0x000b) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 [hci0] 155.986005
Scanning: Enabled (0x01)
Filter duplicates: Enabled (0x01)
HCI Event: Command Complete (0x0e) plen 4 [hci0] 155.991304
LE Set Scan Enable (0x08|0x000c) ncmd 1
Status: Success (0x00)
HCI Event: LE Meta Event (0x3e) plen 43 [hci0] 156.001395
LE Advertising Report (0x02)
Num reports: 1
Event type: Connectable undirected - ADV_IND (0x00)
Address type: Public (0x00)
Address: 80:E4:DA:70:F2:0A (OUI 80-E4-DA)
Data length: 31
Flags: 0x06
LE General Discoverable Mode
BR/EDR Not Supported
128-bit Service UUIDs (complete): 1 entry
f02adfc0-26e7-11e4-9edc-0002a5d5c51b
Name (complete): f018cPIK
RSSI: -62 dBm (0xc2)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 [hci0] 156.001667
Scanning: Disabled (0x00)
Filter duplicates: Disabled (0x00)
HCI Event: Command Complete (0x0e) plen 4 [hci0] 156.006302
LE Set Scan Enable (0x08|0x000c) ncmd 1
Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25 [hci0] 156.006512
Scan interval: 60.000 msec (0x0060)
Scan window: 30.000 msec (0x0030)
Filter policy: White list is not used (0x00)
Peer address type: Public (0x00)
Peer address: 80:E4:DA:70:F2:0A (OUI 80-E4-DA)
Own address type: Public (0x00)
Min connection interval: 50.00 msec (0x0028)
Max connection interval: 70.00 msec (0x0038)
Connection latency: 0x0000
Supervision timeout: 420 msec (0x002a)
Min connection length: 0.000 msec (0x0000)
Max connection length: 0.000 msec (0x0000)
HCI Event: Command Status (0x0f) plen 4 [hci0] 156.009295
LE Create Connection (0x08|0x000d) ncmd 1
Status: Success (0x00)
HCI Event: LE Meta Event (0x3e) plen 19 [hci0] 156.024604
LE Connection Complete (0x01)
Status: Success (0x00)
Handle: 64
Role: Master (0x00)
Peer address type: Public (0x00)
Peer address: 80:E4:DA:70:F2:0A (OUI 80-E4-DA)
Connection interval: 67.50 msec (0x0036)
Connection latency: 0.00 msec (0x0000)
Supervision timeout: 420 msec (0x002a)
Master clock accuracy: 0x05
< HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2 [hci0] 156.025012
Handle: 64
`

[syslog]
Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/gatt-database.c:profile_exited() ":1.17" exited Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/gatt-database.c:profile_remove() Removed ":1.17/org/flic/5C_F3_70_6A_D1_B1/f02adfc0-26e7-11e4-9edc-0002a5d5c51b" Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/service.c:change_state() 0x86a4120: device 80:E4:DA:70:F2:0A profile :1.17/org/flic/5C_F3_70_6A_D1_B1/f02adfc0-26e7-11e4-9edc-0002a5d5c51b state changed: connecting -> disconnected ( -103) Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/device.c:device_profile_connected() :1.17/org/flic/5C_F3_70_6A_D1_B1/f02adfc0-26e7-11e4-9edc-0002a5d5c51b Software caused connection abort (103) Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/service.c:change_state() 0x86a4120: device 80:E4:DA:70:F2:0A profile :1.17/org/flic/5C_F3_70_6A_D1_B1/f02adfc0-26e7-11e4-9edc-0002a5d5c51b state changed: disconnected -> unavailable (0) Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/gatt-database.c:profile_device_remove() :1.17/org/flic/5C_F3_70_6A_D1_B1/f02adfc0-26e7-11e4-9edc-0002a5d5c51b removed Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/service.c:btd_service_unref() 0x86a4120: ref=0 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/adapter.c:discovery_disconnect() owner :1.17 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/adapter.c:trigger_passive_scanning() Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/adapter.c:discovery_destroy() owner :1.17 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/device.c:device_set_rssi_with_delta() rssi 0 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: message repeated 3 times: [ src/device.c:device_set_rssi_with_delta() rssi 0] Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/device.c:device_set_tx_power() tx_power 127 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/device.c:device_set_rssi_with_delta() rssi 0 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/adapter.c:connected_callback() hci0 device 80:E4:DA:70:F2:0A connected eir_len 31 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/adapter.c:dev_disconnected() Device 80:E4:DA:70:F2:0A disconnected, reason 3 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/adapter.c:adapter_remove_connection() Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: plugins/policy.c:disconnect_cb() reason 3 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 80:E4:DA:70:F2:0A type 1 status 0xe Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/device.c:device_bonding_failed() status 14 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/adapter.c:resume_discovery() Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/adapter.c:connected_callback() hci0 device 80:E4:DA:70:F2:0A connected eir_len 31 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/adapter.c:dev_disconnected() Device 80:E4:DA:70:F2:0A disconnected, reason 3 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/adapter.c:adapter_remove_connection() Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: plugins/policy.c:disconnect_cb() reason 3 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 80:E4:DA:70:F2:0A type 1 status 0xe Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/device.c:device_bonding_failed() status 14 Apr 11 19:07:35 miniubuntu151032 bluetoothd[4667]: src/adapter.c:resume_discovery() Apr 11 19:07:36 miniubuntu151032 bluetoothd[4667]: src/adapter.c:connected_callback() hci0 device 80:E4:DA:70:F2:0A connected eir_len 31 Apr 11 19:07:36 miniubuntu151032 bluetoothd[4667]: src/adapter.c:dev_disconnected() Device 80:E4:DA:70:F2:0A disconnected, reason 3 Apr 11 19:07:36 miniubuntu151032 bluetoothd[4667]: src/adapter.c:adapter_remove_connection() Apr 11 19:07:36 miniubuntu151032 bluetoothd[4667]: plugins/policy.c:disconnect_cb() reason 3 Apr 11 19:07:36 miniubuntu151032 bluetoothd[4667]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 80:E4:DA:70:F2:0A type 1 status 0xe Apr 11 19:07:36 miniubuntu151032 bluetoothd[4667]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e Apr 11 19:07:36 miniubuntu151032 bluetoothd[4667]: src/device.c:device_bonding_failed() status 14 Apr 11 19:07:36 miniubuntu151032 bluetoothd[4667]: src/adapter.c:resume_discovery() ...

[client]
startScan Button discovered: 80:E4:DA:70:F2:0A connect 80:E4:DA:70:F2:0A Connecting to: 80:E4:DA:70:F2:0A Disconnecting from: 80:E4:DA:70:F2:0A Disconnected from: 80:E4:DA:70:F2:0A Connecting to: 80:E4:DA:70:F2:0A Disconnecting from: 80:E4:DA:70:F2:0A Disconnected from: 80:E4:DA:70:F2:0A Connecting to: 80:E4:DA:70:F2:0A Disconnecting from: 80:E4:DA:70:F2:0A Disconnected from: 80:E4:DA:70:F2:0A Connecting to: 80:E4:DA:70:F2:0A Disconnecting from: 80:E4:DA:70:F2:0A Disconnected from: 80:E4:DA:70:F2:0A Connecting to: 80:E4:DA:70:F2:0A Disconnecting from: 80:E4:DA:70:F2:0A Disconnected from: 80:E4:DA:70:F2:0A Connecting to: 80:E4:DA:70:F2:0A Disconnecting from: 80:E4:DA:70:F2:0A Disconnected from: 80:E4:DA:70:F2:0A Connecting to: 80:E4:DA:70:F2:0A Disconnecting from: 80:E4:DA:70:F2:0A ...

[daemon]
Button::gdBusDeviceSignalCallback, message received: PropertiesChanged [80:E4:DA:70:F2:0A] ('org.bluez.Device1', {'Connected': <true>}, @as []) [80:E4:DA:70:F2:0A] check [80:E4:DA:70:F2:0A] Disconnected -> Connecting [80:E4:DA:70:F2:0A] Button connecting [80:E4:DA:70:F2:0A] check [80:E4:DA:70:F2:0A] Button::gdBusDeviceSignalCallback, message received: PropertiesChanged [80:E4:DA:70:F2:0A] ('org.bluez.Device1', {'Connected': <false>}, @as []) [80:E4:DA:70:F2:0A] check [80:E4:DA:70:F2:0A] Connecting -> Disconnecting [80:E4:DA:70:F2:0A] Button disconnecting [80:E4:DA:70:F2:0A] close [80:E4:DA:70:F2:0A] cancelCalls [80:E4:DA:70:F2:0A] stopCharacteristics [80:E4:DA:70:F2:0A] check [80:E4:DA:70:F2:0A] Disconnecting -> Disconnected [80:E4:DA:70:F2:0A] Button disconnected [80:E4:DA:70:F2:0A] check [80:E4:DA:70:F2:0A] Button::gdBusDeviceSignalCallback, message received: PropertiesChanged [80:E4:DA:70:F2:0A] ('org.bluez.Device1', {'Connected': <true>, 'Name': <'f018cPIK'>, 'Alias': <'f018cPIK'>}, @as []) [80:E4:DA:70:F2:0A] check [80:E4:DA:70:F2:0A] Disconnected -> Connecting [80:E4:DA:70:F2:0A] Button connecting [80:E4:DA:70:F2:0A] check [80:E4:DA:70:F2:0A] Button::gdBusDeviceSignalCallback, message received: PropertiesChanged [80:E4:DA:70:F2:0A] ('org.bluez.Device1', {'Connected': <false>}, @as []) [80:E4:DA:70:F2:0A] check [80:E4:DA:70:F2:0A] Connecting -> Disconnecting [80:E4:DA:70:F2:0A] Button disconnecting [80:E4:DA:70:F2:0A] ...

[bluetoothctl shell]
[CHG] Device 80:E4:DA:70:F2:0A Connected: yes [CHG] Device 80:E4:DA:70:F2:0A Connected: no [CHG] Device 80:E4:DA:70:F2:0A Connected: yes [CHG] Device 80:E4:DA:70:F2:0A Name: f018cPIK [CHG] Device 80:E4:DA:70:F2:0A Alias: f018cPIK [CHG] Device 80:E4:DA:70:F2:0A Connected: no [CHG] Device 80:E4:DA:70:F2:0A Connected: yes [CHG] Device 80:E4:DA:70:F2:0A Connected: no [CHG] Device 80:E4:DA:70:F2:0A Connected: yes [CHG] Device 80:E4:DA:70:F2:0A Connected: no [CHG] Device 80:E4:DA:70:F2:0A Connected: yes [CHG] Device 80:E4:DA:70:F2:0A Connected: no [CHG] Device 80:E4:DA:70:F2:0A Connected: yes [CHG] Device 80:E4:DA:70:F2:0A Connected: no [CHG] Device 80:E4:DA:70:F2:0A Connected: yes [CHG] Device 80:E4:DA:70:F2:0A Connected: no [CHG] Device 80:E4:DA:70:F2:0A Connected: yes [CHG] Device 80:E4:DA:70:F2:0A Connected: no [CHG] Device 80:E4:DA:70:F2:0A Connected: yes [CHG] Device 80:E4:DA:70:F2:0A Connected: no [CHG] Device 80:E4:DA:70:F2:0A Connected: yes [CHG] Device 80:E4:DA:70:F2:0A Connected: no [CHG] Device 80:E4:DA:70:F2:0A Connected: yes [CHG] Device 80:E4:DA:70:F2:0A Connected: no ...

[bluetoothd]
bluetoothd[4667]: src/adapter.c:connected_callback() hci0 device 80:E4:DA:70:F2:0A connected eir_len 31 bluetoothd[4667]: src/adapter.c:dev_disconnected() Device 80:E4:DA:70:F2:0A disconnected, reason 3 bluetoothd[4667]: src/adapter.c:adapter_remove_connection() bluetoothd[4667]: plugins/policy.c:disconnect_cb() reason 3 bluetoothd[4667]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 80:E4:DA:70:F2:0A type 1 status 0xe bluetoothd[4667]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e bluetoothd[4667]: src/device.c:device_bonding_failed() status 14 bluetoothd[4667]: src/adapter.c:resume_discovery() bluetoothd[4667]: src/adapter.c:connected_callback() hci0 device 80:E4:DA:70:F2:0A connected eir_len 31 bluetoothd[4667]: src/adapter.c:dev_disconnected() Device 80:E4:DA:70:F2:0A disconnected, reason 3 bluetoothd[4667]: src/adapter.c:adapter_remove_connection() bluetoothd[4667]: plugins/policy.c:disconnect_cb() reason 3 bluetoothd[4667]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 80:E4:DA:70:F2:0A type 1 status 0xe bluetoothd[4667]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e bluetoothd[4667]: src/device.c:device_bonding_failed() status 14 bluetoothd[4667]: src/adapter.c:resume_discovery() bluetoothd[4667]: src/adapter.c:connected_callback() hci0 device 80:E4:DA:70:F2:0A connected eir_len 31 bluetoothd[4667]: src/adapter.c:dev_disconnected() Device 80:E4:DA:70:F2:0A disconnected, reason 3 bluetoothd[4667]: src/adapter.c:adapter_remove_connection() bluetoothd[4667]: plugins/policy.c:disconnect_cb() reason 3 bluetoothd[4667]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 80:E4:DA:70:F2:0A type 1 status 0xe bluetoothd[4667]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e bluetoothd[4667]: src/device.c:device_bonding_failed() status 14 bluetoothd[4667]: src/adapter.c:resume_discovery() bluetoothd[4667]: src/adapter.c:connected_callback() hci0 device 80:E4:DA:70:F2:0A connected eir_len 31 bluetoothd[4667]: src/adapter.c:dev_disconnected() Device 80:E4:DA:70:F2:0A disconnected, reason 3 bluetoothd[4667]: src/adapter.c:adapter_remove_connection() bluetoothd[4667]: plugins/policy.c:disconnect_cb() reason 3 ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions