蓝牙连接从 Raspberry Pi 失败,位于 LE Read Remote Used Features

Bluetooth connection failed from Raspberry Pi at LE Read Remote Used Features

我正在尝试将 Raspberry Pi 4 型号 B 与 Ortho remote 配对,但无法连接。

我正在使用 Linux raspberrypi 5.10.17-v7l+ 内核

我对调试蓝牙还很陌生,但看起来它在“LE 读取远程使用的功能”步骤失败,出现“无法建立连接 (0x3e)”错误。这是什么意思?我可以做些什么来进一步调试吗?

$ sudo bluetoothctl
[bluetooth]# trust F9:XX:XX:XX:XX:XX
Changing F9:XX:XX:XX:XX:XX trust succeeded
[bluetooth]# connect F9:XX:XX:XX:XX:XX
Attempting to connect to F9:XX:XX:XX:XX:XX
[CHG] Device F9:XX:XX:XX:XX:XX Connected: yes
Failed to connect: org.bluez.Error.Failed
[CHG] Device F9:XX:XX:XX:XX:XX Connected: no
[bluetooth]# pair F9:XX:XX:XX:XX:XX
Attempting to pair with F9:XX:XX:XX:XX:XX
[CHG] Device F9:XX:XX:XX:XX:XX Connected: yes
Failed to pair: org.bluez.Error.AuthenticationFailed
[CHG] Device F9:XX:XX:XX:XX:XX Connected: no


$ sudo btmon
...
@ MGMT Event: Device Connected (0x000b) plen 44                                                                                                          {0x0002} [hci0] 1979.845117
        LE Address: F9:XX:XX:XX:XX:XX (Static)
        Flags: 0x00000000
        Data length: 31
        Name (complete): ortho remote
        Flags: 0x04
          BR/EDR Not Supported
        Company: not assigned (1104)
          Data: 01005238434b4931324b
< HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2                                                                                            #1688 [hci0] 1979.845351
        Handle: 64
> HCI Event: Command Status (0x0f) plen 4                                                                                                                   #1689 [hci0] 1979.846487
      LE Read Remote Used Features (0x08|0x0016) ncmd 1
        Status: Success (0x00)
> HCI Event: Command Complete (0x0e) plen 14                                                                                                                #1690 [hci0] 1979.846501
      LE Read Remote Used Features (0x08|0x0016) ncmd 1
        Status: Success (0x00)
        00 00 00 00 00 00 00 00 00 00                    ..........
> HCI Event: LE Meta Event (0x3e) plen 12                                                                                                                   #1691 [hci0] 1980.142018
      LE Read Remote Used Features (0x04)
        Status: Connection Failed to be Established (0x3e)
        Handle: 64
        Features: 0x3f 0x00 0x00 0x08 0x00 0x00 0x00 0x00
          LE Encryption
          Connection Parameter Request Procedure
          Extended Reject Indication
          Slave-initiated Features Exchange
          LE Ping
          LE Data Packet Length Extension
          Unknown features (0x0000000008000000)
@ MGMT Event: Command Complete (0x0001) plen 10                                                                                                          {0x0001} [hci0] 1980.142093
      Pair Device (0x0019) plen 7
        Status: Failed (0x03)
        LE Address: F9:XX:XX:XX:XX:XX (Static)
> HCI Event: Disconnect Complete (0x05) plen 4                                                                                                              #1692 [hci0] 1980.143150
        Status: Success (0x00)
        Handle: 64
        Reason: Connection Failed to be Established (0x3e)
@ MGMT Event: Device Disconnected (0x000c) plen 8                                                                                                        {0x0001} [hci0] 1980.143206
        LE Address: F9:XX:XX:XX:XX:XX (Static)
        Reason: Unspecified (0x00)
@ MGMT Event: Device Disconnected (0x000c) plen 8                                                                                                        {0x0002} [hci0] 1980.143206
        LE Address: F9:XX:XX:XX:XX:XX (Static)
        Reason: Unspecified (0x00)

似乎出于某种原因,您的蓝牙模式设置为 bredr,并且因为您的设备是不支持 BLE 设备Bluetooth Classic -> BR/EDR Not Supported,您无法连接。因此,将其设置为 dual 就可以了。您可以通过编辑 etc/bluetooth/main.conf 将其设置为 dual 模式。如果您也将其设置为 le,我会期待相同的行为。

# 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