linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* After kernel update: connect/disconnect forever while attempting to auto-reconnect
@ 2019-05-17  5:59 Carlos Pita
  2019-05-17 21:39 ` Alexandre Pereira Nunes
  0 siblings, 1 reply; 10+ messages in thread
From: Carlos Pita @ 2019-05-17  5:59 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

after upgrading to kernel 5.1.1 (and also 5.1.2) my bluetooth speakers
are unable to auto-reconnect. I can connect them without problems, but
once I turn them off and on again an unending sequence of connections
and disconnections begins:

---- manual connection ok ---------
[bluetooth]# connect E0:D1:E6:07:62:E1
Attempting to connect to E0:D1:E6:07:62:E1
[CHG] Device E0:D1:E6:07:62:E1 Connected: yes
Connection successful
[CHG] Device E0:D1:E6:07:62:E1 ServicesResolved: yes
---- turned off speakers and on again ----
[CHG] Device E0:D1:E6:07:62:E1 ServicesResolved: no
[CHG] Device E0:D1:E6:07:62:E1 Connected: no
[CHG] Device E0:D1:E6:07:62:E1 Connected: yes
[CHG] Device E0:D1:E6:07:62:E1 Connected: no
[CHG] Device E0:D1:E6:07:62:E1 Connected: yes
[CHG] Device E0:D1:E6:07:62:E1 Connected: no
[CHG] Device E0:D1:E6:07:62:E1 Connected: yes
[CHG] Device E0:D1:E6:07:62:E1 Connected: no
[CHG] Device E0:D1:E6:07:62:E1 Connected: yes
[CHG] Device E0:D1:E6:07:62:E1 Connected: no

I've tested this with a number of kernels:

linux-lts 4.19.43: doesn't work
linux 5.0.13: works
linux 5.1: works
linux 5.1.1: doesn't work
linux 5.1.2: doesn't work

All the above tests were done against bluez 5.50. I've also tested
bluez git master against linux 5.1.2 to no avail.

During failed attempts to auto-reconnect, the debug log shows:

May 17 02:25:27 carlos bluetoothd[8178]:
src/adapter.c:connected_callback() hci0 device E0:D1:E6:07:62:E1
connected eir_len 5
May 17 02:25:27 carlos bluetoothd[8178]:
src/adapter.c:dev_disconnected() Device E0:D1:E6:07:62:E1
disconnected, reason 3
May 17 02:25:27 carlos bluetoothd[8178]:
src/adapter.c:adapter_remove_connection()
May 17 02:25:27 carlos bluetoothd[8178]:
plugins/policy.c:disconnect_cb() reason 3
May 17 02:25:27 carlos bluetoothd[8178]:
src/adapter.c:bonding_attempt_complete() hci0 bdaddr E0:D1:E6:07:62:E1
type 0 status 0xe
May 17 02:25:27 carlos bluetoothd[8178]:
src/device.c:device_bonding_complete() bonding (nil) status 0x0e
May 17 02:25:27 carlos bluetoothd[8178]:
src/device.c:device_bonding_failed() status 14

Some other info that may be relevant:

> uname -a
Linux carlos 5.1.1-arch1-1-ARCH #1 SMP PREEMPT Sat May 11 13:02:48 UTC
2019 x86_64 GNU/Linux

> yay -Qi pulseaudio
Version         : 12.2-2

If you need something else to track down this issue, please let me
know. I've also reported this to pulseaudio tracker:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/674.

Best regards
--
Carlos

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: After kernel update: connect/disconnect forever while attempting to auto-reconnect
  2019-05-17  5:59 After kernel update: connect/disconnect forever while attempting to auto-reconnect Carlos Pita
@ 2019-05-17 21:39 ` Alexandre Pereira Nunes
  2019-05-18  5:33   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 10+ messages in thread
From: Alexandre Pereira Nunes @ 2019-05-17 21:39 UTC (permalink / raw)
  To: linux-bluetooth

I'm seeing the exact same behavior, but on a mouse (bt 3.x mouse; I
also have another which seems to be BLE and it still connects fine).
Reverting to 5.0 always works.


Em sex, 17 de mai de 2019 às 03:03, Carlos Pita
<carlosjosepita@gmail.com> escreveu:
>
> Hi,
>
> after upgrading to kernel 5.1.1 (and also 5.1.2) my bluetooth speakers
> are unable to auto-reconnect. I can connect them without problems, but
> once I turn them off and on again an unending sequence of connections
> and disconnections begins:
>
> ---- manual connection ok ---------
> [bluetooth]# connect E0:D1:E6:07:62:E1
> Attempting to connect to E0:D1:E6:07:62:E1
> [CHG] Device E0:D1:E6:07:62:E1 Connected: yes
> Connection successful
> [CHG] Device E0:D1:E6:07:62:E1 ServicesResolved: yes
> ---- turned off speakers and on again ----
> [CHG] Device E0:D1:E6:07:62:E1 ServicesResolved: no
> [CHG] Device E0:D1:E6:07:62:E1 Connected: no
> [CHG] Device E0:D1:E6:07:62:E1 Connected: yes
> [CHG] Device E0:D1:E6:07:62:E1 Connected: no
> [CHG] Device E0:D1:E6:07:62:E1 Connected: yes
> [CHG] Device E0:D1:E6:07:62:E1 Connected: no
> [CHG] Device E0:D1:E6:07:62:E1 Connected: yes
> [CHG] Device E0:D1:E6:07:62:E1 Connected: no
> [CHG] Device E0:D1:E6:07:62:E1 Connected: yes
> [CHG] Device E0:D1:E6:07:62:E1 Connected: no
>
> I've tested this with a number of kernels:
>
> linux-lts 4.19.43: doesn't work
> linux 5.0.13: works
> linux 5.1: works
> linux 5.1.1: doesn't work
> linux 5.1.2: doesn't work
>
> All the above tests were done against bluez 5.50. I've also tested
> bluez git master against linux 5.1.2 to no avail.
>
> During failed attempts to auto-reconnect, the debug log shows:
>
> May 17 02:25:27 carlos bluetoothd[8178]:
> src/adapter.c:connected_callback() hci0 device E0:D1:E6:07:62:E1
> connected eir_len 5
> May 17 02:25:27 carlos bluetoothd[8178]:
> src/adapter.c:dev_disconnected() Device E0:D1:E6:07:62:E1
> disconnected, reason 3
> May 17 02:25:27 carlos bluetoothd[8178]:
> src/adapter.c:adapter_remove_connection()
> May 17 02:25:27 carlos bluetoothd[8178]:
> plugins/policy.c:disconnect_cb() reason 3
> May 17 02:25:27 carlos bluetoothd[8178]:
> src/adapter.c:bonding_attempt_complete() hci0 bdaddr E0:D1:E6:07:62:E1
> type 0 status 0xe
> May 17 02:25:27 carlos bluetoothd[8178]:
> src/device.c:device_bonding_complete() bonding (nil) status 0x0e
> May 17 02:25:27 carlos bluetoothd[8178]:
> src/device.c:device_bonding_failed() status 14
>
> Some other info that may be relevant:
>
> > uname -a
> Linux carlos 5.1.1-arch1-1-ARCH #1 SMP PREEMPT Sat May 11 13:02:48 UTC
> 2019 x86_64 GNU/Linux
>
> > yay -Qi pulseaudio
> Version         : 12.2-2
>
> If you need something else to track down this issue, please let me
> know. I've also reported this to pulseaudio tracker:
> https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/674.
>
> Best regards
> --
> Carlos

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: After kernel update: connect/disconnect forever while attempting to auto-reconnect
  2019-05-17 21:39 ` Alexandre Pereira Nunes
@ 2019-05-18  5:33   ` Luiz Augusto von Dentz
  2019-05-18  8:53     ` Carlos Pita
  0 siblings, 1 reply; 10+ messages in thread
From: Luiz Augusto von Dentz @ 2019-05-18  5:33 UTC (permalink / raw)
  To: Alexandre Pereira Nunes; +Cc: linux-bluetooth

Hi,

On Sat, May 18, 2019 at 12:44 AM Alexandre Pereira Nunes
<alexandre.nunes@gmail.com> wrote:
>
> I'm seeing the exact same behavior, but on a mouse (bt 3.x mouse; I
> also have another which seems to be BLE and it still connects fine).
> Reverting to 5.0 always works.
>
>
> Em sex, 17 de mai de 2019 às 03:03, Carlos Pita
> <carlosjosepita@gmail.com> escreveu:
> >
> > Hi,
> >
> > after upgrading to kernel 5.1.1 (and also 5.1.2) my bluetooth speakers
> > are unable to auto-reconnect. I can connect them without problems, but
> > once I turn them off and on again an unending sequence of connections
> > and disconnections begins:
> >
> > ---- manual connection ok ---------
> > [bluetooth]# connect E0:D1:E6:07:62:E1
> > Attempting to connect to E0:D1:E6:07:62:E1
> > [CHG] Device E0:D1:E6:07:62:E1 Connected: yes
> > Connection successful
> > [CHG] Device E0:D1:E6:07:62:E1 ServicesResolved: yes
> > ---- turned off speakers and on again ----
> > [CHG] Device E0:D1:E6:07:62:E1 ServicesResolved: no
> > [CHG] Device E0:D1:E6:07:62:E1 Connected: no
> > [CHG] Device E0:D1:E6:07:62:E1 Connected: yes
> > [CHG] Device E0:D1:E6:07:62:E1 Connected: no
> > [CHG] Device E0:D1:E6:07:62:E1 Connected: yes
> > [CHG] Device E0:D1:E6:07:62:E1 Connected: no
> > [CHG] Device E0:D1:E6:07:62:E1 Connected: yes
> > [CHG] Device E0:D1:E6:07:62:E1 Connected: no
> > [CHG] Device E0:D1:E6:07:62:E1 Connected: yes
> > [CHG] Device E0:D1:E6:07:62:E1 Connected: no
> >
> > I've tested this with a number of kernels:
> >
> > linux-lts 4.19.43: doesn't work
> > linux 5.0.13: works
> > linux 5.1: works
> > linux 5.1.1: doesn't work
> > linux 5.1.2: doesn't work
> >
> > All the above tests were done against bluez 5.50. I've also tested
> > bluez git master against linux 5.1.2 to no avail.
> >
> > During failed attempts to auto-reconnect, the debug log shows:
> >
> > May 17 02:25:27 carlos bluetoothd[8178]:
> > src/adapter.c:connected_callback() hci0 device E0:D1:E6:07:62:E1
> > connected eir_len 5
> > May 17 02:25:27 carlos bluetoothd[8178]:
> > src/adapter.c:dev_disconnected() Device E0:D1:E6:07:62:E1
> > disconnected, reason 3
> > May 17 02:25:27 carlos bluetoothd[8178]:
> > src/adapter.c:adapter_remove_connection()
> > May 17 02:25:27 carlos bluetoothd[8178]:
> > plugins/policy.c:disconnect_cb() reason 3
> > May 17 02:25:27 carlos bluetoothd[8178]:
> > src/adapter.c:bonding_attempt_complete() hci0 bdaddr E0:D1:E6:07:62:E1
> > type 0 status 0xe
> > May 17 02:25:27 carlos bluetoothd[8178]:
> > src/device.c:device_bonding_complete() bonding (nil) status 0x0e
> > May 17 02:25:27 carlos bluetoothd[8178]:
> > src/device.c:device_bonding_failed() status 14
> >
> > Some other info that may be relevant:
> >
> > > uname -a
> > Linux carlos 5.1.1-arch1-1-ARCH #1 SMP PREEMPT Sat May 11 13:02:48 UTC
> > 2019 x86_64 GNU/Linux
> >
> > > yay -Qi pulseaudio
> > Version         : 12.2-2
> >
> > If you need something else to track down this issue, please let me
> > know. I've also reported this to pulseaudio tracker:
> > https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/674.

Please use btmon to collect the HCI trace and attach it to the problem.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: After kernel update: connect/disconnect forever while attempting to auto-reconnect
  2019-05-18  5:33   ` Luiz Augusto von Dentz
@ 2019-05-18  8:53     ` Carlos Pita
  2019-05-18 14:08       ` Alexandre Pereira Nunes
  0 siblings, 1 reply; 10+ messages in thread
From: Carlos Pita @ 2019-05-18  8:53 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: Alexandre Pereira Nunes, linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 331 bytes --]

Hi Luiz,

I've attached the output for a single auto-reconnect/disconnect sequence.

Notice this was using the 4.19.44 kernel, which is the LTS one in Arch
Linux. As I've pointed out above, the problem seems like a regression,
since it's happening both in older and latest kernels, but not
in-between them.

Best regards
--
Carlos

[-- Attachment #2: btmon.out --]
[-- Type: application/octet-stream, Size: 40235 bytes --]

~:: sudo btmon
Bluetooth monitor ver 5.50
= Note: Linux version 4.19.44-1-lts (x86_64)                                               0.232764
= Note: Bluetooth subsystem version 2.22                                                   0.232804
= New Index: 88:53:2E:39:25:B4 (Primary,USB,hci0)                                   [hci0] 0.232805
= Open Index: 88:53:2E:39:25:B4                                                     [hci0] 0.232805
= Index Info: 88:53:2E:39:25:B4 (Intel Corp.)                                       [hci0] 0.232806
@ MGMT Open: bluetoothd (privileged) version 1.14                                 {0x0001} 0.232807
@ MGMT Open: btmon (privileged) version 1.14                                      {0x0002} 0.232919
> HCI Event: Connect Request (0x04) plen 10                                     #1 [hci0] 21.095276
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Class: 0x240404
          Major class: Audio/Video (headset, speaker, stereo, video, vcr)
          Minor class: Wearable Headset Device
          Rendering (Printing, Speaker)
          Audio (Speaker, Microphone, Headset)
        Link type: ACL (0x01)
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7                   #2 [hci0] 21.095370
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Role: Master (0x00)
> HCI Event: Command Status (0x0f) plen 4                                       #3 [hci0] 21.097259
      Accept Connection Request (0x01|0x0009) ncmd 1
        Status: Success (0x00)
> HCI Event: Role Change (0x12) plen 8                                          #4 [hci0] 21.260315
        Status: Success (0x00)
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Role: Master (0x00)
> HCI Event: Connect Complete (0x03) plen 11                                    #5 [hci0] 21.282315
        Status: Success (0x00)
        Handle: 36
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Link type: ACL (0x01)
        Encryption: Disabled (0x00)
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2              #6 [hci0] 21.282553
        Handle: 36
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7                     #7 [hci0] 21.283231
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Page scan repetition mode: R1 (0x01)
> HCI Event: Command Status (0x0f) plen 4                                       #8 [hci0] 21.287208
      Read Remote Supported Features (0x01|0x001b) ncmd 0
        Status: Success (0x00)
> HCI Event: Max Slots Change (0x1b) plen 3                                     #9 [hci0] 21.289223
        Handle: 36
        Max slots: 5
> ACL Data RX: Handle 36 flags 0x02 dlen 12                                    #10 [hci0] 21.290971
      L2CAP: Connection Request (0x02) ident 1 len 4
        PSM: 1 (0x0001)
        Source CID: 193
> HCI Event: Command Status (0x0f) plen 4                                      #11 [hci0] 21.304246
      NOP (0x00|0x0000) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Supported Features (0x0b) plen 11                     #12 [hci0] 21.312326
        Status: Success (0x00)
        Handle: 36
        Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
          3 slot packets
          5 slot packets
          Encryption
          Slot offset
          Timing accuracy
          Role switch
          Hold mode
          Sniff mode
          Park state
          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
          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
          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              #13 [hci0] 21.312396
        Handle: 36
        Page: 1
> HCI Event: Command Status (0x0f) plen 4                                      #14 [hci0] 21.317234
      Read Remote Extended Features (0x01|0x001c) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Extended Features (0x23) plen 13                      #15 [hci0] 21.324085
        Status: Success (0x00)
        Handle: 36
        Page: 1/1
        Features: 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00
          Secure Simple Pairing (Host Support)
          LE Supported (Host)
< HCI Command: Remote Name Request (0x01|0x0019) plen 10                       #16 [hci0] 21.324199
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Page scan repetition mode: R2 (0x02)
        Page scan mode: Mandatory (0x00)
        Clock offset: 0x0000
< ACL Data TX: Handle 36 flags 0x00 dlen 10                                    #17 [hci0] 21.324214
      L2CAP: Information Request (0x0a) ident 1 len 2
        Type: Extended features supported (0x0002)
@ MGMT Event: Device Connected (0x000b) plen 18                           {0x0002} [hci0] 21.324222
        BR/EDR Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Flags: 0x00000000
        Data length: 5
        Class: 0x240404
          Major class: Audio/Video (headset, speaker, stereo, video, vcr)
          Minor class: Wearable Headset Device
          Rendering (Printing, Speaker)
          Audio (Speaker, Microphone, Headset)
@ MGMT Event: Device Connected (0x000b) plen 18                           {0x0001} [hci0] 21.324222
        BR/EDR Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Flags: 0x00000000
        Data length: 5
        Class: 0x240404
          Major class: Audio/Video (headset, speaker, stereo, video, vcr)
          Minor class: Wearable Headset Device
          Rendering (Printing, Speaker)
          Audio (Speaker, Microphone, Headset)
< ACL Data TX: Handle 36 flags 0x00 dlen 16                                    #18 [hci0] 21.324251
      L2CAP: Connection Response (0x03) ident 1 len 8
        Destination CID: 64
        Source CID: 193
        Result: Connection pending (0x0001)
        Status: No further information available (0x0000)
< ACL Data TX: Handle 36 flags 0x00 dlen 10                                    #19 [hci0] 21.324256
      L2CAP: Information Request (0x0a) ident 2 len 2
        Type: Extended features supported (0x0002)
> HCI Event: Number of Completed Packets (0x13) plen 5                         #20 [hci0] 21.329222
        Num handles: 1
        Handle: 36
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5                         #21 [hci0] 21.330219
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 16                                    #22 [hci0] 21.330959
      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
> HCI Event: Command Status (0x0f) plen 4                                      #23 [hci0] 21.331211
      Remote Name Request (0x01|0x0019) ncmd 1
        Status: Success (0x00)
> HCI Event: Number of Completed Packets (0x13) plen 5                         #24 [hci0] 21.332212
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 16                                    #25 [hci0] 21.332236
      L2CAP: Information Response (0x0b) ident 2 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 36 flags 0x00 dlen 10                                    #26 [hci0] 21.332273
      L2CAP: Information Request (0x0a) ident 3 len 2
        Type: Fixed channels supported (0x0003)
> HCI Event: Number of Completed Packets (0x13) plen 5                         #27 [hci0] 21.336240
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 17                                    #28 [hci0] 21.337986
> ACL Data RX: Handle 36 flags 0x01 dlen 3                                     #29 [hci0] 21.339591
      L2CAP: Information Response (0x0b) ident 3 len 12
        Type: Fixed channels supported (0x0003)
        Result: Success (0x0000)
        Channels: 0x0000000000000076
          L2CAP Signaling (BR/EDR)
          Connectionless reception
          Attribute Protocol
          L2CAP Signaling (LE)
          Security Manager (LE)
< ACL Data TX: Handle 36 flags 0x00 dlen 16                                    #30 [hci0] 21.339641
      L2CAP: Connection Response (0x03) ident 1 len 8
        Destination CID: 64
        Source CID: 193
        Result: Connection successful (0x0000)
        Status: No further information available (0x0000)
< ACL Data TX: Handle 36 flags 0x00 dlen 23                                    #31 [hci0] 21.339646
      L2CAP: Configure Request (0x04) ident 4 len 15
        Destination CID: 193
        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                         #32 [hci0] 21.344214
        Num handles: 1
        Handle: 36
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5                         #33 [hci0] 21.345285
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 16                                    #34 [hci0] 21.350381
      L2CAP: Configure Request (0x04) ident 2 len 8
        Destination CID: 64
        Flags: 0x0000
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 48
< ACL Data TX: Handle 36 flags 0x00 dlen 18                                    #35 [hci0] 21.350469
      L2CAP: Configure Response (0x05) ident 2 len 10
        Source CID: 193
        Flags: 0x0000
        Result: Success (0x0000)
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 48
> ACL Data RX: Handle 36 flags 0x02 dlen 14                                    #36 [hci0] 21.352203
      L2CAP: Configure Response (0x05) ident 4 len 6
        Source CID: 64
        Flags: 0x0000
        Result: Success (0x0000)
> ACL Data RX: Handle 36 flags 0x02 dlen 24                                    #37 [hci0] 21.358088
      Channel: 64 len 20 [PSM 1 mode 0] {chan 0}
      SDP: Service Search Attribute Request (0x06) tid 1 len 15
        Search pattern: [len 7]
          Sequence (6) with 5 bytes [8 extra bits] len 7
            UUID (3) with 4 bytes [0 extra bits] len 5
              Handsfree Audio Gateway (0x0000111f)
        Max record count: 38
        Attribute list: [len 5]
          Sequence (6) with 3 bytes [8 extra bits] len 5
            Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
              0x0004
        Continuation state: 0
< ACL Data TX: Handle 36 flags 0x00 dlen 14                                    #38 [hci0] 21.358286
      Channel: 193 len 10 [PSM 1 mode 0] {chan 0}
      SDP: Service Search Attribute Response (0x07) tid 1 len 5
        Attribute bytes: 2
        Continuation state: 0
> HCI Event: Remote Name Req Complete (0x07) plen 255                          #39 [hci0] 21.362206
        Status: Success (0x00)
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Name: MINIJAMBOX by Jawbone
> HCI Event: Number of Completed Packets (0x13) plen 5                         #40 [hci0] 21.363284
        Num handles: 1
        Handle: 36
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5                         #41 [hci0] 21.364276
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 12                                    #42 [hci0] 21.368268
      L2CAP: Disconnection Request (0x06) ident 3 len 4
        Destination CID: 64
        Source CID: 193
< ACL Data TX: Handle 36 flags 0x00 dlen 12                                    #43 [hci0] 21.368418
      L2CAP: Disconnection Response (0x07) ident 3 len 4
        Destination CID: 64
        Source CID: 193
> HCI Event: Number of Completed Packets (0x13) plen 5                         #44 [hci0] 21.374249
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 12                                    #45 [hci0] 21.382022
      L2CAP: Connection Request (0x02) ident 4 len 4
        PSM: 1 (0x0001)
        Source CID: 256
< ACL Data TX: Handle 36 flags 0x00 dlen 16                                    #46 [hci0] 21.382133
      L2CAP: Connection Response (0x03) ident 4 len 8
        Destination CID: 64
        Source CID: 256
        Result: Connection successful (0x0000)
        Status: No further information available (0x0000)
< ACL Data TX: Handle 36 flags 0x00 dlen 23                                    #47 [hci0] 21.382144
      L2CAP: Configure Request (0x04) ident 5 len 15
        Destination CID: 256
        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                         #48 [hci0] 21.387218
        Num handles: 1
        Handle: 36
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5                         #49 [hci0] 21.389220
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 16                                    #50 [hci0] 21.394509
      L2CAP: Configure Request (0x04) ident 5 len 8
        Destination CID: 64
        Flags: 0x0000
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 48
< ACL Data TX: Handle 36 flags 0x00 dlen 18                                    #51 [hci0] 21.394642
      L2CAP: Configure Response (0x05) ident 5 len 10
        Source CID: 256
        Flags: 0x0000
        Result: Success (0x0000)
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 48
> ACL Data RX: Handle 36 flags 0x02 dlen 14                                    #52 [hci0] 21.397263
      L2CAP: Configure Response (0x05) ident 5 len 6
        Source CID: 64
        Flags: 0x0000
        Result: Success (0x0000)
> HCI Event: Number of Completed Packets (0x13) plen 5                         #53 [hci0] 21.400259
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 24                                    #54 [hci0] 21.403151
      Channel: 64 len 20 [PSM 1 mode 0] {chan 0}
      SDP: Service Search Attribute Request (0x06) tid 1 len 15
        Search pattern: [len 7]
          Sequence (6) with 5 bytes [8 extra bits] len 7
            UUID (3) with 4 bytes [0 extra bits] len 5
              Headset AG (0x00001112)
        Max record count: 38
        Attribute list: [len 5]
          Sequence (6) with 3 bytes [8 extra bits] len 5
            Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
              0x0004
        Continuation state: 0
< ACL Data TX: Handle 36 flags 0x00 dlen 33                                    #55 [hci0] 21.403446
      Channel: 256 len 29 [PSM 1 mode 0] {chan 0}
      SDP: Service Search Attribute Response (0x07) tid 1 len 24
        Attribute bytes: 21
          Attribute list: [len 17] {position 0}
            Attribute: Protocol Descriptor List (0x0004) [len 2]
              Sequence (6) with 3 bytes [8 extra bits] len 5
                UUID (3) with 2 bytes [0 extra bits] len 3
                  L2CAP (0x0100)
              Sequence (6) with 5 bytes [8 extra bits] len 7
                UUID (3) with 2 bytes [0 extra bits] len 3
                  RFCOMM (0x0003)
                Unsigned Integer (1) with 1 byte [0 extra bits] len 2
                  0x0c
        Continuation state: 0
> HCI Event: Number of Completed Packets (0x13) plen 5                         #56 [hci0] 21.409222
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 12                                    #57 [hci0] 21.414570
      L2CAP: Disconnection Request (0x06) ident 6 len 4
        Destination CID: 64
        Source CID: 256
< ACL Data TX: Handle 36 flags 0x00 dlen 12                                    #58 [hci0] 21.414732
      L2CAP: Disconnection Response (0x07) ident 6 len 4
        Destination CID: 64
        Source CID: 256
> HCI Event: Number of Completed Packets (0x13) plen 5                         #59 [hci0] 21.420248
        Num handles: 1
        Handle: 36
        Count: 1
> HCI Event: Link Key Request (0x17) plen 6                                    #60 [hci0] 21.429287
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22                    #61 [hci0] 21.429367
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Link key: 107d156bca3384e8a7de75e6d02dbc72
> HCI Event: Command Complete (0x0e) plen 10                                   #62 [hci0] 21.436241
      Link Key Request Reply (0x01|0x000b) ncmd 1
        Status: Success (0x00)
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
> ACL Data RX: Handle 36 flags 0x02 dlen 12                                    #63 [hci0] 21.464751
      L2CAP: Connection Request (0x02) ident 7 len 4
        PSM: 3 (0x0003)
        Source CID: 320
< ACL Data TX: Handle 36 flags 0x00 dlen 16                                    #64 [hci0] 21.464847
      L2CAP: Connection Response (0x03) ident 7 len 8
        Destination CID: 0
        Source CID: 320
        Result: Connection refused - security block (0x0003)
        Status: No further information available (0x0000)
> HCI Event: Encryption Change (0x08) plen 4                                   #65 [hci0] 21.466224
        Status: Success (0x00)
        Handle: 36
        Encryption: Enabled with E0 (0x01)
< HCI Command: Read Encryption Key Size (0x05|0x0008) plen 2                   #66 [hci0] 21.466318
        Handle: 36
> HCI Event: Number of Completed Packets (0x13) plen 5                         #67 [hci0] 21.469216
        Num handles: 1
        Handle: 36
        Count: 1
> HCI Event: Command Complete (0x0e) plen 7                                    #68 [hci0] 21.471256
      Read Encryption Key Size (0x05|0x0008) ncmd 1
        Status: Success (0x00)
        Handle: 36
        Key size: 16
> HCI Event: Disconnect Complete (0x05) plen 4                                 #69 [hci0] 21.877431
        Status: Success (0x00)
        Handle: 36
        Reason: Remote User Terminated Connection (0x13)
@ MGMT Event: Device Disconnected (0x000c) plen 8                         {0x0002} [hci0] 21.877515
        BR/EDR Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Reason: Connection terminated by remote host (0x03)
@ MGMT Event: Device Disconnected (0x000c) plen 8                         {0x0001} [hci0] 21.877515
        BR/EDR Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Reason: Connection terminated by remote host (0x03)
> HCI Event: Connect Request (0x04) plen 10                                    #70 [hci0] 38.055238
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Class: 0x240404
          Major class: Audio/Video (headset, speaker, stereo, video, vcr)
          Minor class: Wearable Headset Device
          Rendering (Printing, Speaker)
          Audio (Speaker, Microphone, Headset)
        Link type: ACL (0x01)
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7                  #71 [hci0] 38.055328
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Role: Master (0x00)
> HCI Event: Command Status (0x0f) plen 4                                      #72 [hci0] 38.057151
      Accept Connection Request (0x01|0x0009) ncmd 1
        Status: Success (0x00)
> HCI Event: Role Change (0x12) plen 8                                         #73 [hci0] 38.219338
        Status: Success (0x00)
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Role: Master (0x00)
> HCI Event: Connect Complete (0x03) plen 11                                   #74 [hci0] 38.241260
        Status: Success (0x00)
        Handle: 36
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Link type: ACL (0x01)
        Encryption: Disabled (0x00)
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2             #75 [hci0] 38.241499
        Handle: 36
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7                    #76 [hci0] 38.242181
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Page scan repetition mode: R1 (0x01)
> HCI Event: Command Status (0x0f) plen 4                                      #77 [hci0] 38.246174
      Read Remote Supported Features (0x01|0x001b) ncmd 0
        Status: Success (0x00)
> HCI Event: Max Slots Change (0x1b) plen 3                                    #78 [hci0] 38.248182
        Handle: 36
        Max slots: 5
> ACL Data RX: Handle 36 flags 0x02 dlen 12                                    #79 [hci0] 38.249675
      L2CAP: Connection Request (0x02) ident 1 len 4
        PSM: 1 (0x0001)
        Source CID: 448
> HCI Event: Command Status (0x0f) plen 4                                      #80 [hci0] 38.263277
      NOP (0x00|0x0000) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Supported Features (0x0b) plen 11                     #81 [hci0] 38.271261
        Status: Success (0x00)
        Handle: 36
        Features: 0xff 0xff 0x8f 0xfe 0xdb 0xff 0x5b 0x87
          3 slot packets
          5 slot packets
          Encryption
          Slot offset
          Timing accuracy
          Role switch
          Hold mode
          Sniff mode
          Park state
          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
          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
          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              #82 [hci0] 38.271373
        Handle: 36
        Page: 1
> HCI Event: Command Status (0x0f) plen 4                                      #83 [hci0] 38.276219
      Read Remote Extended Features (0x01|0x001c) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Extended Features (0x23) plen 13                      #84 [hci0] 38.283222
        Status: Success (0x00)
        Handle: 36
        Page: 1/1
        Features: 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00
          Secure Simple Pairing (Host Support)
          LE Supported (Host)
< HCI Command: Remote Name Request (0x01|0x0019) plen 10                       #85 [hci0] 38.283290
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Page scan repetition mode: R2 (0x02)
        Page scan mode: Mandatory (0x00)
        Clock offset: 0x0000
< ACL Data TX: Handle 36 flags 0x00 dlen 10                                    #86 [hci0] 38.283304
      L2CAP: Information Request (0x0a) ident 1 len 2
        Type: Extended features supported (0x0002)
@ MGMT Event: Device Connected (0x000b) plen 18                           {0x0002} [hci0] 38.283315
        BR/EDR Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Flags: 0x00000000
        Data length: 5
        Class: 0x240404
          Major class: Audio/Video (headset, speaker, stereo, video, vcr)
          Minor class: Wearable Headset Device
          Rendering (Printing, Speaker)
          Audio (Speaker, Microphone, Headset)
@ MGMT Event: Device Connected (0x000b) plen 18                           {0x0001} [hci0] 38.283315
        BR/EDR Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Flags: 0x00000000
        Data length: 5
        Class: 0x240404
          Major class: Audio/Video (headset, speaker, stereo, video, vcr)
          Minor class: Wearable Headset Device
          Rendering (Printing, Speaker)
          Audio (Speaker, Microphone, Headset)
< ACL Data TX: Handle 36 flags 0x00 dlen 16                                    #87 [hci0] 38.283353
      L2CAP: Connection Response (0x03) ident 1 len 8
        Destination CID: 64
        Source CID: 448
        Result: Connection pending (0x0001)
        Status: No further information available (0x0000)
< ACL Data TX: Handle 36 flags 0x00 dlen 10                                    #88 [hci0] 38.283359
      L2CAP: Information Request (0x0a) ident 2 len 2
        Type: Extended features supported (0x0002)
> HCI Event: Number of Completed Packets (0x13) plen 5                         #89 [hci0] 38.288224
        Num handles: 1
        Handle: 36
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5                         #90 [hci0] 38.289194
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 16                                    #91 [hci0] 38.289832
      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
> HCI Event: Command Status (0x0f) plen 4                                      #92 [hci0] 38.290171
      Remote Name Request (0x01|0x0019) ncmd 1
        Status: Success (0x00)
> HCI Event: Number of Completed Packets (0x13) plen 5                         #93 [hci0] 38.291171
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 16                                    #94 [hci0] 38.291177
      L2CAP: Information Response (0x0b) ident 2 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 36 flags 0x00 dlen 10                                    #95 [hci0] 38.291203
      L2CAP: Information Request (0x0a) ident 3 len 2
        Type: Fixed channels supported (0x0003)
> HCI Event: Number of Completed Packets (0x13) plen 5                         #96 [hci0] 38.295174
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 20                                    #97 [hci0] 38.297206
      L2CAP: Information Response (0x0b) ident 3 len 12
        Type: Fixed channels supported (0x0003)
        Result: Success (0x0000)
        Channels: 0x0000000000000076
          L2CAP Signaling (BR/EDR)
          Connectionless reception
          Attribute Protocol
          L2CAP Signaling (LE)
          Security Manager (LE)
< ACL Data TX: Handle 36 flags 0x00 dlen 16                                    #98 [hci0] 38.297239
      L2CAP: Connection Response (0x03) ident 1 len 8
        Destination CID: 64
        Source CID: 448
        Result: Connection successful (0x0000)
        Status: No further information available (0x0000)
< ACL Data TX: Handle 36 flags 0x00 dlen 23                                    #99 [hci0] 38.297246
      L2CAP: Configure Request (0x04) ident 4 len 15
        Destination CID: 448
        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                        #100 [hci0] 38.301190
        Num handles: 1
        Handle: 36
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5                        #101 [hci0] 38.303242
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 16                                   #102 [hci0] 38.306841
      L2CAP: Configure Request (0x04) ident 2 len 8
        Destination CID: 64
        Flags: 0x0000
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 48
< ACL Data TX: Handle 36 flags 0x00 dlen 18                                   #103 [hci0] 38.306894
      L2CAP: Configure Response (0x05) ident 2 len 10
        Source CID: 448
        Flags: 0x0000
        Result: Success (0x0000)
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 48
> ACL Data RX: Handle 36 flags 0x02 dlen 14                                   #104 [hci0] 38.308581
      L2CAP: Configure Response (0x05) ident 4 len 6
        Source CID: 64
        Flags: 0x0000
        Result: Success (0x0000)
> ACL Data RX: Handle 36 flags 0x02 dlen 24                                   #105 [hci0] 38.315474
      Channel: 64 len 20 [PSM 1 mode 0] {chan 1}
      SDP: Service Search Attribute Request (0x06) tid 1 len 15
        Search pattern: [len 7]
          Sequence (6) with 5 bytes [8 extra bits] len 7
            UUID (3) with 4 bytes [0 extra bits] len 5
              Handsfree Audio Gateway (0x0000111f)
        Max record count: 38
        Attribute list: [len 5]
          Sequence (6) with 3 bytes [8 extra bits] len 5
            Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
              0x0004
        Continuation state: 0
< ACL Data TX: Handle 36 flags 0x00 dlen 14                                   #106 [hci0] 38.315690
      Channel: 448 len 10 [PSM 1 mode 0] {chan 1}
      SDP: Service Search Attribute Response (0x07) tid 1 len 5
        Attribute bytes: 2
        Continuation state: 0
> HCI Event: Remote Name Req Complete (0x07) plen 255                         #107 [hci0] 38.321259
        Status: Success (0x00)
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Name: MINIJAMBOX by Jawbone
> HCI Event: Number of Completed Packets (0x13) plen 5                        #108 [hci0] 38.323251
        Num handles: 1
        Handle: 36
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5                        #109 [hci0] 38.324185
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 12                                   #110 [hci0] 38.324603
      L2CAP: Disconnection Request (0x06) ident 3 len 4
        Destination CID: 64
        Source CID: 448
< ACL Data TX: Handle 36 flags 0x00 dlen 12                                   #111 [hci0] 38.324668
      L2CAP: Disconnection Response (0x07) ident 3 len 4
        Destination CID: 64
        Source CID: 448
> HCI Event: Number of Completed Packets (0x13) plen 5                        #112 [hci0] 38.331170
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 12                                   #113 [hci0] 38.337072
      L2CAP: Connection Request (0x02) ident 4 len 4
        PSM: 1 (0x0001)
        Source CID: 512
< ACL Data TX: Handle 36 flags 0x00 dlen 16                                   #114 [hci0] 38.337242
      L2CAP: Connection Response (0x03) ident 4 len 8
        Destination CID: 64
        Source CID: 512
        Result: Connection successful (0x0000)
        Status: No further information available (0x0000)
< ACL Data TX: Handle 36 flags 0x00 dlen 23                                   #115 [hci0] 38.337255
      L2CAP: Configure Request (0x04) ident 5 len 15
        Destination CID: 512
        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                        #116 [hci0] 38.344260
        Num handles: 1
        Handle: 36
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5                        #117 [hci0] 38.345226
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 16                                   #118 [hci0] 38.350804
      L2CAP: Configure Request (0x04) ident 5 len 8
        Destination CID: 64
        Flags: 0x0000
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 48
< ACL Data TX: Handle 36 flags 0x00 dlen 18                                   #119 [hci0] 38.350872
      L2CAP: Configure Response (0x05) ident 5 len 10
        Source CID: 512
        Flags: 0x0000
        Result: Success (0x0000)
        Option: Maximum Transmission Unit (0x01) [mandatory]
          MTU: 48
> ACL Data RX: Handle 36 flags 0x02 dlen 14                                   #120 [hci0] 38.353623
      L2CAP: Configure Response (0x05) ident 5 len 6
        Source CID: 64
        Flags: 0x0000
        Result: Success (0x0000)
> HCI Event: Number of Completed Packets (0x13) plen 5                        #121 [hci0] 38.356198
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 24                                   #122 [hci0] 38.359486
      Channel: 64 len 20 [PSM 1 mode 0] {chan 1}
      SDP: Service Search Attribute Request (0x06) tid 1 len 15
        Search pattern: [len 7]
          Sequence (6) with 5 bytes [8 extra bits] len 7
            UUID (3) with 4 bytes [0 extra bits] len 5
              Headset AG (0x00001112)
        Max record count: 38
        Attribute list: [len 5]
          Sequence (6) with 3 bytes [8 extra bits] len 5
            Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
              0x0004
        Continuation state: 0
< ACL Data TX: Handle 36 flags 0x00 dlen 33                                   #123 [hci0] 38.359731
      Channel: 512 len 29 [PSM 1 mode 0] {chan 1}
      SDP: Service Search Attribute Response (0x07) tid 1 len 24
        Attribute bytes: 21
          Attribute list: [len 17] {position 0}
            Attribute: Protocol Descriptor List (0x0004) [len 2]
              Sequence (6) with 3 bytes [8 extra bits] len 5
                UUID (3) with 2 bytes [0 extra bits] len 3
                  L2CAP (0x0100)
              Sequence (6) with 5 bytes [8 extra bits] len 7
                UUID (3) with 2 bytes [0 extra bits] len 3
                  RFCOMM (0x0003)
                Unsigned Integer (1) with 1 byte [0 extra bits] len 2
                  0x0c
        Continuation state: 0
> HCI Event: Number of Completed Packets (0x13) plen 5                        #124 [hci0] 38.365228
        Num handles: 1
        Handle: 36
        Count: 1
> ACL Data RX: Handle 36 flags 0x02 dlen 12                                   #125 [hci0] 38.370866
      L2CAP: Disconnection Request (0x06) ident 6 len 4
        Destination CID: 64
        Source CID: 512
< ACL Data TX: Handle 36 flags 0x00 dlen 12                                   #126 [hci0] 38.370939
      L2CAP: Disconnection Response (0x07) ident 6 len 4
        Destination CID: 64
        Source CID: 512
> HCI Event: Number of Completed Packets (0x13) plen 5                        #127 [hci0] 38.376361
        Num handles: 1
        Handle: 36
        Count: 1
> HCI Event: Link Key Request (0x17) plen 6                                   #128 [hci0] 38.385361
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22                   #129 [hci0] 38.385452
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Link key: 107d156bca3384e8a7de75e6d02dbc72
> HCI Event: Command Complete (0x0e) plen 10                                  #130 [hci0] 38.392234
      Link Key Request Reply (0x01|0x000b) ncmd 1
        Status: Success (0x00)
        Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
> ACL Data RX: Handle 36 flags 0x02 dlen 12                                   #131 [hci0] 38.421133
      L2CAP: Connection Request (0x02) ident 7 len 4
        PSM: 3 (0x0003)
        Source CID: 576
< ACL Data TX: Handle 36 flags 0x00 dlen 16                                   #132 [hci0] 38.421241
      L2CAP: Connection Response (0x03) ident 7 len 8
        Destination CID: 0
        Source CID: 576
        Result: Connection refused - security block (0x0003)
        Status: No further information available (0x0000)
> HCI Event: Encryption Change (0x08) plen 4                                  #133 [hci0] 38.422257
        Status: Success (0x00)
        Handle: 36
        Encryption: Enabled with E0 (0x01)
< HCI Command: Read Encryption Key Size (0x05|0x0008) plen 2                  #134 [hci0] 38.422324
        Handle: 36
> HCI Event: Number of Completed Packets (0x13) plen 5                        #135 [hci0] 38.425213
        Num handles: 1
        Handle: 36
        Count: 1
> HCI Event: Command Complete (0x0e) plen 7                                   #136 [hci0] 38.427267
      Read Encryption Key Size (0x05|0x0008) ncmd 1
        Status: Success (0x00)
        Handle: 36
        Key size: 16
> HCI Event: Disconnect Complete (0x05) plen 4                                #137 [hci0] 38.834248
        Status: Success (0x00)
        Handle: 36
        Reason: Remote User Terminated Connection (0x13)
@ MGMT Event: Device Disconnected (0x000c) plen 8                         {0x0002} [hci0] 38.834297
        BR/EDR Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Reason: Connection terminated by remote host (0x03)
@ MGMT Event: Device Disconnected (0x000c) plen 8                         {0x0001} [hci0] 38.834297
        BR/EDR Address: E0:D1:E6:07:62:E1 (Aliph dba Jawbone)
        Reason: Connection terminated by remote host (0x03)




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: After kernel update: connect/disconnect forever while attempting to auto-reconnect
  2019-05-18  8:53     ` Carlos Pita
@ 2019-05-18 14:08       ` Alexandre Pereira Nunes
  2019-05-18 16:30         ` Luiz Augusto von Dentz
  2019-05-18 17:05         ` Johan Hedberg
  0 siblings, 2 replies; 10+ messages in thread
From: Alexandre Pereira Nunes @ 2019-05-18 14:08 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 578 bytes --]

I've attached two btmon sessions: one captured from the text mode and
another with -w param.

Both on 5.1.2 kernel.

Em sáb, 18 de mai de 2019 às 05:53, Carlos Pita
<carlosjosepita@gmail.com> escreveu:
>
> Hi Luiz,
>
> I've attached the output for a single auto-reconnect/disconnect sequence.
>
> Notice this was using the 4.19.44 kernel, which is the LTS one in Arch
> Linux. As I've pointed out above, the problem seems like a regression,
> since it's happening both in older and latest kernels, but not
> in-between them.
>
> Best regards
> --
> Carlos

[-- Attachment #2: pqp.txt --]
[-- Type: text/plain, Size: 32431 bytes --]

Bluetooth monitor ver 5.48
= Note: Linux version 5.1.2-050102-generic (x86_64)                    0.946103
= Note: Bluetooth subsystem version 2.22                               0.946107
= New Index: C8:21:58:8E:EA:FD (Primary,USB,hci0)               [hci0] 0.946107
= Open Index: C8:21:58:8E:EA:FD                                 [hci0] 0.946108
= Index Info: C8:21:58:8E:EA:FD (Intel Corp.)                   [hci0] 0.946108
@ MGMT Open: bluetoothd (privileged) version 1.14             {0x0002} 0.946110
@ MGMT Open: bluetoothd (privileged) version 1.14             {0x0001} 0.946110
@ MGMT Open: btmon (privileged) version 1.14                  {0x0003} 0.946128
> HCI Event: Vendor (0xff) plen 2                            #1 [hci0] 5.401640
      Intel Scan Status (0x11)
        Inquiry scan: Enabled
        Page scan: Enabled
> HCI Event: Vendor (0xff) plen 2                            #2 [hci0] 5.402637
      Intel Scan Status (0x11)
        Inquiry scan: Enabled
        Page scan: Disabled
> HCI Event: Connect Request (0x04) plen 10                  #3 [hci0] 5.467599
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
        Link type: ACL (0x01)
< HCI Command: Accept Connection Req.. (0x01|0x0009) plen 7  #4 [hci0] 5.467668
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Role: Master (0x00)
> HCI Event: Command Status (0x0f) plen 4                    #5 [hci0] 5.468631
      Accept Connection Request (0x01|0x0009) ncmd 1
        Status: Success (0x00)
> HCI Event: Connect Complete (0x03) plen 11                 #6 [hci0] 5.703492
        Status: Success (0x00)
        Handle: 512
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Link type: ACL (0x01)
        Encryption: Disabled (0x00)
< HCI Command: Read Remote Supported.. (0x01|0x001b) plen 2  #7 [hci0] 5.703737
        Handle: 512
> HCI Event: Command Status (0x0f) plen 4                    #8 [hci0] 5.704439
      Read Remote Supported Features (0x01|0x001b) ncmd 1
        Status: Success (0x00)
> HCI Event: Link Supervision Timeout Changed (0x38) plen 4  #9 [hci0] 5.707467
        Handle: 512
        Timeout: 2000.000 msec (0x0c80)
> HCI Event: Read Remote Supported Features (0x0b) plen 11  #10 [hci0] 5.714448
        Status: Success (0x00)
        Handle: 512
        Features: 0xfc 0x02 0x04 0x38 0x18 0x18 0x19 0x83
          Encryption
          Slot offset
          Timing accuracy
          Role switch
          Hold mode
          Sniff mode
          Power control requests
          Power control
          Enhanced inquiry scan
          Interlaced inquiry scan
          Interlaced page scan
          AFH capable slave
          AFH classification slave
          AFH capable master
          AFH classification master
          Extended Inquiry Response
          Secure Simple Pairing
          Encapsulated PDU
          Link Supervision Timeout Changed Event
          Inquiry TX Power Level
          Extended features
< HCI Command: Read Remote Extended.. (0x01|0x001c) plen 3  #11 [hci0] 5.714535
        Handle: 512
        Page: 1
> HCI Event: Command Status (0x0f) plen 4                   #12 [hci0] 5.715445
      Read Remote Extended Features (0x01|0x001c) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Extended Features (0x23) plen 13   #13 [hci0] 5.728475
        Status: Success (0x00)
        Handle: 512
        Page: 1/0
        Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10    #14 [hci0] 5.728565
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Page scan repetition mode: R2 (0x02)
        Page scan mode: Mandatory (0x00)
        Clock offset: 0x0000
< ACL Data TX: Handle 512 flags 0x00 dlen 10                #15 [hci0] 5.728582
      L2CAP: Information Request (0x0a) ident 1 len 2
        Type: Extended features supported (0x0002)
> HCI Event: Command Status (0x0f) plen 4                   #16 [hci0] 5.729447
      Remote Name Request (0x01|0x0019) ncmd 1
        Status: Success (0x00)
> HCI Event: Number of Completed Packets (0x13) plen 5      #17 [hci0] 5.740495
        Num handles: 1
        Handle: 512
        Count: 1
> ACL Data RX: Handle 512 flags 0x02 dlen 16                #18 [hci0] 5.746576
      L2CAP: Information Response (0x0b) ident 1 len 8
        Type: Extended features supported (0x0002)
        Result: Success (0x0000)
        Features: 0x00000000
> HCI Event: Remote Name Req Complete (0x07) plen 255       #19 [hci0] 5.781389
        Status: Success (0x00)
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Name: Bluetooth Mouse
@ MGMT Event: Device Connected (0x000b) plen 35        {0x0003} [hci0] 5.781439
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 22
        Name (complete): Bluetooth Mouse
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
@ MGMT Event: Device Connected (0x000b) plen 35        {0x0002} [hci0] 5.781439
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 22
        Name (complete): Bluetooth Mouse
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
@ MGMT Event: Device Connected (0x000b) plen 35        {0x0001} [hci0] 5.781439
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 22
        Name (complete): Bluetooth Mouse
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
> HCI Event: Role Change (0x12) plen 8                      #20 [hci0] 6.058251
        Status: Success (0x00)
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Role: Master (0x00)
> ACL Data RX: Handle 512 flags 0x02 dlen 12                #21 [hci0] 6.088229
      L2CAP: Connection Request (0x02) ident 1 len 4
        PSM: 17 (0x0011)
        Source CID: 65
< ACL Data TX: Handle 512 flags 0x00 dlen 16                #22 [hci0] 6.088298
      L2CAP: Connection Response (0x03) ident 1 len 8
        Destination CID: 0
        Source CID: 65
        Result: Connection refused - security block (0x0003)
        Status: No further information available (0x0000)
> HCI Event: Number of Completed Packets (0x13) plen 5      #23 [hci0] 6.092240
        Num handles: 1
        Handle: 512
        Count: 1
> HCI Event: Disconnect Complete (0x05) plen 4              #24 [hci0] 6.295090
        Status: Success (0x00)
        Handle: 512
        Reason: Remote User Terminated Connection (0x13)
@ MGMT Event: Device Disconnected (0x000c) plen 8      {0x0003} [hci0] 6.295162
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Reason: Connection terminated by remote host (0x03)
@ MGMT Event: Device Disconnected (0x000c) plen 8      {0x0002} [hci0] 6.295162
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Reason: Connection terminated by remote host (0x03)
@ MGMT Event: Device Disconnected (0x000c) plen 8      {0x0001} [hci0] 6.295162
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Reason: Connection terminated by remote host (0x03)
> HCI Event: Vendor (0xff) plen 2                           #25 [hci0] 6.309063
      Intel Scan Status (0x11)
        Inquiry scan: Enabled
        Page scan: Enabled
> HCI Event: Vendor (0xff) plen 2                           #26 [hci0] 6.310059
      Intel Scan Status (0x11)
        Inquiry scan: Enabled
        Page scan: Disabled
> HCI Event: Connect Request (0x04) plen 10                 #27 [hci0] 6.402019
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
        Link type: ACL (0x01)
< HCI Command: Accept Connection Re.. (0x01|0x0009) plen 7  #28 [hci0] 6.402116
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Role: Master (0x00)
> HCI Event: Command Status (0x0f) plen 4                   #29 [hci0] 6.403001
      Accept Connection Request (0x01|0x0009) ncmd 1
        Status: Success (0x00)
> HCI Event: Role Change (0x12) plen 8                      #30 [hci0] 6.548918
        Status: Success (0x00)
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Role: Master (0x00)
> HCI Event: Connect Complete (0x03) plen 11                #31 [hci0] 6.721817
        Status: Success (0x00)
        Handle: 512
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Link type: ACL (0x01)
        Encryption: Disabled (0x00)
< HCI Command: Read Remote Supporte.. (0x01|0x001b) plen 2  #32 [hci0] 6.722057
        Handle: 512
> HCI Event: Command Status (0x0f) plen 4                   #33 [hci0] 6.722805
      Read Remote Supported Features (0x01|0x001b) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Supported Features (0x0b) plen 11  #34 [hci0] 6.761840
        Status: Success (0x00)
        Handle: 512
        Features: 0xfc 0x02 0x04 0x38 0x18 0x18 0x19 0x83
          Encryption
          Slot offset
          Timing accuracy
          Role switch
          Hold mode
          Sniff mode
          Power control requests
          Power control
          Enhanced inquiry scan
          Interlaced inquiry scan
          Interlaced page scan
          AFH capable slave
          AFH classification slave
          AFH capable master
          AFH classification master
          Extended Inquiry Response
          Secure Simple Pairing
          Encapsulated PDU
          Link Supervision Timeout Changed Event
          Inquiry TX Power Level
          Extended features
< HCI Command: Read Remote Extended.. (0x01|0x001c) plen 3  #35 [hci0] 6.761937
        Handle: 512
        Page: 1
> ACL Data RX: Handle 512 flags 0x02 dlen 12                #36 [hci0] 6.762809
      L2CAP: Connection Request (0x02) ident 1 len 4
        PSM: 17 (0x0011)
        Source CID: 65
> HCI Event: Command Status (0x0f) plen 4                   #37 [hci0] 6.763774
      Read Remote Extended Features (0x01|0x001c) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Extended Features (0x23) plen 13   #38 [hci0] 6.773780
        Status: Success (0x00)
        Handle: 512
        Page: 1/0
        Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10    #39 [hci0] 6.773883
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Page scan repetition mode: R2 (0x02)
        Page scan mode: Mandatory (0x00)
        Clock offset: 0x0000
< ACL Data TX: Handle 512 flags 0x00 dlen 10                #40 [hci0] 6.773899
      L2CAP: Information Request (0x0a) ident 1 len 2
        Type: Extended features supported (0x0002)
@ MGMT Event: Device Connected (0x000b) plen 18        {0x0003} [hci0] 6.773912
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 5
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
@ MGMT Event: Device Connected (0x000b) plen 18        {0x0002} [hci0] 6.773912
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 5
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
@ MGMT Event: Device Connected (0x000b) plen 18        {0x0001} [hci0] 6.773912
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 5
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
< ACL Data TX: Handle 512 flags 0x00 dlen 16                #41 [hci0] 6.773947
      L2CAP: Connection Response (0x03) ident 1 len 8
        Destination CID: 0
        Source CID: 65
        Result: Connection refused - security block (0x0003)
        Status: No further information available (0x0000)
> HCI Event: Command Status (0x0f) plen 4                   #42 [hci0] 6.774774
      Remote Name Request (0x01|0x0019) ncmd 1
        Status: Success (0x00)
> HCI Event: Number of Completed Packets (0x13) plen 5      #43 [hci0] 6.778791
        Num handles: 1
        Handle: 512
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5      #44 [hci0] 6.780810
        Num handles: 1
        Handle: 512
        Count: 1
> ACL Data RX: Handle 512 flags 0x02 dlen 16                #45 [hci0] 6.784043
      L2CAP: Information Response (0x0b) ident 1 len 8
        Type: Extended features supported (0x0002)
        Result: Success (0x0000)
        Features: 0x00000000
> HCI Event: Remote Name Req Complete (0x07) plen 255       #46 [hci0] 6.817780
        Status: Success (0x00)
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Name: Bluetooth Mouse
> HCI Event: Disconnect Complete (0x05) plen 4              #47 [hci0] 6.959663
        Status: Success (0x00)
        Handle: 512
        Reason: Remote User Terminated Connection (0x13)
@ MGMT Event: Device Disconnected (0x000c) plen 8      {0x0003} [hci0] 6.959714
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Reason: Connection terminated by remote host (0x03)
@ MGMT Event: Device Disconnected (0x000c) plen 8      {0x0002} [hci0] 6.959714
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Reason: Connection terminated by remote host (0x03)
@ MGMT Event: Device Disconnected (0x000c) plen 8      {0x0001} [hci0] 6.959714
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Reason: Connection terminated by remote host (0x03)
> HCI Event: Vendor (0xff) plen 2                           #48 [hci0] 8.827547
      Intel Scan Status (0x11)
        Inquiry scan: Enabled
        Page scan: Enabled
> HCI Event: Vendor (0xff) plen 2                           #49 [hci0] 8.828553
      Intel Scan Status (0x11)
        Inquiry scan: Enabled
        Page scan: Disabled
> HCI Event: Connect Request (0x04) plen 10                 #50 [hci0] 8.872543
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
        Link type: ACL (0x01)
< HCI Command: Accept Connection Re.. (0x01|0x0009) plen 7  #51 [hci0] 8.872651
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Role: Master (0x00)
> HCI Event: Command Status (0x0f) plen 4                   #52 [hci0] 8.873528
      Accept Connection Request (0x01|0x0009) ncmd 1
        Status: Success (0x00)
> HCI Event: Role Change (0x12) plen 8                      #53 [hci0] 9.017440
        Status: Success (0x00)
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Role: Master (0x00)
> HCI Event: Connect Complete (0x03) plen 11                #54 [hci0] 9.187346
        Status: Success (0x00)
        Handle: 512
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Link type: ACL (0x01)
        Encryption: Disabled (0x00)
< HCI Command: Read Remote Supporte.. (0x01|0x001b) plen 2  #55 [hci0] 9.187549
        Handle: 512
> HCI Event: Command Status (0x0f) plen 4                   #56 [hci0] 9.188293
      Read Remote Supported Features (0x01|0x001b) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Supported Features (0x0b) plen 11  #57 [hci0] 9.233326
        Status: Success (0x00)
        Handle: 512
        Features: 0xfc 0x02 0x04 0x38 0x18 0x18 0x19 0x83
          Encryption
          Slot offset
          Timing accuracy
          Role switch
          Hold mode
          Sniff mode
          Power control requests
          Power control
          Enhanced inquiry scan
          Interlaced inquiry scan
          Interlaced page scan
          AFH capable slave
          AFH classification slave
          AFH capable master
          AFH classification master
          Extended Inquiry Response
          Secure Simple Pairing
          Encapsulated PDU
          Link Supervision Timeout Changed Event
          Inquiry TX Power Level
          Extended features
< HCI Command: Read Remote Extended.. (0x01|0x001c) plen 3  #58 [hci0] 9.233423
        Handle: 512
        Page: 1
> HCI Event: Command Status (0x0f) plen 4                   #59 [hci0] 9.234319
      Read Remote Extended Features (0x01|0x001c) ncmd 1
        Status: Success (0x00)
> ACL Data RX: Handle 512 flags 0x02 dlen 12                #60 [hci0] 9.235051
      L2CAP: Connection Request (0x02) ident 1 len 4
        PSM: 17 (0x0011)
        Source CID: 65
> HCI Event: Read Remote Extended Features (0x23) plen 13   #61 [hci0] 9.242314
        Status: Success (0x00)
        Handle: 512
        Page: 1/0
        Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10    #62 [hci0] 9.242419
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Page scan repetition mode: R2 (0x02)
        Page scan mode: Mandatory (0x00)
        Clock offset: 0x0000
< ACL Data TX: Handle 512 flags 0x00 dlen 10                #63 [hci0] 9.242435
      L2CAP: Information Request (0x0a) ident 1 len 2
        Type: Extended features supported (0x0002)
@ MGMT Event: Device Connected (0x000b) plen 18        {0x0003} [hci0] 9.242445
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 5
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
@ MGMT Event: Device Connected (0x000b) plen 18        {0x0002} [hci0] 9.242445
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 5
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
@ MGMT Event: Device Connected (0x000b) plen 18        {0x0001} [hci0] 9.242445
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 5
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
< ACL Data TX: Handle 512 flags 0x00 dlen 16                #64 [hci0] 9.242475
      L2CAP: Connection Response (0x03) ident 1 len 8
        Destination CID: 0
        Source CID: 65
        Result: Connection refused - security block (0x0003)
        Status: No further information available (0x0000)
> HCI Event: Command Status (0x0f) plen 4                   #65 [hci0] 9.243270
      Remote Name Request (0x01|0x0019) ncmd 1
        Status: Success (0x00)
> HCI Event: Number of Completed Packets (0x13) plen 5      #66 [hci0] 9.247321
        Num handles: 1
        Handle: 512
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5      #67 [hci0] 9.249305
        Num handles: 1
        Handle: 512
        Count: 1
> ACL Data RX: Handle 512 flags 0x02 dlen 16                #68 [hci0] 9.253774
      L2CAP: Information Response (0x0b) ident 1 len 8
        Type: Extended features supported (0x0002)
        Result: Success (0x0000)
        Features: 0x00000000
> HCI Event: Remote Name Req Complete (0x07) plen 255       #69 [hci0] 9.286245
        Status: Success (0x00)
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Name: Bluetooth Mouse
> HCI Event: Disconnect Complete (0x05) plen 4              #70 [hci0] 9.430207
        Status: Success (0x00)
        Handle: 512
        Reason: Remote User Terminated Connection (0x13)
@ MGMT Event: Device Disconnected (0x000c) plen 8      {0x0003} [hci0] 9.430248
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Reason: Connection terminated by remote host (0x03)
@ MGMT Event: Device Disconnected (0x000c) plen 8      {0x0002} [hci0] 9.430248
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Reason: Connection terminated by remote host (0x03)
@ MGMT Event: Device Disconnected (0x000c) plen 8      {0x0001} [hci0] 9.430248
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Reason: Connection terminated by remote host (0x03)
> HCI Event: Vendor (0xff) plen 2                           #71 [hci0] 9.544090
      Intel Scan Status (0x11)
        Inquiry scan: Enabled
        Page scan: Enabled
> HCI Event: Vendor (0xff) plen 2                           #72 [hci0] 9.545115
      Intel Scan Status (0x11)
        Inquiry scan: Enabled
        Page scan: Disabled
> HCI Event: Connect Request (0x04) plen 10                 #73 [hci0] 9.590107
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
        Link type: ACL (0x01)
< HCI Command: Accept Connection Re.. (0x01|0x0009) plen 7  #74 [hci0] 9.590204
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Role: Master (0x00)
> HCI Event: Command Status (0x0f) plen 4                   #75 [hci0] 9.591103
      Accept Connection Request (0x01|0x0009) ncmd 1
        Status: Success (0x00)
> HCI Event: Role Change (0x12) plen 8                      #76 [hci0] 9.734978
        Status: Success (0x00)
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Role: Master (0x00)
> HCI Event: Connect Complete (0x03) plen 11                #77 [hci0] 9.904878
        Status: Success (0x00)
        Handle: 512
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Link type: ACL (0x01)
        Encryption: Disabled (0x00)
< HCI Command: Read Remote Supporte.. (0x01|0x001b) plen 2  #78 [hci0] 9.905076
        Handle: 512
> HCI Event: Command Status (0x0f) plen 4                   #79 [hci0] 9.905866
      Read Remote Supported Features (0x01|0x001b) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Supported Features (0x0b) plen 11  #80 [hci0] 9.934920
        Status: Success (0x00)
        Handle: 512
        Features: 0xfc 0x02 0x04 0x38 0x18 0x18 0x19 0x83
          Encryption
          Slot offset
          Timing accuracy
          Role switch
          Hold mode
          Sniff mode
          Power control requests
          Power control
          Enhanced inquiry scan
          Interlaced inquiry scan
          Interlaced page scan
          AFH capable slave
          AFH classification slave
          AFH capable master
          AFH classification master
          Extended Inquiry Response
          Secure Simple Pairing
          Encapsulated PDU
          Link Supervision Timeout Changed Event
          Inquiry TX Power Level
          Extended features
< HCI Command: Read Remote Extended.. (0x01|0x001c) plen 3  #81 [hci0] 9.935007
        Handle: 512
        Page: 1
> HCI Event: Command Status (0x0f) plen 4                   #82 [hci0] 9.935881
      Read Remote Extended Features (0x01|0x001c) ncmd 1
        Status: Success (0x00)
> ACL Data RX: Handle 512 flags 0x02 dlen 12                #83 [hci0] 9.949622
      L2CAP: Connection Request (0x02) ident 1 len 4
        PSM: 17 (0x0011)
        Source CID: 65
> HCI Event: Read Remote Extended Features (0x23) plen 13   #84 [hci0] 9.952867
        Status: Success (0x00)
        Handle: 512
        Page: 1/0
        Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10    #85 [hci0] 9.952932
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Page scan repetition mode: R2 (0x02)
        Page scan mode: Mandatory (0x00)
        Clock offset: 0x0000
< ACL Data TX: Handle 512 flags 0x00 dlen 10                #86 [hci0] 9.952951
      L2CAP: Information Request (0x0a) ident 1 len 2
        Type: Extended features supported (0x0002)
@ MGMT Event: Device Connected (0x000b) plen 18        {0x0003} [hci0] 9.952960
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 5
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
@ MGMT Event: Device Connected (0x000b) plen 18        {0x0002} [hci0] 9.952960
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 5
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
@ MGMT Event: Device Connected (0x000b) plen 18        {0x0001} [hci0] 9.952960
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 5
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
< ACL Data TX: Handle 512 flags 0x00 dlen 16                #87 [hci0] 9.952984
      L2CAP: Connection Response (0x03) ident 1 len 8
        Destination CID: 0
        Source CID: 65
        Result: Connection refused - security block (0x0003)
        Status: No further information available (0x0000)
> HCI Event: Command Status (0x0f) plen 4                   #88 [hci0] 9.953842
      Remote Name Request (0x01|0x0019) ncmd 1
        Status: Success (0x00)
> HCI Event: Number of Completed Packets (0x13) plen 5      #89 [hci0] 9.955842
        Num handles: 1
        Handle: 512
        Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5      #90 [hci0] 9.958882
        Num handles: 1
        Handle: 512
        Count: 1
> ACL Data RX: Handle 512 flags 0x02 dlen 16                #91 [hci0] 9.965917
      L2CAP: Information Response (0x0b) ident 1 len 8
        Type: Extended features supported (0x0002)
        Result: Success (0x0000)
        Features: 0x00000000
> HCI Event: Remote Name Req Complete (0x07) plen 255       #92 [hci0] 9.997858
        Status: Success (0x00)
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Name: Bluetooth Mouse
> HCI Event: Disconnect Complete (0x05) plen 4             #93 [hci0] 10.142773
        Status: Success (0x00)
        Handle: 512
        Reason: Remote User Terminated Connection (0x13)
@ MGMT Event: Device Disconnected (0x000c) plen 8     {0x0003} [hci0] 10.142829
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Reason: Connection terminated by remote host (0x03)
@ MGMT Event: Device Disconnected (0x000c) plen 8     {0x0002} [hci0] 10.142829
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Reason: Connection terminated by remote host (0x03)
@ MGMT Event: Device Disconnected (0x000c) plen 8     {0x0001} [hci0] 10.142829
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Reason: Connection terminated by remote host (0x03)
> HCI Event: Vendor (0xff) plen 2                          #94 [hci0] 10.836313
      Intel Scan Status (0x11)
        Inquiry scan: Enabled
        Page scan: Enabled
> HCI Event: Vendor (0xff) plen 2                          #95 [hci0] 10.837314
      Intel Scan Status (0x11)
        Inquiry scan: Enabled
        Page scan: Disabled
> HCI Event: Connect Request (0x04) plen 10                #96 [hci0] 10.891294
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
        Link type: ACL (0x01)
< HCI Command: Accept Connection R.. (0x01|0x0009) plen 7  #97 [hci0] 10.891402
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Role: Master (0x00)
> HCI Event: Command Status (0x0f) plen 4                  #98 [hci0] 10.892280
      Accept Connection Request (0x01|0x0009) ncmd 1
        Status: Success (0x00)
> HCI Event: Role Change (0x12) plen 8                     #99 [hci0] 11.039224
        Status: Success (0x00)
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Role: Master (0x00)
> HCI Event: Connect Complete (0x03) plen 11              #100 [hci0] 11.207132
        Status: Success (0x00)
        Handle: 512
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Link type: ACL (0x01)
        Encryption: Disabled (0x00)
< HCI Command: Read Remote Suppor.. (0x01|0x001b) plen 2  #101 [hci0] 11.207333
        Handle: 512
> HCI Event: Command Status (0x0f) plen 4                 #102 [hci0] 11.208090
      Read Remote Supported Features (0x01|0x001b) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Supported Feat.. (0x0b) plen 11  #103 [hci0] 11.247138
        Status: Success (0x00)
        Handle: 512
        Features: 0xfc 0x02 0x04 0x38 0x18 0x18 0x19 0x83
          Encryption
          Slot offset
          Timing accuracy
          Role switch
          Hold mode
          Sniff mode
          Power control requests
          Power control
          Enhanced inquiry scan
          Interlaced inquiry scan
          Interlaced page scan
          AFH capable slave
          AFH classification slave
          AFH capable master
          AFH classification master
          Extended Inquiry Response
          Secure Simple Pairing
          Encapsulated PDU
          Link Supervision Timeout Changed Event
          Inquiry TX Power Level
          Extended features
< HCI Command: Read Remote Extend.. (0x01|0x001c) plen 3  #104 [hci0] 11.247209
        Handle: 512
        Page: 1
> HCI Event: Command Status (0x0f) plen 4                 #105 [hci0] 11.248125
      Read Remote Extended Features (0x01|0x001c) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Extended Featu.. (0x23) plen 13  #106 [hci0] 11.259113
        Status: Success (0x00)
        Handle: 512
        Page: 1/0
        Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10  #107 [hci0] 11.259197
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Page scan repetition mode: R2 (0x02)
        Page scan mode: Mandatory (0x00)
        Clock offset: 0x0000
< ACL Data TX: Handle 512 flags 0x00 dlen 10              #108 [hci0] 11.259211
      L2CAP: Information Request (0x0a) ident 1 len 2
        Type: Extended features supported (0x0002)
> HCI Event: Command Status (0x0f) plen 4                 #109 [hci0] 11.260107
      Remote Name Request (0x01|0x0019) ncmd 1
        Status: Success (0x00)
> HCI Event: Number of Completed Packets (0x13) plen 5    #110 [hci0] 11.265102
        Num handles: 1
        Handle: 512
        Count: 1
> ACL Data RX: Handle 512 flags 0x02 dlen 16              #111 [hci0] 11.270090
      L2CAP: Information Response (0x0b) ident 1 len 8
        Type: Extended features supported (0x0002)
        Result: Success (0x0000)
        Features: 0x00000000
> HCI Event: Remote Name Req Complete (0x07) plen 255     #112 [hci0] 11.303068
        Status: Success (0x00)
        Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Name: Bluetooth Mouse
@ MGMT Event: Device Connected (0x000b) plen 35       {0x0003} [hci0] 11.303133
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 22
        Name (complete): Bluetooth Mouse
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
@ MGMT Event: Device Connected (0x000b) plen 35       {0x0002} [hci0] 11.303133
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 22
        Name (complete): Bluetooth Mouse
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode
@ MGMT Event: Device Connected (0x000b) plen 35       {0x0001} [hci0] 11.303133
        BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
        Flags: 0x00000000
        Data length: 22
        Name (complete): Bluetooth Mouse
        Class: 0x002580
          Major class: Peripheral (mouse, joystick, keyboards)
          Minor class: 0x20
          Limited Discoverable Mode

[-- Attachment #3: pqp.trace --]
[-- Type: application/octet-stream, Size: 5536 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: After kernel update: connect/disconnect forever while attempting to auto-reconnect
  2019-05-18 14:08       ` Alexandre Pereira Nunes
@ 2019-05-18 16:30         ` Luiz Augusto von Dentz
  2019-05-18 18:08           ` Johan Hedberg
  2019-05-18 17:05         ` Johan Hedberg
  1 sibling, 1 reply; 10+ messages in thread
From: Luiz Augusto von Dentz @ 2019-05-18 16:30 UTC (permalink / raw)
  To: Alexandre Pereira Nunes; +Cc: linux-bluetooth

Hi Alexandre,

On Sat, May 18, 2019 at 7:13 PM Alexandre Pereira Nunes
<alexandre.nunes@gmail.com> wrote:
>
> I've attached two btmon sessions: one captured from the text mode and
> another with -w param.
>
> Both on 5.1.2 kernel.

The problem seems to be here:

< ACL Data TX: Handle 512 flags 0x00 dlen 16                #87 [hci0] 9.952984
      L2CAP: Connection Response (0x03) ident 1 len 8
        Destination CID: 0
        Source CID: 65
        Result: Connection refused - security block (0x0003)
        Status: No further information available (0x0000)

Ruling out encryption since HID don't require it:

https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/profiles/input/server.c#n294

Are you seeing any of the following logs on the journal:

https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/profiles/input/server.c#n181

> Em sáb, 18 de mai de 2019 às 05:53, Carlos Pita
> <carlosjosepita@gmail.com> escreveu:
> >
> > Hi Luiz,
> >
> > I've attached the output for a single auto-reconnect/disconnect sequence.
> >
> > Notice this was using the 4.19.44 kernel, which is the LTS one in Arch
> > Linux. As I've pointed out above, the problem seems like a regression,
> > since it's happening both in older and latest kernels, but not
> > in-between them.
> >
> > Best regards
> > --
> > Carlos



-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: After kernel update: connect/disconnect forever while attempting to auto-reconnect
  2019-05-18 14:08       ` Alexandre Pereira Nunes
  2019-05-18 16:30         ` Luiz Augusto von Dentz
@ 2019-05-18 17:05         ` Johan Hedberg
  2019-05-18 17:09           ` Johan Hedberg
  1 sibling, 1 reply; 10+ messages in thread
From: Johan Hedberg @ 2019-05-18 17:05 UTC (permalink / raw)
  To: Alexandre Pereira Nunes; +Cc: linux-bluetooth

Hi,

The HCI log below seems to indicate an issue with the mouse:

On Sat, May 18, 2019, Alexandre Pereira Nunes wrote:
> > HCI Event: Connect Complete (0x03) plen 11                 #6 [hci0] 5.703492
>         Status: Success (0x00)
>         Handle: 512
>         Address: 20:14:12:09:18:BD (OUI 20-14-12)
>         Link type: ACL (0x01)
>         Encryption: Disabled (0x00)
> < HCI Command: Read Remote Supported.. (0x01|0x001b) plen 2  #7 [hci0] 5.703737
>         Handle: 512
> > HCI Event: Command Status (0x0f) plen 4                    #8 [hci0] 5.704439
>       Read Remote Supported Features (0x01|0x001b) ncmd 1
>         Status: Success (0x00)
> > HCI Event: Link Supervision Timeout Changed (0x38) plen 4  #9 [hci0] 5.707467
>         Handle: 512
>         Timeout: 2000.000 msec (0x0c80)
> > HCI Event: Read Remote Supported Features (0x0b) plen 11  #10 [hci0] 5.714448
>         Status: Success (0x00)
>         Handle: 512
>         Features: 0xfc 0x02 0x04 0x38 0x18 0x18 0x19 0x83
>           Encryption
>           Slot offset
>           Timing accuracy
>           Role switch
>           Hold mode
>           Sniff mode
>           Power control requests
>           Power control
>           Enhanced inquiry scan
>           Interlaced inquiry scan
>           Interlaced page scan
>           AFH capable slave
>           AFH classification slave
>           AFH capable master
>           AFH classification master
>           Extended Inquiry Response
>           Secure Simple Pairing
>           Encapsulated PDU
>           Link Supervision Timeout Changed Event
>           Inquiry TX Power Level
>           Extended features
> < HCI Command: Read Remote Extended.. (0x01|0x001c) plen 3  #11 [hci0] 5.714535
>         Handle: 512
>         Page: 1
> > HCI Event: Command Status (0x0f) plen 4                   #12 [hci0] 5.715445
>       Read Remote Extended Features (0x01|0x001c) ncmd 1
>         Status: Success (0x00)
> > HCI Event: Read Remote Extended Features (0x23) plen 13   #13 [hci0] 5.728475
>         Status: Success (0x00)
>         Handle: 512
>         Page: 1/0
>         Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> < HCI Command: Remote Name Request (0x01|0x0019) plen 10    #14 [hci0] 5.728565
>         Address: 20:14:12:09:18:BD (OUI 20-14-12)
>         Page scan repetition mode: R2 (0x02)
>         Page scan mode: Mandatory (0x00)
>         Clock offset: 0x0000
> < ACL Data TX: Handle 512 flags 0x00 dlen 10                #15 [hci0] 5.728582
>       L2CAP: Information Request (0x0a) ident 1 len 2
>         Type: Extended features supported (0x0002)
> > HCI Event: Command Status (0x0f) plen 4                   #16 [hci0] 5.729447
>       Remote Name Request (0x01|0x0019) ncmd 1
>         Status: Success (0x00)
> > HCI Event: Number of Completed Packets (0x13) plen 5      #17 [hci0] 5.740495
>         Num handles: 1
>         Handle: 512
>         Count: 1
> > ACL Data RX: Handle 512 flags 0x02 dlen 16                #18 [hci0] 5.746576
>       L2CAP: Information Response (0x0b) ident 1 len 8
>         Type: Extended features supported (0x0002)
>         Result: Success (0x0000)
>         Features: 0x00000000
> > HCI Event: Remote Name Req Complete (0x07) plen 255       #19 [hci0] 5.781389
>         Status: Success (0x00)
>         Address: 20:14:12:09:18:BD (OUI 20-14-12)
>         Name: Bluetooth Mouse
> @ MGMT Event: Device Connected (0x000b) plen 35        {0x0001} [hci0] 5.781439
>         BR/EDR Address: 20:14:12:09:18:BD (OUI 20-14-12)
>         Flags: 0x00000000
>         Data length: 22
>         Name (complete): Bluetooth Mouse
>         Class: 0x002580
>           Major class: Peripheral (mouse, joystick, keyboards)
>           Minor class: 0x20
>           Limited Discoverable Mode
> > HCI Event: Role Change (0x12) plen 8                      #20 [hci0] 6.058251
>         Status: Success (0x00)
>         Address: 20:14:12:09:18:BD (OUI 20-14-12)
>         Role: Master (0x00)
> > ACL Data RX: Handle 512 flags 0x02 dlen 12                #21 [hci0] 6.088229
>       L2CAP: Connection Request (0x02) ident 1 len 4
>         PSM: 17 (0x0011)
>         Source CID: 65
> < ACL Data TX: Handle 512 flags 0x00 dlen 16                #22 [hci0] 6.088298
>       L2CAP: Connection Response (0x03) ident 1 len 8
>         Destination CID: 0
>         Source CID: 65
>         Result: Connection refused - security block (0x0003)
>         Status: No further information available (0x0000)

From the above it looks like the mouse is initiating an L2CAP Connection
Request to a non-SDP PSM (17 in this case), which is prohibited by the
spec whenever both sides support Secure Simple Pairing (SSP), and the
kernel is correctly responding with a security block error. So to me the
above looks like misbehavior by the mouse. Could you also post the same
log using a kernel that's working for you?

Johan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: After kernel update: connect/disconnect forever while attempting to auto-reconnect
  2019-05-18 17:05         ` Johan Hedberg
@ 2019-05-18 17:09           ` Johan Hedberg
  0 siblings, 0 replies; 10+ messages in thread
From: Johan Hedberg @ 2019-05-18 17:09 UTC (permalink / raw)
  To: Alexandre Pereira Nunes; +Cc: linux-bluetooth

Slight clarification to my earlier mail:

On 18 May 2019, at 20.05, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> From the above it looks like the mouse is initiating an L2CAP Connection
> Request to a non-SDP PSM (17 in this case), which is prohibited by the
> spec whenever both sides support Secure Simple Pairing (SSP)

.. *before encryption is enabled*. As can be seen from the log the connection starts unencrypted and does not get encrypted by the time of the L2CAP Connection Request.

Johan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: After kernel update: connect/disconnect forever while attempting to auto-reconnect
  2019-05-18 16:30         ` Luiz Augusto von Dentz
@ 2019-05-18 18:08           ` Johan Hedberg
  2019-05-19  8:39             ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 10+ messages in thread
From: Johan Hedberg @ 2019-05-18 18:08 UTC (permalink / raw)
  To: Luiz Von Dentz; +Cc: Alexandre Pereira Nunes, linux-bluetooth

Hi Luiz,

On 18 May 2019, at 19.30, Luiz Augusto von Dentz <luiz.dentz@gmail.com> wrote:
> The problem seems to be here:
> 
> < ACL Data TX: Handle 512 flags 0x00 dlen 16                #87 [hci0] 9.952984
>      L2CAP: Connection Response (0x03) ident 1 len 8
>        Destination CID: 0
>        Source CID: 65
>        Result: Connection refused - security block (0x0003)
>        Status: No further information available (0x0000)
> 
> Ruling out encryption since HID don't require it:

When both devices support SSP, encryption is required for any non-SDP PSM. The kernel enforces this regardless of what kind of options were set for the socket.

Johan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: After kernel update: connect/disconnect forever while attempting to auto-reconnect
  2019-05-18 18:08           ` Johan Hedberg
@ 2019-05-19  8:39             ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 10+ messages in thread
From: Luiz Augusto von Dentz @ 2019-05-19  8:39 UTC (permalink / raw)
  To: Johan Hedberg; +Cc: Alexandre Pereira Nunes, linux-bluetooth, Marcel Holtmann

Hi Johan,

+Marcel

On Sat, May 18, 2019 at 9:08 PM Johan Hedberg <johan.hedberg@gmail.com> wrote:
>
> Hi Luiz,
>
> On 18 May 2019, at 19.30, Luiz Augusto von Dentz <luiz.dentz@gmail.com> wrote:
> > The problem seems to be here:
> >
> > < ACL Data TX: Handle 512 flags 0x00 dlen 16                #87 [hci0] 9.952984
> >      L2CAP: Connection Response (0x03) ident 1 len 8
> >        Destination CID: 0
> >        Source CID: 65
> >        Result: Connection refused - security block (0x0003)
> >        Status: No further information available (0x0000)
> >
> > Ruling out encryption since HID don't require it:
>
> When both devices support SSP, encryption is required for any non-SDP PSM. The kernel enforces this regardless of what kind of options were set for the socket.

Perhaps it could be this one:

https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/net/bluetooth/hci_conn.c?id=d5bb334a8e171b262e48f378bd2096c0ea458265

It looks like the test you mentioned it is just above the check for
enc_key_size, though people mentioned it has been working so could it
be that SSP is not enabled after all?

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-05-19 17:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-17  5:59 After kernel update: connect/disconnect forever while attempting to auto-reconnect Carlos Pita
2019-05-17 21:39 ` Alexandre Pereira Nunes
2019-05-18  5:33   ` Luiz Augusto von Dentz
2019-05-18  8:53     ` Carlos Pita
2019-05-18 14:08       ` Alexandre Pereira Nunes
2019-05-18 16:30         ` Luiz Augusto von Dentz
2019-05-18 18:08           ` Johan Hedberg
2019-05-19  8:39             ` Luiz Augusto von Dentz
2019-05-18 17:05         ` Johan Hedberg
2019-05-18 17:09           ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).