Repeated bonding after deleting a bonding info from client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am implementing the Linux-based device controlled by BLE (so, my
device is peripheral and uses linux 6.6.20/bluez 5.73 stack onboard).
To pair with it I set up an agent with NoIO capability (the device has
no controls available for the user). When I enable pairable mode and
try to send a pair request from the client (a mobile phone, nRF
connect app), all works as expected. But if I remove pairing at the
phone side and try to re-establish bonding, the bluez refuses it with
'auth failed' (0x5) status in the log.

As I understand, it is expected behavior because the bluez has old
bonding information and tries to use it instead of rewriting by new
one.Is it possible to automatically override old bonding info in such
a case and accept this pairing request? Looks like bluez service
doesn't send any information via D-Bus in this situation.

Bluetoothd log fragment is below:

Jul 17 15:12:08 raspberry bluetoothd[735]:
src/shared/mgmt.c:can_read_data() [0x0000] event 0x000b
Jul 17 15:12:08 raspberry bluetoothd[735]:
src/adapter.c:connected_callback() hci0 device F0:39:65:2A:5D:F4
connected eir_len 0
Jul 17 15:12:08 raspberry bluetoothd[735]:
src/gatt-database.c:connect_cb() New incoming LE ATT connection
Jul 17 15:12:08 raspberry bluetoothd[735]:
src/device.c:device_attach_att() Elevating security level since LTK is
available
Jul 17 15:12:08 raspberry bluetoothd[735]:
attrib/gattrib.c:g_attrib_ref() 0x55556e447e30: g_attrib_ref=1
Jul 17 15:12:08 raspberry bluetoothd[735]: src/device.c:load_gatt_db()
Restoring F0:39:65:2A:5D:F4 gatt database from file
Jul 17 15:12:08 raspberry bluetoothd[735]:
src/settings.c:btd_settings_gatt_db_load() Unable to load key file
from /var/lib/bluetooth/2C:CF:67:43:20:E3/cache/F0:39:65:2A:5D:F4: (No
such file or directory)
Jul 17 15:12:08 raspberry bluetoothd[735]:
src/device.c:gatt_client_init() Reverse service discovery disabled:
skipping GATT client
...
Jul 17 15:12:11 raspberry bluetoothd[735]:
src/shared/mgmt.c:can_read_data() [0x0000] event 0x000f
Jul 17 15:12:11 raspberry bluetoothd[735]:
src/adapter.c:user_confirm_request_callback() hci0 F0:39:65:2A:5D:F4
confirm_hint 1
Jul 17 15:12:11 raspberry bluetoothd[735]:
src/adapter.c:btd_adapter_confirm_reply() hci0 addr F0:39:65:2A:5D:F4
success 0
Jul 17 15:12:11 raspberry bluetoothd[735]:
src/shared/mgmt.c:send_request() [0x0000] command 0x001d
Jul 17 15:12:11 raspberry bluetoothd[735]:
src/shared/mgmt.c:can_read_data() [0x0000] event 0x0011
Jul 17 15:12:11 raspberry bluetoothd[735]:
src/adapter.c:bonding_attempt_complete() hci0 bdaddr F0:39:65:2A:5D:F4
type 1 status 0x5
Jul 17 15:12:11 raspberry bluetoothd[735]:
src/device.c:device_bonding_complete() bonding (nil) status 0x05
Jul 17 15:12:11 raspberry bluetoothd[735]:
src/device.c:device_bonding_failed() status 5
Jul 17 15:12:11 raspberry bluetoothd[735]: src/adapter.c:resume_discovery()
Jul 17 15:12:11 raspberry bluetoothd[735]:
src/shared/mgmt.c:can_read_data() [0x0000] command 0x001d complete:
0x00
Jul 17 15:12:12 raspberry bluetoothd[735]:
src/device.c:device_remove() Removing device
/org/bluez/hci0/dev_6F_6F_75_1D_A8_AC
Jul 17 15:12:12 raspberry bluetoothd[735]:
src/device.c:btd_device_unref() Freeing device
/org/bluez/hci0/dev_6F_6F_75_1D_A8_AC
Jul 17 15:12:12 raspberry bluetoothd[735]: src/device.c:device_free()
0x55556e447410
Jul 17 15:12:14 raspberry bluetoothd[735]:
src/shared/mgmt.c:can_read_data() [0x0000] event 0x000c
Jul 17 15:12:14 raspberry bluetoothd[735]:
src/adapter.c:dev_disconnected() Device F0:39:65:2A:5D:F4
disconnected, reason 3
Jul 17 15:12:14 raspberry bluetoothd[735]:
src/adapter.c:adapter_remove_connection()
Jul 17 15:12:14 raspberry bluetoothd[735]:
plugins/policy.c:disconnect_cb() reason 3
Jul 17 15:12:14 raspberry bluetoothd[735]:
src/adapter.c:bonding_attempt_complete() hci0 bdaddr F0:39:65:2A:5D:F4
type 1 status 0xe
Jul 17 15:12:14 raspberry bluetoothd[735]:
src/device.c:device_bonding_complete() bonding (nil) status 0x0e
Jul 17 15:12:14 raspberry bluetoothd[735]:
src/device.c:device_bonding_failed() status 14
Jul 17 15:12:14 raspberry bluetoothd[735]: src/adapter.c:resume_discovery()
Jul 17 15:12:14 raspberry bluetoothd[735]:
src/shared/att.c:disconnect_cb() Channel 0x55556e447e90 disconnected:
Connection reset by peer
Jul 17 15:12:14 raspberry bluetoothd[735]: src/device.c:att_disconnected_cb()
Jul 17 15:12:14 raspberry bluetoothd[735]:
src/device.c:att_disconnected_cb() Connection reset by peer (104)
Jul 17 15:12:14 raspberry bluetoothd[735]:
src/device.c:att_disconnected_cb() Automatic connection disabled
Jul 17 15:12:14 raspberry bluetoothd[735]:
src/gatt-database.c:btd_gatt_database_att_disconnected()
Jul 17 15:12:14 raspberry bluetoothd[735]:
src/gatt-database.c:att_disconnected()
Jul 17 15:12:14 raspberry bluetoothd[735]:
attrib/gattrib.c:g_attrib_unref() 0x55556e447e30: g_attrib_unref=0

-- 
Yauhen Kharuzhy




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux