Closed WillsterJohnson closed 1 year ago
I don't think we can get the name of the controller via Bluetooth: There's no report defined in the HID descriptor which would allow that. There seem to be reports defined which I'm guessing can (a) set the RGB value and brightness of the Guide LED, and there's a report defined which can send arbitrary data which I believe is for programming the profiles. But I found out in the last few days that the current firmware version no longer seems to have those reports, I need to reevaluate that.
In USB mode (wired or wireless via dongle), the protocol uses GIP. I've started an early version of a protocol decoder for Wireshark here: https://github.com/xpadneo/gip-dissector. The controller uses SSL handshakes to encrypt some data, so it will be hard to figure out what's going on. But I'm pretty sure there are ways to read the custom name, write RGB (already known how to do that), set profiles (TBD). HID and GIP are quite similar, so if they both have reports for the same purpose, data is sent and received in an almost similar format byte by byte, just the report IDs differ.
Regarding the mappings: Yes, I expected that profiles programmed in Windows will map completely fine in Linux - there's just no way of programming it in Linux.
Regarding the model: Yes, we mimic an original Xbox360 USB controller at the device interface layer of Linux. This has historic reasons: Before SDL2 became de-facto standard in games, games expected the joystick interface to have specific buttons at specific positions, similar for evdev interface. Upcoming SDL2 will have full support for xpadneo mappings including the paddles and special buttons. When it becomes widely deployed, Proton games and Steam Input will automatically work properly finally because older games can load newer SDL2 libs via a dynamic loader and compatibility layer.
So yes, we should probably amend the documentation to explicitly mention that profiles programmed in Windows will work. Feel free to open a pull request for that. No need to mention tested distributions, it finally boils down to SDL2 to detect that properly.
If using a VM with USB passthrough, the following problem occurs: The Xbox Acc app may put the controller into bootloader mode, and then it gets a different USB ID, thus disconnects from the guest. If you use the USB dongle and its wireless connection, you'll bypass that problem and it works.
I don't think we can get the name of the controller via Bluetooth
Just had a look, even on Windows (hardware, not VM) it has a generic name over Bluetooth. If it's transmitting it's name, Windows & Xbox Accessories don't seem to be using it.
I'm not concerned about the model UI. Oddly enough it shows up as what appears to be the correct model in the Steam Input UI, seems like Steam can't decide what an Xbox controller looks like.
If using a VM with USB passthrough, the following problem occurs: The Xbox Acc app may put the controller into bootloader mode, and then it gets a different USB ID, thus disconnects from the guest. If you use the USB dongle and its wireless connection, you'll bypass that problem and it works.
That sounds about right, if I had no USB filter or if I used one with default settings, it would connect then immediately disconnect. If I removed some of the filter fields, I'd get a connect/disconnect loop that near enough brought the VM to a standstill. I don't have the dongle unfortunately, but it's good to know that option is available.
I'll sort out that PR shortly.
Regarding: https://github.com/atar-axis/xpadneo/blob/cf97733f4f3d372ee80247fe7532de7b15123bc4/docs/README.md?plain=1#L193
Related issues (non-exhaustive list):
427
Version of xpadneo
v0.9-142-gcf97733
(https://github.com/atar-axis/xpadneo/commit/cf97733f4f3d372ee80247fe7532de7b15123bc4)System Info
(happy to provide more on request, will update this section also)
Controller Model
Connection mode
Setup
wine
if this were a simple.exe
instead, thanks Microsoft)git pull
on existing clone of this repo (orgit clone
if one does not exist, see tagged commit above)sudo ./uninstall.sh
in clone directory (skip if not previously installed)sudo ./install.sh
in clone directory (I'm aware ofupdate.sh
but it never hurts to be thorough)bluetoothctl
or orthers are fine)Test
Profiles
Unless otherwise stated;
Slot 1 (
)Joystick Curves
Trigger Actuation
Normal Mappings
Shift Mappings
Shift keys: N/A
Slot 2 (
)Joystick Curves
Trigger Actuation
Normal Mappings
Shift Mappings
Shift keys: N/A
Slot 3 (
)Joystick Curves
Trigger Actuation
Normal Mappings
Shift Mappings
Shift keys: P1, P3
Results
Every single button on the controller does exactly what was configured in Xbox Accessories, including paddle mapping and shift layer.
/docs/README.md
Further Info
Some issues are present when using the Xbox Elite Series 2 on Linux with XPadNeo. If I've found a workaround, I've added it as an item in a sublist below.
Steam controller input test UI shown above. Left: Bluetooth, Right: USB
To the maintainers & contributors of XPadNeo, if you need someone to test something (XPadNeo development related) on an Xbox Elite S2, don't hesitate to contact me. Either @ me on GitHub, or see my GitHub profile for more ways to get in touch. I'm dreadful at C, and useless with Kernel modules, so unfortunately "owning an Elite S2" is the only way I can contribute.
Your Controller Is Pink?
You read well - yes!
I called it "BubblegumButtons" but unfortunately Linux doesn't use it's name, see issues in "Further Info" above.