All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cameron Gutman <aicommander@gmail.com>
To: dmitry.torokhov@gmail.com, jikos@kernel.org
Cc: linux-input@vger.kernel.org
Subject: Supporting the new Xbox One controller with wireless/BT connectivity
Date: Mon, 11 Jul 2016 10:47:38 -0700	[thread overview]
Message-ID: <5783DBBA.8070503@gmail.com> (raw)

I'm trying to come up with the best way to support wirelessly connected Xbox
One controllers. Microsoft has previously released a wireless adapter that
uses a proprietary protocol to talk to the Xbox One controllers. Recently,
they have also announced an Xbox One controller with Bluetooth connectivity. 
Though we can't be sure yet since it hasn't come out yet, I would guess that
they're using the same protocol as they do when attached via USB. If it's a
standard HID gamepad, we don't have any work to do but I'm not holding my
breath ;)

Unfortunately, our xpad driver is quite tied to USB so it will be difficult to
support HID communication over Bluetooth. My initial thinking is that we can
add a new hid-xpad driver that will initially take over this single Bluetooth
Xbox One controller. After it is tested and feature parity with xpad, we can
possibly expand it to handle all Xbox One controllers to avoid duplicated
logic.

The wrinkle in these plans is the Xbox One wireless adapter which seems to be
simply a MediaTek WLAN adapter that MS is binding a protocol driver to in order
to emulate the HID protocol for the rest of their device stack. Fortunately, it
looks like people are started to have success reverse engineering the wireless
protocol, so we should be able to do something similar to how MS implements it.

In order to support the proprietary wireless adapter, I see two options:

1) Write a driver for the Xbox One wireless adapter that will expose a virtual
   USB controller that enumerates Xbox One controllers and allows our existing
   xpad driver to run them. The OZWPAN driver in staging does something like
   this and would be a good reference. The advantage is that it doesn't require
   a new hid-xpad driver. The disadvantages are that there's a bunch of
   complexity in writing a virtual USB host controller driver and even after
   doing it, we still can't support Bluetooth Xbox One Controllers.

2) Write a HID transport for the Xbox One wireless adapter that enumerates HID
   devices for the hid-xpad driver. By moving the abstracting up a layer, it
   really cuts down on the amount of code required. This would also let us
   support USB, proprietary wireless, and Bluetooth attached Xbox One
   controllers with a single xpad driver.

As far as I'm concerned, #2 seems like the obvious choice.

Jiri and Dmitry, do either of you see anything wrong with #2 or have any other
comments or concerns?


Thanks,
Cameron

             reply	other threads:[~2016-07-11 17:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-11 17:47 Cameron Gutman [this message]
2016-07-12  8:34 ` Supporting the new Xbox One controller with wireless/BT connectivity Benjamin Tissoires
2016-07-12 17:42   ` Cameron Gutman

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=5783DBBA.8070503@gmail.com \
    --to=aicommander@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@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 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.