Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for xone (xbox usb adapter) #27

Open
RJ1002 opened this issue Feb 20, 2023 · 4 comments
Open

add support for xone (xbox usb adapter) #27

RJ1002 opened this issue Feb 20, 2023 · 4 comments

Comments

@RJ1002
Copy link

RJ1002 commented Feb 20, 2023

would it be possible to support xone (xbox usb adapter)?
it detect the adapter as "Xbox Unknown" and when i connect the controller(to adapter) it does not change.
xone: https://github.com/medusalix/xone
the adapter look like this (I bought it a long time ago. before the steam deck)
when i connect a xbox one controller. the name is: Microsoft X-Box One pad (when I'm in desktop view. under the battery section)
it also show battery life

also, is it possible to add support for bluetooth keyboard?

if you want more information just ask and tell me what information you want

@SaulGoodman1337
Copy link

yes, please !

@mefflecakes
Copy link

I'd like to also show my interest in seeing this working too.

@jsphonorio
Copy link

Im not sure how often this is updated but I believe the issue is two fold:

  1. All controllers connected to the xbox wireless adapter appear in udev with the same pid: 0x02fe and that pid is not in the xbox.rs file. An example from my testing in rust and udev (I have never used rust before so grain of salt)
    "XBOX_ACC (VID: 0x045e, PID: 0x02fe)"
  2. It looks like the xbox.rs file only tries to get the bluetooth battery level. xone/the accessory can show battery level. But it is in upower. See my two connected controllers:

`Device: /org/freedesktop/UPower/devices/battery_gip0x0
native-path: gip0.0
model: Microsoft Xbox Controller
power supply: no
updated: Sat 18 Jan 2025 09:23:43 PM (17 seconds ago)
has history: yes
has statistics: yes
gaming-input
rechargeable: yes
warning-level: none
battery-level: high
percentage: 70% (should be ignored)
icon-name: 'battery-good-symbolic'
History (charge):
1737253335 70.000 discharging
1737253335 0.000 unknown
History (rate):
1737253335 0.000 unknown

Device: /org/freedesktop/UPower/devices/battery_gip1x0
native-path: gip1.0
model: Microsoft Xbox Controller
power supply: no
updated: Sat 18 Jan 2025 09:23:58 PM (2 seconds ago)
has history: yes
has statistics: yes
gaming-input
rechargeable: yes
warning-level: none
battery-level: full
percentage: 100% (should be ignored)
icon-name: 'battery-full-charged-symbolic'
History (charge):
1737253430 100.000 fully-charged
1737253430 0.000 unknown
History (rate):
1737253430 0.000 unknown
`

So I dont think this would be difficult, the caveat would be that all controllers connected can show their own battery level,b ut I am not sure if we could differeniate which controller which. But I feel like a lot of people will have one controller, and even so, this is better than nothing

@jsphonorio
Copy link

I don't know if anyone still needs this but I forked and made an updated version that works for the wireless adapter:
https://github.com/jsphonorio/ControllerTools/releases/tag/ZIP
However, this fix was done but probably not properly because I am not a developer. I am running this on Bazzite so I cannot verify that it works on a steam deck. Also due to limitations, all controllers connected via the adapter will just show up as Wireless Adatper. You can see the battery life but cannot tell which controller is which. I am not uploading it to the Decky Store so you will have to download and manually install the zip if you want. Obviously ymmv and use at your own risk.

If you want to compare, the main changes where made in the api.rs, controller.rs and xbox.rs with some additions to the TOML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants