BLE 키보드 페어링 오류: 페어링할 수 없음: org.bluez.Error.AuthenticationRejected

BLE 키보드 페어링 오류: 페어링할 수 없음: org.bluez.Error.AuthenticationRejected

BLE(Bluetooth Low Energy) 키보드(Nice!nano MCU로 구동)를 Arch Linux 장치에 연결하려고 합니다. 처음에는 키보드가 블루투스 장치로 전혀 표시되지 않았지만 실행 후 감지되었습니다 hcitool lescan. 그런 다음 다음을 통해 연결을 시도합니다 bluetoothctl.

Agent registered
[CHG] Controller 9C:B6:D0:E4:52:C8 Pairable: yes
[bluetooth]# agent KeyboardOnly
Agent is already registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Discovery started
[NEW] Device C9:08:85:1C:61:35 Cradio
[bluetooth]# pair C9:08:85:1C:61:35
Attempting to pair with C9:08:85:1C:61:35
Failed to pair: org.bluez.Error.AuthenticationRejected
[bluetooth]# info C9:08:85:1C:61:35
Device C9:08:85:1C:61:35 (random)
    Name: Cradio
    Alias: Cradio
    Appearance: 0x03c1
    Icon: input-keyboard
    Paired: no
    Trusted: yes
    Blocked: no
    Connected: no
    LegacyPairing: no
    UUID: Human Interface Device    (00001812-0000-1000-8000-00805f9b34fb)
    UUID: Battery Service           (0000180f-0000-1000-8000-00805f9b34fb)
    AdvertisingFlags:
  06                                               .
[bluetooth]# trust C9:08:85:1C:61:35
Changing C9:08:85:1C:61:35 trust succeeded
[bluetooth]# pair C9:08:85:1C:61:35
Attempting to pair with C9:08:85:1C:61:35
Failed to pair: org.bluez.Error.AuthenticationRejected
[bluetooth]# connect C9:08:85:1C:61:35
Attempting to connect to C9:08:85:1C:61:35
Failed to connect: org.bluez.Error.Failed Input/output error

btmon다음 출력이 표시됩니다.

@ MGMT Command: Pair Device (0x0019) plen 8                    {0x0001} [hci0] 3.201866
        LE Address: C9:08:85:1C:61:35 (Static)
        Capability: KeyboardDisplay (0x04)
@ MGMT Event: Command Complete (0x0001) plen 10                {0x0001} [hci0] 3.201888
      Pair Device (0x0019) plen 7
        Status: Rejected (0x0b)
        LE Address: C9:08:85:1C:61:35 (Static)
= bluetoothd: src/device.c:device_connect_le() ATT bt_io_connect(C9:08:85:..   6.293285

journalctl출력 bluetoothd( -d디버깅 활성화):

Aug 15 17:26:28 xps15 bluetoothd[9301]: src/device.c:btd_device_set_temporary() temporary 0
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/agent.c:agent_ref() 0x557957793970: ref=2
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/device.c:bonding_request_new() Requesting bonding for C9:08:85:1C:61:35
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/agent.c:agent_ref() 0x557957793970: ref=3
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/agent.c:agent_unref() 0x557957793970: ref=2
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/adapter.c:suspend_discovery()
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/adapter.c:adapter_bonding_attempt() hci0 bdaddr C9:08:85:1C:61:35 type 2 io_cap 0x04
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/adapter.c:pair_device_complete() Rejected (0x0b)
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr C9:08:85:1C:61:35 type 2 status 0xb
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/device.c:device_bonding_complete() bonding 0x5579577a4ca0 status 0x0b
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/device.c:btd_device_set_temporary() temporary 1
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/device.c:device_bonding_failed() status 11
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/agent.c:agent_unref() 0x557957793970: ref=1
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/adapter.c:resume_discovery()
Aug 15 17:26:28 xps15 bluetoothd[9301]: src/adapter.c:trigger_start_discovery()

답변1

ControllerMode속성을 dualin 으로 변경하여 이 문제를 해결할 수 있었습니다 /etc/bluetooth/main.conf. 이것이 bredr기본값입니다.

# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
ControllerMode = dual

그러면 장치가 감지되어 bluetoothctl문제 없이 연결되었습니다.

관련 정보