linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* XBox One S controller, Bluetooth support (was Re: hid: microsoft: Add rumble support for Xbox One S controller)
       [not found]   ` <701e5f0fc3b24adf4b1ca4d817b3091fe73102ba.camel@hadess.net>
@ 2018-09-26 17:43     ` Bastien Nocera
  2018-09-26 22:35       ` Florian Dollinger
       [not found]     ` <003401d455ab$c6df5280$549df780$@gmx.de>
  1 sibling, 1 reply; 4+ messages in thread
From: Bastien Nocera @ 2018-09-26 17:43 UTC (permalink / raw)
  To: Dollinger Florian, andrew.smirnov
  Cc: linux-kernel, linux-bluetooth, linux-input

(Resend to the correct Bluetooth list, sorry for the dupes)

On Wed, 2018-09-26 at 15:45 +0200, Bastien Nocera wrote:
> Hey Florian,
> 
> On Wed, 2018-09-26 at 14:51 +0200, Dollinger Florian wrote:
> > From: Florian Dollinger <dollinger.florian@gmx.de>
> > 
> > Hi there! Why do you re-engineer the wheel? :) There is already a
> > fully functional and tested driver out there (
> > https://github.com/atar-axis/xpadneo). Would be much easier to help
> > me (the owner of xpadneo) to push it into the kernel.
> 
> Probably because he didn't know about it, and how would he? I also
> didn't know about it, because it didn't exist last I worked on those
> joypads.
> 
> I spent quite a bit of time trying to get the XBox One S controller
> working over Bluetooth, without success, and I see that you have a
> patch for that which you didn't send upstream either:
> 
https://github.com/atar-axis/xpadneo/blob/master/misc/kernel_patches/0001-fix_bluetooth_reconnect.patch

For this patch, after speaking with the Bluetooth maintainers, we would
need to:
- add relevant btmon outputs before and after the patch in the commit
message
- remove the mention of "many devices" (if you've seen other devices
with that problem in the wild, please mention them, otherwise mention
that it's for "XBox One S" controllers, and clones)
- run the patch against the "Profile Tuning Suite Tool" from the
Bluetooth SIG. This requires a Windows laptop, and a piece of hardware
from the Bluetooth SIG, see below.

The first 2 should be pretty easy to do, just send your patch using
"git send-email" to the linux-bluetooth list (CC:ed), with the data
attached.

For the qualification test, I was told Szymon has a test suite that he
could use to double-check the tests. If not, I should be able to buy
the adapter and run that test suite locally.

Cheers



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

* Re: AW: hid: microsoft: Add rumble support for Xbox One S controller
       [not found]     ` <003401d455ab$c6df5280$549df780$@gmx.de>
@ 2018-09-26 18:02       ` Bastien Nocera
  2018-09-26 22:50         ` Florian Dollinger
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien Nocera @ 2018-09-26 18:02 UTC (permalink / raw)
  To: dollinger.florian, andrew.smirnov
  Cc: linux-kernel, linux-bluetooth, linux-input

On Wed, 2018-09-26 at 17:15 +0200, dollinger.florian@gmx.de wrote:
> Hey Bastien,
> 
> > Probably because he didn't know about it, and how would he?
> 
> Hum, it's the first hit when you search for something like 'xbox one
> s driver linux' since half an year or longer 😊

Sure it is, but:
- it's not an "XBox One S controller", it's a variant of the "XBox One
controller" shipped with the XBox One S.
- we discussed this on the linux-bluetooth mailing-list in August 2016:
  https://www.spinics.net/lists/linux-bluetooth/msg68102.html
  revived the thread in 2017:
  https://www.spinics.net/lists/linux-bluetooth/msg72750.html
  and discussed the force feedback in particular in August this year:
  https://www.spinics.net/lists/linux-input/msg57744.html
- why would we look for a "driver" when there's already one in the
kernel that supports all the xbox controllers except this one? :)

Really, as much as it's nice to find working code for this device, it's
surprising you didn't contact any kernel developer before, rather than
us having to find you.

> > I can imagine that a large portion of the driver can be integrated
> > in the existing XBox pad driver, with each feature added in
> > individual patches.
> 
> Would be great! But ist the xpad driver really the right place?
> 
> First of all, the BT interface is using HID, USB does not.
> Furthermore, the driver is currently around 1,3k lines long - for a
> single device and only BT... (okay yes, there are a lot of comments
> in it).
> But anyway, is it really a good idea to put everything into hid-
> microsoft?
> Moreover, there is another interface which I am trying to support at
> the moment - the one which is used by the XBOX (WiFi).
> 
> I think in the end the whole hid-microsoft thingy will get blown-up a
> bit - right?
> Or, everything is scattered over many places (hid-microsoft, xpad,
> another driver fort he wifi-interface).
> 
> Isn't it possible to use "one driver per device" in the kernel too,
> like I did?

Yes, but that's not the way the drivers are usually arranged. They're
arranged by vendors, so this driver would need to be merged into the
"hid-microsoft.c" driver.

I'm pretty sure that the USB version can also be made to use HID.

I have no idea how the RF protocol would work though. I imagine it
requires a dongle, or does it actually use Wi-Fi? (that would be
surprising...).

Anyway, I don't have much time to work on it right this minute, but it
would be great if you could send your Bluetooth patch to start with,
and we can iterate on that, and fix the other problems as we clear the
priority list.

Cheers


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

* Re: XBox One S controller, Bluetooth support (was Re: hid: microsoft: Add rumble support for Xbox One S controller)
  2018-09-26 17:43     ` XBox One S controller, Bluetooth support (was Re: hid: microsoft: Add rumble support for Xbox One S controller) Bastien Nocera
@ 2018-09-26 22:35       ` Florian Dollinger
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Dollinger @ 2018-09-26 22:35 UTC (permalink / raw)
  To: Bastien Nocera, andrew.smirnov; +Cc: linux-kernel, linux-bluetooth, linux-input

> For this patch, after speaking with the Bluetooth maintainers, we would
> need to:
> - add relevant btmon outputs before and after the patch in the commit
> message
> - remove the mention of "many devices" (if you've seen other devices
> with that problem in the wild, please mention them, otherwise mention
> that it's for "XBox One S" controllers, and clones)
> - run the patch against the "Profile Tuning Suite Tool" from the
> Bluetooth SIG. This requires a Windows laptop, and a piece of hardware
> from the Bluetooth SIG, see below.
> 
> The first 2 should be pretty easy to do, just send your patch using
> "git send-email" to the linux-bluetooth list (CC:ed), with the data
> attached.
> 
> For the qualification test, I was told Szymon has a test suite that he
> could use to double-check the tests. If not, I should be able to buy
> the adapter and run that test suite locally.
> 
> Cheers

Thanks, I will give it a try tomorrow (later) :)


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

* Re: hid: microsoft: Add rumble support for Xbox One S controller
  2018-09-26 18:02       ` AW: hid: microsoft: Add rumble support for Xbox One S controller Bastien Nocera
@ 2018-09-26 22:50         ` Florian Dollinger
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Dollinger @ 2018-09-26 22:50 UTC (permalink / raw)
  To: Bastien Nocera, andrew.smirnov; +Cc: linux-kernel, linux-bluetooth, linux-input

> Sure it is, but:
> - it's not an "XBox One S controller", it's a variant of the "XBox One
> controller" shipped with the XBox One S.
> - we discussed this on the linux-bluetooth mailing-list in August 2016:
>    https://www.spinics.net/lists/linux-bluetooth/msg68102.html
>    revived the thread in 2017:
>    https://www.spinics.net/lists/linux-bluetooth/msg72750.html
>    and discussed the force feedback in particular in August this year:
>    https://www.spinics.net/lists/linux-input/msg57744.html
> - why would we look for a "driver" when there's already one in the
> kernel that supports all the xbox controllers except this one? :)
> 
> Really, as much as it's nice to find working code for this device, it's
> surprising you didn't contact any kernel developer before, rather than
> us having to find you.

Fair enough :)

> Yes, but that's not the way the drivers are usually arranged. They're
> arranged by vendors, so this driver would need to be merged into the
> "hid-microsoft.c" driver.

That's probably the main reason for not getting in touch earlier, I 
really don't like the idea of putting everything into the same driver 
just because it is the same vendor - or at leas the same name (even if 
Microsoft Xbox has nearly nothing to do with other parts of Microsoft).

> I'm pretty sure that the USB version can also be made to use HID.

I really don't think so, I already gave it a try. At least not "out of 
the box".

> I have no idea how the RF protocol would work though. I imagine it
> requires a dongle, or does it actually use Wi-Fi? (that would be
> surprising...).

In theory it does need one, but it is nothing more than normal Wi-Fi 
(2,4 and 5 GHz) - you can talk to the gamepad using any Wi-Fi card / 
stick you want. The problem is, that the connection is secured somehow.
If you are interested, take a look here: 
https://github.com/atar-axis/xpadneo/wiki/Microsoft-Xbox-One-Wireless-Adapter

> Anyway, I don't have much time to work on it right this minute, but it
> would be great if you could send your Bluetooth patch to start with,
> and we can iterate on that, and fix the other problems as we clear the
> priority list.

Jap, I will do that - Thank you so far!

> Cheers

Dito.

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

end of thread, other threads:[~2018-09-26 22:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20180810001714.14659-1-andrew.smirnov@gmail.com>
     [not found] ` <20180926125130.974-1-dollinger.florian@gmx.de>
     [not found]   ` <701e5f0fc3b24adf4b1ca4d817b3091fe73102ba.camel@hadess.net>
2018-09-26 17:43     ` XBox One S controller, Bluetooth support (was Re: hid: microsoft: Add rumble support for Xbox One S controller) Bastien Nocera
2018-09-26 22:35       ` Florian Dollinger
     [not found]     ` <003401d455ab$c6df5280$549df780$@gmx.de>
2018-09-26 18:02       ` AW: hid: microsoft: Add rumble support for Xbox One S controller Bastien Nocera
2018-09-26 22:50         ` Florian Dollinger

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).