linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Alexandre Pereira Nunes <alexandre.nunes@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: After kernel update: connect/disconnect forever while attempting to auto-reconnect
Date: Sat, 18 May 2019 20:05:57 +0300	[thread overview]
Message-ID: <20190518170557.GA79055@canella-mobl.ger.corp.intel.com> (raw)
In-Reply-To: <CANxMttCqEYDZOwTriLqC-q39+JhEJ9KCOsPhRqkjZwE1h-64Gg@mail.gmail.com>

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

  parent reply	other threads:[~2019-05-18 17:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-05-18 17:09           ` Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190518170557.GA79055@canella-mobl.ger.corp.intel.com \
    --to=johan.hedberg@gmail.com \
    --cc=alexandre.nunes@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).