All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cameron Gutman <aicommander@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Anthony Bourguignon <contact@toniob.net>
Cc: "linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	Vinicius Costa Gomes <vinicius.gomes@intel.com>
Subject: Re: Continuing the Xbox One Bluetooth controller debugging
Date: Wed, 30 Nov 2016 21:01:59 -0800	[thread overview]
Message-ID: <1480568519.2010.3.camel@gmail.com> (raw)
In-Reply-To: <CABBYNZ+cfdym=m+Xn2kT_E74Vq81XTKB5mzv_JOWa7vvcHXVrg@mail.gmail.com>

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

On Wed, 2016-11-30 at 16:54 +0200, Luiz Augusto von Dentz wrote:
> Hi,
> 
> On Wed, Nov 30, 2016 at 11:42 AM, Anthony Bourguignon
> <contact@toniob.net> wrote:
> > Le mardi 29 novembre 2016 à 20:51 -0800, Cameron Gutman a écrit :
> > > Hi,
> > > 
> > > I'm interesting in continuing the debugging of the Xbox One S
> > > controller's issues with the BlueZ stack (original report [0]).
> > > I confirmed the issue still affects v4.9-rc7. I've also tried
> > > Vinicius's patch from [1] applied on v4.9-rc7 without success.
> > > 
> > > The controller is updated with the latest firmware and connects
> > > reliably to (at least) macOS Sierra, Windows 10 14393, Android
> > > 6.0.1, 7.0, and 7.1.1 (including devices using 3.10 and 3.18
> > > based kernels).
> > > 
> > > I'm happy to collect logs, test other patches, etc.
> > 
> > Steam has made a patch referencing the xbox one S controller :
> > https://github.com/ValveSoftware/steamlink-sdk/commit/d6afa93787217
> > 033a0f0f5db5f557b252c36260e#diff-
> > 45ba5a41f43606276c9bf9018eed43c2
> > 
> > You should check this.
> 
> That is a big hammer, instead I was thinking in just ignoring the
> Unknown option since basic mode is default, so please check with the
> following patch.
> 

No dice. I think ignoring it won't work because it's the controller
itself initiating the disconnect. Attached an hcidump log with the
patch applied and another with disable_ertm set to 1.

[-- Attachment #2: hcidump-patch2.txt --]
[-- Type: text/plain, Size: 4827 bytes --]

HCI sniffer - Bluetooth packet analyzer ver 5.43
device: hci0 snap_len: 1500 filter: 0xffffffffffffffff
> HCI Event: Vendor (0xff) plen 2
> HCI Event: Vendor (0xff) plen 2
> HCI Event: Connect Request (0x04) plen 10
    bdaddr C8:3F:26:0D:A4:57 class 0x000508 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr C8:3F:26:0D:A4:57 role 0x00
    Role: Master
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Role Change (0x12) plen 8
    status 0x00 bdaddr C8:3F:26:0D:A4:57 role 0x00
    Role: Master
> HCI Event: Vendor (0xff) plen 4
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 256 bdaddr C8:3F:26:0D:A4:57 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 256
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 256 slots 5
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 256
    Features: 0xbf 0x3e 0x8d 0xfe 0xdb 0xfd 0x7b 0x87
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
    handle 256 page 1
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
    bdaddr C8:3F:26:0D:A4:57
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
    bdaddr C8:3F:26:0D:A4:57 key 4723E829AE0274800390B1AE4AA4504D
> HCI Event: Command Complete (0x0e) plen 10
    Link Key Request Reply (0x01|0x000b) ncmd 1
    status 0x00 bdaddr C8:3F:26:0D:A4:57
> HCI Event: Read Remote Extended Features (0x23) plen 13
    status 0x00 handle 256 page 1 max 3
    Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr C8:3F:26:0D:A4:57 mode 2 clkoffset 0x0000
< ACL data: handle 256 flags 0x00 dlen 10
    L2CAP(s): Info req: type 2
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Encrypt Change (0x08) plen 4
    status 0x00 handle 256 encrypt 0x01
< HCI Command: Read Encryption Key Size (0x05|0x0008) plen 2
> HCI Event: Command Complete (0x0e) plen 7
    Read Encryption Key Size (0x05|0x0008) ncmd 1
> ACL data: handle 256 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 17 scid 0x0040
< ACL data: handle 256 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 0
      Connection pending - No futher information available
< ACL data: handle 256 flags 0x00 dlen 10
    L2CAP(s): Info req: type 2
> ACL data: handle 256 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x0010
        Streaming mode
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr C8:3F:26:0D:A4:57 name 'Xbox Wireless Controller'
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> ACL data: handle 256 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x0010
        Streaming mode
< ACL data: handle 256 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
< ACL data: handle 256 flags 0x00 dlen 23
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 11
      RFC 0x00 (Basic) 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> ACL data: handle 256 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1480 
< ACL data: handle 256 flags 0x00 dlen 18
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
      MTU 1480 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> ACL data: handle 256 flags 0x02 dlen 15
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 3 clen 1
      Failure - unknown options
      RFC 
< ACL data: handle 256 flags 0x00 dlen 12
    L2CAP(s): Disconn req: dcid 0x0040 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> ACL data: handle 256 flags 0x02 dlen 12
    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040
< HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 256 reason 0x13
    Reason: Remote User Terminated Connection
> HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 256 reason 0x16
    Reason: Connection Terminated by Local Host


[-- Attachment #3: hcidump-disable_ertm.txt --]
[-- Type: text/plain, Size: 7757 bytes --]

HCI sniffer - Bluetooth packet analyzer ver 5.43
device: hci0 snap_len: 1500 filter: 0xffffffffffffffff
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 256 reason 0x08
    Reason: Connection Timeout
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1
    enable 2
> HCI Event: Command Complete (0x0e) plen 4
    Write Scan Enable (0x03|0x001a) ncmd 2
    status 0x00
> HCI Event: Vendor (0xff) plen 2
> HCI Event: Vendor (0xff) plen 2
> HCI Event: Connect Request (0x04) plen 10
    bdaddr C8:3F:26:0D:A4:57 class 0x000508 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
    bdaddr C8:3F:26:0D:A4:57 role 0x00
    Role: Master
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Role Change (0x12) plen 8
    status 0x00 bdaddr C8:3F:26:0D:A4:57 role 0x00
    Role: Master
> HCI Event: Vendor (0xff) plen 4
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 256 bdaddr C8:3F:26:0D:A4:57 type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 256
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1
    enable 0
> HCI Event: Command Complete (0x0e) plen 4
    Write Scan Enable (0x03|0x001a) ncmd 2
    status 0x00
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 256 slots 5
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 256
    Features: 0xbf 0x3e 0x8d 0xfe 0xdb 0xfd 0x7b 0x87
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
    handle 256 page 1
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
    bdaddr C8:3F:26:0D:A4:57
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
    bdaddr C8:3F:26:0D:A4:57 key 8EFE498AD09511DDD149C146B3E43C0C
> HCI Event: Command Complete (0x0e) plen 10
    Link Key Request Reply (0x01|0x000b) ncmd 1
    status 0x00 bdaddr C8:3F:26:0D:A4:57
> HCI Event: Read Remote Extended Features (0x23) plen 13
    status 0x00 handle 256 page 1 max 3
    Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr C8:3F:26:0D:A4:57 mode 2 clkoffset 0x0000
< ACL data: handle 256 flags 0x00 dlen 10
    L2CAP(s): Info req: type 2
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Encrypt Change (0x08) plen 4
    status 0x00 handle 256 encrypt 0x01
< HCI Command: Read Encryption Key Size (0x05|0x0008) plen 2
> HCI Event: Command Complete (0x0e) plen 7
    Read Encryption Key Size (0x05|0x0008) ncmd 1
> ACL data: handle 256 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 17 scid 0x0040
< ACL data: handle 256 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 0
      Connection pending - No futher information available
< ACL data: handle 256 flags 0x00 dlen 10
    L2CAP(s): Info req: type 2
> ACL data: handle 256 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x0010
        Streaming mode
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr C8:3F:26:0D:A4:57 name 'Xbox Wireless Controller'
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> ACL data: handle 256 flags 0x02 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x0010
        Streaming mode
< ACL data: handle 256 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
      Connection successful
< ACL data: handle 256 flags 0x00 dlen 12
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> ACL data: handle 256 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
      MTU 1480 
< ACL data: handle 256 flags 0x00 dlen 18
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
      MTU 1480 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> ACL data: handle 256 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
      Success
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> ACL data: handle 256 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 19 scid 0x0041
< ACL data: handle 256 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 1 status 2
      Connection pending - Authorization pending
< ACL data: handle 256 flags 0x00 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0041 result 0 status 0
      Connection successful
< ACL data: handle 256 flags 0x00 dlen 12
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> ACL data: handle 256 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
      MTU 1480 
< ACL data: handle 256 flags 0x00 dlen 18
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4
      MTU 1480 
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> ACL data: handle 256 flags 0x02 dlen 14
    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
      Success
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 256 slots 1
< ACL data: handle 256 flags 0x00 dlen 6
    L2CAP(d): cid 0x0040 len 2 [psm 17]
      HIDP: Get report: Input report
> HCI Event: Mode Change (0x14) plen 6
    status 0x00 handle 256 mode 0x02 interval 12
    Mode: Sniff
> ACL data: handle 256 flags 0x02 dlen 22
    L2CAP(d): cid 0x0041 len 18 [psm 19]
      HIDP: Data: Input report
> ACL data: handle 256 flags 0x02 dlen 22
    L2CAP(d): cid 0x0041 len 18 [psm 19]
      HIDP: Data: Input report
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> ACL data: handle 256 flags 0x02 dlen 5
    L2CAP(d): cid 0x0040 len 1 [psm 17]
      HIDP: Handshake: Invalid report ID
< ACL data: handle 256 flags 0x00 dlen 6
    L2CAP(d): cid 0x0040 len 2 [psm 17]
      HIDP: Get report: Input report
< HCI Command: Exit Sniff Mode (0x02|0x0004) plen 2
    handle 256
> HCI Event: Command Status (0x0f) plen 4
    Exit Sniff Mode (0x02|0x0004) status 0x00 ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> HCI Event: Mode Change (0x14) plen 6
    status 0x00 handle 256 mode 0x00 interval 0
    Mode: Active
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 256 slots 5
> HCI Event: Max Slots Change (0x1b) plen 3
    handle 256 slots 1
> ACL data: handle 256 flags 0x02 dlen 5
    L2CAP(d): cid 0x0040 len 1 [psm 17]
      HIDP: Handshake: Invalid report ID
< ACL data: handle 256 flags 0x00 dlen 6
    L2CAP(d): cid 0x0040 len 2 [psm 17]
      HIDP: Get report: Input report
> HCI Event: Mode Change (0x14) plen 6
    status 0x00 handle 256 mode 0x02 interval 12
    Mode: Sniff
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 256 packets 1
> ACL data: handle 256 flags 0x02 dlen 5
    L2CAP(d): cid 0x0040 len 1 [psm 17]
      HIDP: Handshake: Invalid report ID
> ACL data: handle 256 flags 0x02 dlen 7
    L2CAP(d): cid 0x0041 len 3 [psm 19]
      HIDP: Data: Input report

      reply	other threads:[~2016-12-01  5:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-30  4:51 Continuing the Xbox One Bluetooth controller debugging Cameron Gutman
2016-11-30  9:42 ` Anthony Bourguignon
2016-11-30 14:54   ` Luiz Augusto von Dentz
2016-12-01  5:01     ` Cameron Gutman [this message]

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=1480568519.2010.3.camel@gmail.com \
    --to=aicommander@gmail.com \
    --cc=contact@toniob.net \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=vinicius.gomes@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.