raspberrypi / firmware

This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.
5.17k stars 1.68k forks source link

Raspberry Pi 4b Bluetooth disconnects: I am having the same problem others had with the Pi 3 #1447

Open rob-meiner opened 4 years ago

rob-meiner commented 4 years ago

Did this ever get resolved? I am having the same problem with a Raspberry Pi 4b.

This happens with every bluetooth device that I try. In the case shown below, I am attempting to connect to an older Samsung Smartphone.

pi@antonio:~ $ sudo systemctl status hciuart.service
● hciuart.service - Configure Bluetooth Modems connected by UART
   Loaded: loaded (/lib/systemd/system/hciuart.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-08-04 14:02:57 CEST; 31min ago

Aug 04 14:02:27 antonio systemd[1]: Starting Configure Bluetooth Modems connected by UART...
Aug 04 14:02:57 antonio btuart[5279]: Initialization timed out.
Aug 04 14:02:57 antonio btuart[5279]: bcm43xx_init
Aug 04 14:02:57 antonio systemd[1]: hciuart.service: Control process exited, code=exited, status=1/FAILURE
Aug 04 14:02:57 antonio systemd[1]: hciuart.service: Failed with result 'exit-code'.
Aug 04 14:02:57 antonio systemd[1]: Failed to start Configure Bluetooth Modems connected by UART.

I updated to latest rpi-config using sudo rpi-update and rebooted.

Bluetooth still disconnects within 2-5 seconds of connecting (I xx'ed out the MAC addresses). In the entries at the end of this log, it appears that the disconnection request is coming from the raspberry pi.

pi@antonio:~ $ sudo bluetoothctl
Agent registered
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller DC:A6:XX:XX:XX:XX Discoverable: yes
[CHG] Device 44:78:XX:XX:XX:XX Connected: yes
[CHG] Device 44:78:XX:XX:XX:XX Connected: no
[bluetooth]# 

Just before attempting the pairing/connection, I ran sudo btmon -wpair.bts to log what goes wrong:


pi@antonio:~ $ sudo btmon -wpair.bts
Bluetooth monitor ver 5.50
= Note: Linux version 5.4.51-v7l+ (armv7l)                                                                          0.230608
= Note: Bluetooth subsystem version 2.22                                                                            0.230614
= New Index: DC:A6:XX:XX:XX:XX (Primary,UART,hci0)                                                           [hci0] 0.230617
= Open Index: DC:A6:XX:XX:XX:XX                                                                              [hci0] 0.230620
= Index Info: DC:A6:XX:XX:XX:XX (Cypress Semiconductor Corporation)                                          [hci0] 0.230624
@ MGMT Open: bluetoothd (privileged) version 1.14                                                          {0x0001} 0.230627
@ MGMT Open: btmon (privileged) version 1.14                                                               {0x0002} 0.230687
> HCI Event: Connect Request (0x04) plen 10                                                              #1 [hci0] 10.509907
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Class: 0x5a020c
          Major class: Phone (cellular, cordless, payphone, modem)
          Minor class: Smart phone
          Networking (LAN, Ad hoc)
          Capturing (Scanner, Microphone)
          Object Transfer (v-Inbox, v-Folder)
          Telephony (Cordless telephony, Modem, Headset)
        Link type: ACL (0x01)
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7                                            #2 [hci0] 10.510014
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Role: Master (0x00)
> HCI Event: Command Status (0x0f) plen 4                                                                #3 [hci0] 10.510491
      Accept Connection Request (0x01|0x0009) ncmd 1
        Status: Success (0x00)
> HCI Event: Role Change (0x12) plen 8                                                                   #4 [hci0] 10.734881
        Status: Success (0x00)
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Role: Master (0x00)
> HCI Event: Connect Complete (0x03) plen 11                                                             #5 [hci0] 10.873856
        Status: Success (0x00)
        Handle: 12
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Link type: ACL (0x01)
        Encryption: Disabled (0x00)
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2                                       #6 [hci0] 10.874111
        Handle: 12
> HCI Event: Command Status (0x0f) plen 4                                                                #7 [hci0] 10.874850
      Read Remote Supported Features (0x01|0x001b) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Supported Features (0x0b) plen 11                                               #8 [hci0] 10.874966
        Status: Success (0x00)
        Handle: 12
        Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
          3 slot packets
          5 slot packets
          Encryption
          Slot offset
          Timing accuracy
          Role switch
          Sniff mode
          Power control requests
          Channel quality driven data rate (CQDDR)
          SCO link
          HV2 packets
          HV3 packets
          u-law log synchronous data
          A-law log synchronous data
          CVSD synchronous data
          Paging parameter negotiation
          Power control
          Transparent synchronous data
          Flow control lag (most significant bit)
          Broadcast Encryption
          Enhanced Data Rate ACL 2 Mbps mode
          Enhanced Data Rate ACL 3 Mbps mode
          Enhanced inquiry scan
          Interlaced inquiry scan
          Interlaced page scan
          RSSI with inquiry results
          Extended SCO link (EV3 packets)
          EV4 packets
          EV5 packets
          AFH capable slave
          AFH classification slave
          LE Supported (Controller)
          3-slot Enhanced Data Rate ACL packets
          5-slot Enhanced Data Rate ACL packets
          Sniff subrating
          Pause encryption
          AFH capable master
          AFH classification master
          Enhanced Data Rate eSCO 2 Mbps mode
          Enhanced Data Rate eSCO 3 Mbps mode
          3-slot Enhanced Data Rate eSCO packets
          Extended Inquiry Response
          Simultaneous LE and BR/EDR (Controller)
          Secure Simple Pairing
          Encapsulated PDU
          Erroneous Data Reporting
          Non-flushable Packet Boundary Flag
          Link Supervision Timeout Changed Event
          Inquiry TX Power Level
          Enhanced Power Control
          Extended features
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3                                        #9 [hci0] 10.875035
        Handle: 12
        Page: 1
> HCI Event: Command Status (0x0f) plen 4                                                               #10 [hci0] 10.875634
      Read Remote Extended Features (0x01|0x001c) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Extended Features (0x23) plen 13                                               #11 [hci0] 10.875759
        Status: Success (0x00)
        Handle: 12
        Page: 1/2
        Features: 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00
          Secure Simple Pairing (Host Support)
          LE Supported (Host)
          Simultaneous LE and BR/EDR (Host)
< HCI Command: Remote Name Request (0x01|0x0019) plen 10                                                #12 [hci0] 10.875852
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Page scan repetition mode: R2 (0x02)
        Page scan mode: Mandatory (0x00)
        Clock offset: 0x0000
< ACL Data TX: Handle 12 flags 0x00 dlen 10                                                             #13 [hci0] 10.875882
      L2CAP: Information Request (0x0a) ident 1 len 2
        Type: Extended features supported (0x0002)
> HCI Event: Max Slots Change (0x1b) plen 3                                                             #14 [hci0] 10.876537
        Handle: 12
        Max slots: 5
> HCI Event: Command Status (0x0f) plen 4                                                               #15 [hci0] 10.876641
      Remote Name Request (0x01|0x0019) ncmd 1
        Status: Success (0x00)
> ACL Data RX: Handle 12 flags 0x02 dlen 10                                                             #16 [hci0] 10.883572
      L2CAP: Information Request (0x0a) ident 2 len 2
        Type: Extended features supported (0x0002)
< ACL Data TX: Handle 12 flags 0x00 dlen 16                                                             #17 [hci0] 10.883656
      L2CAP: Information Response (0x0b) ident 2 len 8
        Type: Extended features supported (0x0002)
        Result: Success (0x0000)
        Features: 0x000002b8
          Enhanced Retransmission Mode
          Streaming Mode
          FCS Option
          Fixed Channels
          Unicast Connectionless Data Reception
> HCI Event: Number of Completed Packets (0x13) plen 5                                                  #18 [hci0] 10.886334
        Num handles: 1
        Handle: 12
        Count: 2
> HCI Event: Remote Name Req Complete (0x07) plen 255                                                   #19 [hci0] 10.954611
        Status: Success (0x00)
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Name: Galaxy A3 (2016)
@ MGMT Event: Device Connected (0x000b) plen 36                                                    {0x0002} [hci0] 10.954674
        BR/EDR Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Flags: 0x00000000
        Data length: 23
        Name (complete): Galaxy A3 (2016)
        Class: 0x5a020c
          Major class: Phone (cellular, cordless, payphone, modem)
          Minor class: Smart phone
          Networking (LAN, Ad hoc)
          Capturing (Scanner, Microphone)
          Object Transfer (v-Inbox, v-Folder)
          Telephony (Cordless telephony, Modem, Headset)
@ MGMT Event: Device Connected (0x000b) plen 36                                                    {0x0001} [hci0] 10.954674
        BR/EDR Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Flags: 0x00000000
        Data length: 23
        Name (complete): Galaxy A3 (2016)
        Class: 0x5a020c
          Major class: Phone (cellular, cordless, payphone, modem)
          Minor class: Smart phone
          Networking (LAN, Ad hoc)
          Capturing (Scanner, Microphone)
          Object Transfer (v-Inbox, v-Folder)
          Telephony (Cordless telephony, Modem, Headset)
> HCI Event: IO Capability Response (0x32) plen 9                                                       #20 [hci0] 10.955098
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        IO capability: DisplayYesNo (0x01)
        OOB data: Authentication data not present (0x00)
        Authentication: Dedicated Bonding - MITM required (0x03)
> HCI Event: IO Capability Request (0x31) plen 6                                                        #21 [hci0] 10.955108
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
< HCI Command: IO Capability Request Reply (0x01|0x002b) plen 9                                         #22 [hci0] 10.955228
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        IO capability: NoInputNoOutput (0x03)
        OOB data: Authentication data not present (0x00)
        Authentication: Dedicated Bonding - MITM not required (0x02)
> HCI Event: Command Complete (0x0e) plen 10                                                            #23 [hci0] 10.955996
      IO Capability Request Reply (0x01|0x002b) ncmd 1
        Status: Success (0x00)
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
> ACL Data RX: Handle 12 flags 0x02 dlen 16                                                             #24 [hci0] 11.046034
      L2CAP: Information Response (0x0b) ident 1 len 8
        Type: Extended features supported (0x0002)
        Result: Success (0x0000)
        Features: 0x000000b8
          Enhanced Retransmission Mode
          Streaming Mode
          FCS Option
          Fixed Channels
< ACL Data TX: Handle 12 flags 0x00 dlen 10                                                             #25 [hci0] 11.046080
      L2CAP: Information Request (0x0a) ident 2 len 2
        Type: Fixed channels supported (0x0003)
> ACL Data RX: Handle 12 flags 0x02 dlen 10                                                             #26 [hci0] 11.047280
      L2CAP: Information Request (0x0a) ident 3 len 2
        Type: Fixed channels supported (0x0003)
< ACL Data TX: Handle 12 flags 0x00 dlen 20                                                             #27 [hci0] 11.047309
      L2CAP: Information Response (0x0b) ident 3 len 12
        Type: Fixed channels supported (0x0003)
        Result: Success (0x0000)
        Channels: 0x0000000000000086
          L2CAP Signaling (BR/EDR)
          Connectionless reception
          Security Manager (BR/EDR)
> HCI Event: Number of Completed Packets (0x13) plen 5                                                  #28 [hci0] 11.049905
        Num handles: 1
        Handle: 12
        Count: 2
> ACL Data RX: Handle 12 flags 0x02 dlen 20                                                             #29 [hci0] 11.051046
      L2CAP: Information Response (0x0b) ident 2 len 12
        Type: Fixed channels supported (0x0003)
        Result: Success (0x0000)
        Channels: 0x0000000000000082
          L2CAP Signaling (BR/EDR)
          Security Manager (BR/EDR)
> HCI Event: User Confirmation Request (0x33) plen 10                                                   #30 [hci0] 11.204147
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Passkey: 506401
< HCI Command: User Confirmation Request Reply (0x01|0x002c) plen 6                                     #31 [hci0] 11.204176
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
> HCI Event: Command Complete (0x0e) plen 10                                                            #32 [hci0] 11.214492
      User Confirmation Request Reply (0x01|0x002c) ncmd 1
        Status: Success (0x00)
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
> HCI Event: Simple Pairing Complete (0x36) plen 7                                                      #33 [hci0] 11.248482
        Status: Success (0x00)
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
> HCI Event: Link Key Notification (0x18) plen 23                                                       #34 [hci0] 11.256332
        Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Link key: 2fbd9de9fe06e1ed7f572ed1f8651c2a
        Key type: Unauthenticated Combination key from P-192 (0x04)
@ MGMT Event: New Link Key (0x0009) plen 26                                                        {0x0002} [hci0] 11.256355
        Store hint: Yes (0x01)
        BR/EDR Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Key type: Unauthenticated Combination key from P-192 (0x04)
        Link key: 2fbd9de9fe06e1ed7f572ed1f8651c2a
        PIN length: 0
@ MGMT Event: New Link Key (0x0009) plen 26                                                        {0x0001} [hci0] 11.256355
        Store hint: Yes (0x01)
        BR/EDR Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Key type: Unauthenticated Combination key from P-192 (0x04)
        Link key: 2fbd9de9fe06e1ed7f572ed1f8651c2a
        PIN length: 0
> ACL Data RX: Handle 12 flags 0x02 dlen 12                                                             #35 [hci0] 11.296012
      L2CAP: Connection Request (0x02) ident 4 len 4
        PSM: 1 (0x0001)
        Source CID: 76
< ACL Data TX: Handle 12 flags 0x00 dlen 16                                                             #36 [hci0] 11.296073
      L2CAP: Connection Response (0x03) ident 4 len 8
        Destination CID: 64
        Source CID: 76
        Result: Connection successful (0x0000)
        Status: No further information available (0x0000)
< ACL Data TX: Handle 12 flags 0x00 dlen 23                                                             #37 [hci0] 11.296084
      L2CAP: Configure Request (0x04) ident 3 len 15
        Destination CID: 76
        Flags: 0x0000
        Option: Retransmission and Flow Control (0x04) [mandatory]
          Mode: Basic (0x00)
          TX window size: 0
          Max transmit: 0
          Retransmission timeout: 0
          Monitor timeout: 0
          Maximum PDU size: 0
> HCI Event: Number of Completed Packets (0x13) plen 5                                                  #38 [hci0] 11.299902
        Num handles: 1
        Handle: 12
        Count: 2
> ACL Data RX: Handle 12 flags 0x02 dlen 16                                                             #39 [hci0] 11.301039
      L2CAP: Configure Request (0x04) ident 5 len 8
        Destination CID: 64
        Flags: 0x0000
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 672
< ACL Data TX: Handle 12 flags 0x00 dlen 18                                                             #40 [hci0] 11.301070
      L2CAP: Configure Response (0x05) ident 5 len 10
        Source CID: 76
        Flags: 0x0000
        Result: Success (0x0000)
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 672
> ACL Data RX: Handle 12 flags 0x02 dlen 14                                                             #41 [hci0] 11.302296
      L2CAP: Configure Response (0x05) ident 3 len 6
        Source CID: 64
        Flags: 0x0000
        Result: Success (0x0000)
> ACL Data RX: Handle 12 flags 0x02 dlen 24                                                             #42 [hci0] 11.307331
      Channel: 64 len 20 [PSM 1 mode 0] {chan 0}
      SDP: Service Search Attribute Request (0x06) tid 0 len 15
        Search pattern: [len 5]
          Sequence (6) with 3 bytes [8 extra bits] len 5
            UUID (3) with 2 bytes [0 extra bits] len 3
              PnP Information (0x1200)
        Max record count: 656
        Attribute list: [len 7]
          Sequence (6) with 5 bytes [8 extra bits] len 7
            Unsigned Integer (1) with 4 bytes [0 extra bits] len 5
              0x0000ffff
        Continuation state: 0
< ACL Data TX: Handle 12 flags 0x00 dlen 88                                                             #43 [hci0] 11.307546
      Channel: 76 len 84 [PSM 1 mode 0] {chan 0}
      SDP: Service Search Attribute Response (0x07) tid 0 len 79
        Attribute bytes: 76
          Attribute list: [len 72] {position 0}
            Attribute: Service Record Handle (0x0000) [len 2]
              0x00010000
            Attribute: Service Class ID List (0x0001) [len 2]
              UUID (3) with 2 bytes [0 extra bits] len 3
                PnP Information (0x1200)
            Attribute: Browse Group List (0x0005) [len 2]
              UUID (3) with 2 bytes [0 extra bits] len 3
                Public Browse Root (0x1002)
            Attribute: Bluetooth Profile Descriptor List (0x0009) [len 2]
              Sequence (6) with 6 bytes [8 extra bits] len 8
                UUID (3) with 2 bytes [0 extra bits] len 3
                  PnP Information (0x1200)
                Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                  0x0103
            Attribute: Unknown (0x0200) [len 2]
              0x0103
            Attribute: Unknown (0x0201) [len 2]
              0x1d6b
            Attribute: Unknown (0x0202) [len 2]
              0x0246
            Attribute: Unknown (0x0203) [len 2]
              0x0532
            Attribute: Unknown (0x0204) [len 2]
              true
            Attribute: Unknown (0x0205) [len 2]
              0x0002
        Continuation state: 0
> HCI Event: Number of Completed Packets (0x13) plen 5                                                  #44 [hci0] 11.312403
        Num handles: 1
        Handle: 12
        Count: 2
> ACL Data RX: Handle 12 flags 0x02 dlen 12                                                             #45 [hci0] 11.313524
      L2CAP: Disconnection Request (0x06) ident 6 len 4
        Destination CID: 64
        Source CID: 76
< ACL Data TX: Handle 12 flags 0x00 dlen 12                                                             #46 [hci0] 11.313563
      L2CAP: Disconnection Response (0x07) ident 6 len 4
        Destination CID: 64
        Source CID: 76
> ACL Data RX: Handle 12 flags 0x02 dlen 12                                                             #47 [hci0] 11.318513
      L2CAP: Connection Request (0x02) ident 7 len 4
        PSM: 1 (0x0001)
        Source CID: 77
< ACL Data TX: Handle 12 flags 0x00 dlen 16                                                             #48 [hci0] 11.318561
      L2CAP: Connection Response (0x03) ident 7 len 8
        Destination CID: 64
        Source CID: 77
        Result: Connection successful (0x0000)
        Status: No further information available (0x0000)
< ACL Data TX: Handle 12 flags 0x00 dlen 23                                                             #49 [hci0] 11.318570
      L2CAP: Configure Request (0x04) ident 4 len 15
        Destination CID: 77
        Flags: 0x0000
        Option: Retransmission and Flow Control (0x04) [mandatory]
          Mode: Basic (0x00)
          TX window size: 0
          Max transmit: 0
          Retransmission timeout: 0
          Monitor timeout: 0
          Maximum PDU size: 0
> HCI Event: Number of Completed Packets (0x13) plen 5                                                  #50 [hci0] 11.346120
        Num handles: 1
        Handle: 12
        Count: 2
> ACL Data RX: Handle 12 flags 0x02 dlen 16                                                             #51 [hci0] 11.348540
      L2CAP: Configure Request (0x04) ident 8 len 8
        Destination CID: 64
        Flags: 0x0000
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 672
< ACL Data TX: Handle 12 flags 0x00 dlen 18                                                             #52 [hci0] 11.348572
      L2CAP: Configure Response (0x05) ident 8 len 10
        Source CID: 77
        Flags: 0x0000
        Result: Success (0x0000)
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 672
> ACL Data RX: Handle 12 flags 0x02 dlen 14                                                             #53 [hci0] 11.349798
      L2CAP: Configure Response (0x05) ident 4 len 6
        Source CID: 64
        Flags: 0x0000
        Result: Success (0x0000)
> HCI Event: Number of Completed Packets (0x13) plen 5                                                  #54 [hci0] 11.351143
        Num handles: 1
        Handle: 12
        Count: 2
> ACL Data RX: Handle 12 flags 0x02 dlen 24                                                             #55 [hci0] 11.353575
      Channel: 64 len 20 [PSM 1 mode 0] {chan 0}
      SDP: Service Search Attribute Request (0x06) tid 0 len 15
        Search pattern: [len 5]
          Sequence (6) with 3 bytes [8 extra bits] len 5
            UUID (3) with 2 bytes [0 extra bits] len 3
              L2CAP (0x0100)
        Max record count: 656
        Attribute list: [len 7]
          Sequence (6) with 5 bytes [8 extra bits] len 7
            Unsigned Integer (1) with 4 bytes [0 extra bits] len 5
              0x0000ffff
        Continuation state: 0
< ACL Data TX: Handle 12 flags 0x00 dlen 221                                                            #56 [hci0] 11.353774
      Channel: 77 len 217 [PSM 1 mode 0] {chan 0}
      SDP: Service Search Attribute Response (0x07) tid 0 len 212
        Attribute bytes: 209
          Attribute list: [len 103] {position 0}
            Attribute: Service Record Handle (0x0000) [len 2]
              0x00010001
            Attribute: Service Class ID List (0x0001) [len 2]
              UUID (3) with 2 bytes [0 extra bits] len 3
                A/V Remote Control (0x110e)
              UUID (3) with 2 bytes [0 extra bits] len 3
                A/V Remote Control Controller (0x110f)
            Attribute: Protocol Descriptor List (0x0004) [len 2]
              Sequence (6) with 6 bytes [8 extra bits] len 8
                UUID (3) with 2 bytes [0 extra bits] len 3
                  L2CAP (0x0100)
                Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                  0x0017
              Sequence (6) with 6 bytes [8 extra bits] len 8
                UUID (3) with 2 bytes [0 extra bits] len 3
                  AVCTP (0x0017)
                Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                  0x0103
            Attribute: Browse Group List (0x0005) [len 2]
              UUID (3) with 2 bytes [0 extra bits] len 3
                Public Browse Root (0x1002)
            Attribute: Bluetooth Profile Descriptor List (0x0009) [len 2]
              Sequence (6) with 6 bytes [8 extra bits] len 8
                UUID (3) with 2 bytes [0 extra bits] len 3
                  A/V Remote Control (0x110e)
                Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                  0x0106
            Attribute: Additional Protocol Descriptor List (0x000d) [len 2]
              Sequence (6) with 16 bytes [8 extra bits] len 18
                Sequence (6) with 6 bytes [8 extra bits] len 8
                  UUID (3) with 2 bytes [0 extra bits] len 3
                    L2CAP (0x0100)
                  Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                    0x001b
                Sequence (6) with 6 bytes [8 extra bits] len 8
                  UUID (3) with 2 bytes [0 extra bits] len 3
                    AVCTP (0x0017)
                  Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                    0x0103
            Attribute: Unknown (0x0100) [len 2]
              AVRCP CT [len 8]
            Attribute: Unknown (0x0311) [len 2]
              0x004f
          Attribute list: [len 100] {position 1}
            Attribute: Service Record Handle (0x0000) [len 2]
              0x00010002
            Attribute: Service Class ID List (0x0001) [len 2]
              UUID (3) with 2 bytes [0 extra bits] len 3
                A/V Remote Control Target (0x110c)
            Attribute: Protocol Descriptor List (0x0004) [len 2]
              Sequence (6) with 6 bytes [8 extra bits] len 8
                UUID (3) with 2 bytes [0 extra bits] len 3
                  L2CAP (0x0100)
                Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                  0x0017
              Sequence (6) with 6 bytes [8 extra bits] len 8
                UUID (3) with 2 bytes [0 extra bits] len 3
                  AVCTP (0x0017)
                Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                  0x0103
            Attribute: Browse Group List (0x0005) [len 2]
              UUID (3) with 2 bytes [0 extra bits] len 3
                Public Browse Root (0x1002)
            Attribute: Bluetooth Profile Descriptor List (0x0009) [len 2]
              Sequence (6) with 6 bytes [8 extra bits] len 8
                UUID (3) with 2 bytes [0 extra bits] len 3
                  A/V Remote Control (0x110e)
                Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                  0x0105
            Attribute: Additional Protocol Descriptor List (0x000d) [len 2]
              Sequence (6) with 16 bytes [8 extra bits] len 18
                Sequence (6) with 6 bytes [8 extra bits] len 8
                  UUID (3) with 2 bytes [0 extra bits] len 3
                    L2CAP (0x0100)
                  Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                    0x001b
                Sequence (6) with 6 bytes [8 extra bits] len 8
                  UUID (3) with 2 bytes [0 extra bits] len 3
                    AVCTP (0x0017)
                  Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
                    0x0103
            Attribute: Unknown (0x0100) [len 2]
              AVRCP TG [len 8]
            Attribute: Unknown (0x0311) [len 2]
              0x005f
        Continuation state: 0
> ACL Data RX: Handle 12 flags 0x02 dlen 12                                                             #57 [hci0] 11.361025
      L2CAP: Disconnection Request (0x06) ident 9 len 4
        Destination CID: 64
        Source CID: 77
< ACL Data TX: Handle 12 flags 0x00 dlen 12                                                             #58 [hci0] 11.361068
      L2CAP: Disconnection Response (0x07) ident 9 len 4
        Destination CID: 64
        Source CID: 77
> HCI Event: Number of Completed Packets (0x13) plen 5                                                  #59 [hci0] 11.363663
        Num handles: 1
        Handle: 12
        Count: 2
< HCI Command: Disconnect (0x01|0x0006) plen 3                                                          #60 [hci0] 15.428297
        Handle: 12
        Reason: Remote User Terminated Connection (0x13)
> HCI Event: Command Status (0x0f) plen 4                                                               #61 [hci0] 15.428648
      Disconnect (0x01|0x0006) ncmd 1
        Status: Success (0x00)
> HCI Event: Disconnect Complete (0x05) plen 4                                                          #62 [hci0] 15.527355
        Status: Success (0x00)
        Handle: 12
        Reason: Connection Terminated By Local Host (0x16)
@ MGMT Event: Device Disconnected (0x000c) plen 8                                                  {0x0002} [hci0] 15.527405
        BR/EDR Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Reason: Connection terminated by local host (0x02)
@ MGMT Event: Device Disconnected (0x000c) plen 8                                                  {0x0001} [hci0] 15.527405
        BR/EDR Address: 44:78:XX:XX:XX:XX (Samsung Electronics Co.,Ltd)
        Reason: Connection terminated by local host (0x02)

Let me know if someone has any ideas.
Thanks!
Mark

_Originally posted by @rob-meiner in https://github.com/raspberrypi/firmware/issues/1092#issuecomment-668612614_
CCBP commented 1 year ago

Hi,

I encountered the same problem as you, and the logs printed out using btmon are basically the same.However, it should be noted that the device I am using is different from yours and is not a Raspberry Pi, but some other development board.

The phenomenon is that device A requests to connect with device B using bluetooth, and after device B receives Service Search Attribute Response from device A, device B initiates a request to disconnect.

After executing pair [mac address] in bluetoothctl, Bluetooth connects successfully for a few seconds and then disconnect, after executing connct [mac address], it shows Failed to connect: org.bluez.Error.Failed, and in btmon, I see error message as follows:

= bluetoothd: src/service.c:btd_service_connect() a2dp-source profile connect failed for [mac address]: Protocol not available

So I suspect that device A does not support a certain protocol that causes device B to disconnect.

After doing a lot of searching, I found this article, installed pulseaudio-module-bluetooth solved this problem. So I hope this will help you too!