Show HN: Linux driver for the Xbox One wireless dongle
github.com
github.com
Thanks for working on this!
At least my xbox one controller has a slot for two aa bateries on the back.
I’ve built a few user space Linux drivers for SPI and USB devices. Was easy, I have consumed stable APIs exposed by usbdevfs, libudev, and a few others. No need to recompile OS kernel. Because Linux kernel API is stable, not only OS kernel upgrades don’t break my stuff, they don’t even require me to recompile my code.
Creating a kernel mode Linux driver is much harder in comparison.
Merging a driver into the mainline Linux is borderline impossible. Even Google with all their corporate resources and platinum membership of Linux foundation was unable to do so, instead they are supporting many thousands lines of patches: https://source.android.com/devices/architecture/kernel/andro...
It’s safe to assume you won’t be able to push your custom driver either. You’ll have to do it the same way as everyone else — patch locally. This is not trivial either, but this time the challenge is technical, not political, as Linux kernel doesn’t have stable API nor ABI: https://github.com/torvalds/linux/blob/master/Documentation/...
I've got code in the kernel and it wasn't easy but that code lives on well beyond my contribution so it has to be in a design and implementation that can and will be maintained by others.
https://github.com/chrippa/ds4drv
https://github.com/kozec/sc-controller
I recently bought myself a dualshock4 for use with Kodi and RetroArch. No driver was needed, even for bluetooth!
Edit: formatting
A kernel module is just a matter of compiling and running `insmod` (or placing it in the correct path). You have to recompile it each time you upgrade your kernel, though.
But seriously, the proper way to do it is a kernel module which you then mainline. I wouldn't be surprised if Valve was to pick it up, since they mainlined some xpad improvements (and the wired version of those controllers)
Haha that's pretty cool