I'm trying to pair and eventually connect to the Bluetooth device using bluetoothctl, but unfortunately pairing always fails. Device which initiates pairing (DeviceA) shows pin code and yes/no option to confirm, but other device (DeviceB) doesn't. And whatever I do, the connection goes to timeout and eventually fails.
< HCI Command: IO Capability Request Reply (0x01|0x002b) plen 9 #21 [hci0] 10.668077
Address: 58:63:9A:0B:75:28 (OUI 58-63-9A)
IO capability: DisplayYesNo (0x01)
OOB data: Authentication data not present (0x00)
Authentication: Dedicated Bonding - MITM required (0x03)
> HCI Event: Command Complete (0x0e) plen 10 #22 [hci0] 10.668776
IO Capability Request Reply (0x01|0x002b) ncmd 1
Status: Success (0x00)
Address: 58:63:9A:0B:75:28 (OUI 58-63-9A)
> HCI Event: IO Capability Response (0x32) plen 9 #23 [hci0] 10.714623
Address: 58:63:9A:0B:75:28 (OUI 58-63-9A)
IO capability: DisplayYesNo (0x01)
OOB data: Authentication data not present (0x00)
Authentication: General Bonding - MITM not required (0x04)
> HCI Event: User Confirmation Request (0x33) plen 10 #24 [hci0] 10.936580
Address: 58:63:9A:0B:75:28 (OUI 58-63-9A)
Passkey: 377842
check full logs here.
It is also surprising that it never works even if I try other IO capabilities. The only parameter I cannot match ever is Dedicated vs General bonding. Is there any way that I can maybe force the same type of Auth as it seems that this could be the cause of the issues.
Setup info:
- DeviceB: the device to pair. Has Bluetooth 4.2 and BLE 5.0. Cannot have logs from it.
- DeviceA: initiates pairing. Running on embedded Buildroot 2020 hardware with rs9116N chipset.
Bluetooth modules are initially removed
rmmod rsi_sdio&rmmod rsi_91xand then loaded withinsmod bt\rsi_91x.ko dev_oper_mode=4&insmod bt\rsi_sdio.ko. Tried also BT DUAL MODE 12 but same outcome. dmesg shows all okay:
[ 544.819149] rsi_91x: <==== Interface DOWN ====>
[ 544.828699] phone0: port 1(wlan0) entered disabled state
[ 544.863028] device wlan0 left promiscuous mode
[ 544.863067] phone0: port 1(wlan0) entered disabled state
[ 545.113488] rsi_91x: ***** Watch Dog Reset Successful *****
[ 546.324264] rsi_91x: rsi_reset_card: Set high speed mode
[ 546.336188] rsi_91x: ##### RSI SDIO device disconnected #####
[ 546.470461] rsi_91x: rsi_probe: ***** 9116 Module *****
[ 546.470807] rsi_91x: rsi_hal_device_init: oper_mode = 4, coex_mode = 2
[ 546.475523] rsi_91x: ================================================
[ 546.475553] rsi_91x: ================ RSI Version Info ==============
[ 546.475570] rsi_91x: ================================================
[ 546.475591] rsi_91x: FW Version : 1610.2.3.0.0001
[ 546.475610] rsi_91x: Driver Version : RS9116.NB0.NL.GNU.LNX.OSD.2.0.0.0024
[ 546.475627] rsi_91x: Operating mode : 4 [BT EDR alone]
[ 546.475643] rsi_91x: Firmware file : pmemdata_wlan_bt_classic
[ 546.475653] rsi_91x: ================================================
[ 546.571490] rsi_91x: ***** Firmware Loading successful *****
I'm not an expert in kernel configuration, so maybe there is something wrong with it.
Steps I do:
- Run bluetooth daemon in separate terminal with
bluetoothd -n. - Run bluetoothctl
power onscan onand off when device is found.pair XX:XX
Now the pin code is shown in terminal and I can yes/no it, but DeviceB never shows it on its screen. And whatever I do, it will eventually go to timeout and connection will fail. Also tried to trust XX:XX in different occasions but never helped.
hciconfig -a shows:
hci0: Type: Primary Bus: SDIO
BD Address: 88:DA:1A:EB:84:E3 ACL MTU: 1021:3 SCO MTU: 64:3
UP RUNNING PSCAN
RX bytes:15113 acl:0 sco:0 events:156 errors:0
TX bytes:0 acl:0 sco:0 commands:75 errors:0
Features: 0xbf 0xc6 0x0d 0x7e 0x9b 0x1f 0x59 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
Name: 'BlueZ 5.54'
Class: 0x000000
Service Classes: Unspecified
Device Class: Miscellaneous,
HCI Version: 5.0 (0x9) Revision: 0x100
LMP Version: 5.0 (0x9) Subversion: 0x100
Manufacturer: not assigned (1791)
Is there maybe some mismatch in Bluetooth versions used?
Any help or suggestions would be great and helpful.
