Skip to contentSkip to conversation

Bluez 5.29 BLE connection issue

DISCUSSION Alexey Pavlyuk 2 participants 2 messages Mar 27, 2015 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi, can you help me with bluetooth connection issue?
I'm developing server which should work on BeagleBone Black device and connected with Android application by bluetooth LE or Classic. The server use Bluez library and set LE advertisement data, parameters and enable advertising. Than it create L2CAP socket and waits for connection. Debian 7.5 system ("wheezy") is installed on BeagleBone. I removed old bluez version than installed bluez-5.29 from source and run "bluetoothd --compat -d -n".
After that I cannot connect from Android to the server using BLE protocol.
Here is debug log:

Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: src/adapter.c:connected_callback() hci0 device X:X:X:X:X:X connected eir_len 0
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: src/gatt-database.c:connect_cb() New incoming LE ATT connection
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/adapter.c:connected_callback() hci0 device X:X:X:X:X:X connected eir_len 0
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/gatt-database.c:connect_cb() New incoming LE ATT connection
Mar 27 12:27:22 beaglebone bluetoothd[601]: attrib/gattrib.c:g_attrib_ref() 0x8dd20: g_attrib_ref=1
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/adapter.c:adapter_connect_list_remove() device /org/bluez/hci0/dev_X_X_X_X_X_X is not on the list, ignoring
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: attrib/gattrib.c:g_attrib_ref() 0x8dd20: g_attrib_ref=1
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: src/adapter.c:adapter_connect_list_remove() device /org/bluez/hci0/dev_X_X_X_X_X_X is not on the list, ignoring
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: src/adapter.c:dev_disconnected() Device X:X:X:X:X:X disconnected, reason 3
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: src/adapter.c:adapter_remove_connection()
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: plugins/policy.c:disconnect_cb() reason 3
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr X:X:X:X:X:X type 1 status 0xe
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: src/device.c:device_bonding_failed() status 14
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: src/adapter.c:resume_discovery()
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: src/device.c:att_disconnected_cb()
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: src/device.c:att_disconnected_cb() Connection reset by peer (104)
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: src/device.c:att_disconnected_cb() Automatic connection disabled
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]: attrib/gattrib.c:g_attrib_unref() 0x8dd20: g_attrib_unref=0
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/adapter.c:dev_disconnected() Device X:X:X:X:X:X disconnected, reason 3
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/adapter.c:adapter_remove_connection()
Mar 27 12:27:22 beaglebone bluetoothd[601]: plugins/policy.c:disconnect_cb() reason 3
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr X:X:X:X:X:X type 1 status 0xe
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/device.c:device_bonding_failed() status 14
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/adapter.c:resume_discovery()
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/device.c:att_disconnected_cb()
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/device.c:att_disconnected_cb() Connection reset by peer (104)
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/device.c:att_disconnected_cb() Automatic connection disabled
Mar 27 12:27:22 beaglebone bluetoothd[601]: attrib/gattrib.c:g_attrib_unref() 0x8dd20: g_attrib_unref=0

When I stop bluetoothd, BLE connection is working. But I need SDP server for Classic Bluetooth connection. Also all is working well with Bluez-4.99 library and the daemon.

Bluetooth dongle on 'Broadcom BCM20702' chipset is used.

Thank you,
Alexey

#1 lore raw

Hi Alexey,

Quoted 8 lines · Alexey Pavlyuk

Hi, can you help me with bluetooth connection issue?
I'm developing server which should work on BeagleBone Black device and connected with Android application by bluetooth LE or Classic. The server use Bluez library and set LE advertisement data, parameters and enable advertising. Than it create L2CAP socket and waits for connection. Debian 7.5 system ("wheezy") is installed on BeagleBone. I removed old bluez version than installed bluez-5.29 from source and run "bluetoothd --compat -d -n".

If you want to use GATT APIs you will need -E to enable experimental interfaces, then you should use them to register the GATT services if you have any, we are still working on the advertising API but it will also be possible to advertise via D-Bus interface.

Quoted 67 lines

After that I cannot connect from Android to the server using BLE protocol. Here is debug log:

Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
src/adapter.c:connected_callback() hci0 device X:X:X:X:X:X connected eir_len
0
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
src/gatt-database.c:connect_cb() New incoming LE ATT connection
Mar 27 12:27:22 beaglebone bluetoothd[601]:
src/adapter.c:connected_callback() hci0 device X:X:X:X:X:X connected eir_len
0
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/gatt-database.c:connect_cb()
New incoming LE ATT connection
Mar 27 12:27:22 beaglebone bluetoothd[601]: attrib/gattrib.c:g_attrib_ref()
0x8dd20: g_attrib_ref=1
Mar 27 12:27:22 beaglebone bluetoothd[601]:
src/adapter.c:adapter_connect_list_remove() device
/org/bluez/hci0/dev_X_X_X_X_X_X is not on the list, ignoring
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
attrib/gattrib.c:g_attrib_ref() 0x8dd20: g_attrib_ref=1
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
src/adapter.c:adapter_connect_list_remove() device
/org/bluez/hci0/dev_X_X_X_X_X_X is not on the list, ignoring
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
src/adapter.c:dev_disconnected() Device X:X:X:X:X:X disconnected, reason 3
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
src/adapter.c:adapter_remove_connection()
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
plugins/policy.c:disconnect_cb() reason 3
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
src/adapter.c:bonding_attempt_complete() hci0 bdaddr X:X:X:X:X:X type 1
status 0xe
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
src/device.c:device_bonding_complete() bonding (nil) status 0x0e
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
src/device.c:device_bonding_failed() status 14
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
src/adapter.c:resume_discovery()
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
src/device.c:att_disconnected_cb()
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
src/device.c:att_disconnected_cb() Connection reset by peer (104)
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
src/device.c:att_disconnected_cb() Automatic connection disabled
Mar 27 12:27:22 beaglebone bluetoothd[601]: bluetoothd[601]:
attrib/gattrib.c:g_attrib_unref() 0x8dd20: g_attrib_unref=0
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/adapter.c:dev_disconnected()
Device X:X:X:X:X:X disconnected, reason 3
Mar 27 12:27:22 beaglebone bluetoothd[601]:
src/adapter.c:adapter_remove_connection()
Mar 27 12:27:22 beaglebone bluetoothd[601]: plugins/policy.c:disconnect_cb()
reason 3
Mar 27 12:27:22 beaglebone bluetoothd[601]:
src/adapter.c:bonding_attempt_complete() hci0 bdaddr X:X:X:X:X:X type 1
status 0xe
Mar 27 12:27:22 beaglebone bluetoothd[601]:
src/device.c:device_bonding_complete() bonding (nil) status 0x0e
Mar 27 12:27:22 beaglebone bluetoothd[601]:
src/device.c:device_bonding_failed() status 14
Mar 27 12:27:22 beaglebone bluetoothd[601]: src/adapter.c:resume_discovery()
Mar 27 12:27:22 beaglebone bluetoothd[601]:
src/device.c:att_disconnected_cb()
Mar 27 12:27:22 beaglebone bluetoothd[601]:
src/device.c:att_disconnected_cb() Connection reset by peer (104)
Mar 27 12:27:22 beaglebone bluetoothd[601]:
src/device.c:att_disconnected_cb() Automatic connection disabled
Mar 27 12:27:22 beaglebone bluetoothd[601]:
Quoted 1 line

attrib/gattrib.c:g_attrib_unref() 0x8dd20: g_attrib_unref=0

We might need the HCI traffic to tell you what is happening, from what I can see the pairing is failing, do you have any agent running? Or are you trying this with bluetoothctl?

Quoted 5 lines

When I stop bluetoothd, BLE connection is working. But I need SDP server for Classic Bluetooth connection.
Also all is working well with Bluez-4.99 library and the daemon.

Bluetooth dongle on 'Broadcom BCM20702' chipset is used.

Signature · 1 line
Luiz Augusto von Dentz