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

8btido ultimate bluetooth/wireless #395

Open
antonio258 opened this issue Nov 22, 2022 · 10 comments
Open

8btido ultimate bluetooth/wireless #395

antonio258 opened this issue Nov 22, 2022 · 10 comments
Labels
0 | type: hardware support Support third-party hardware and clones

Comments

@antonio258
Copy link

Would it be possible to add support for 8bitdo ultimate? Both in the bluetooth version and in the version with dungle 2.4ghz.

@kakra
Copy link
Collaborator

kakra commented Nov 22, 2022

Does it have support for an Xbox mode? If it does, it should already be supported via Bluetooth.

For adding other connection methods (e.g., dongles) and modes (e.g. Switch mode), I'd need to have such a controller. At least Switch mode support may follow in the next development cycle, I got donated a GuliKit controller and Switch Bluetooth mode looks easy enough to add support.

@kakra kakra added the 0 | type: hardware support Support third-party hardware and clones label Nov 22, 2022
@rdlu
Copy link

rdlu commented Dec 6, 2022

Hey everyone!

This controller tries to sense if it's connected to a Switch or a Windows and presents itself as a regular xinput device or a switch pro controller. The problem is that the method it uses to sense which mode to present itself is unknown.

The dongle does the same.

There's a ArchLinux user package using udev detection + xboxdrv to make it work. My ArchLinux computer is on repairs right now, so I can't confirm.

One reddit user had success using xpad to recognize the xinput mode as well.

# dinput
KERNEL=="event[0-9]*", SUBSYSTEM=="input", SUBSYSTEMS=="usb", ENV{ID_VENDOR_ID}=="2dc8", ENV{ID_MODEL_ID}=="3013", TAG+="systemd", ENV{SYSTEMD_WANTS}="8bitdo-ultimate-dinput@$env{DEVNAME}"

# xinput
SUBSYSTEM=="usb", ATTR{idVendor}=="2dc8", ATTR{idProduct}=="3106", ATTR{manufacturer}=="8BitDo", RUN+="/usr/bin/systemctl start 8bitdo-ultimate-xinput@2dc8:3106"

# This device is connected when the above device disconnects
SUBSYSTEM=="usb", ATTR{idVendor}=="2dc8", ATTR{idProduct}=="3109", ATTR{manufacturer}=="8BitDo", RUN+="/usr/bin/systemctl stop 8bitdo-ultimate-xinput@2dc8:3106"

Where the d-input is using this:

xboxdrv --mimic-xpad --silent --quiet --type xbox360 --evdev %I --evdev-absmap ABS_BRAKE=LT,ABS_GAS=RT,ABS_Y=Y1,ABS_X=X1,ABS_RZ=Y2,ABS_Z=X2,ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y --evdev-keymap BTN_TL=LB,BTN_TR=RB,BTN_X=X,BTN_Y=Y,BTN_A=A,BTN_B=B,BTN_THUMBL=TL,BTN_THUMBR=TR,BTN_SELECT=back,BTN_START=start,BTN_MODE=guide --axismap -Y1=Y1,-Y2=Y2

And x-input is using this:

xboxdrv --mimic-xpad --silent --type xbox360 --device-by-id %I --force-feedback

There's also a beta firmware for the dongle that will let us manually select the mode instead of doing the sensing.


The Bluetooth Receiver for Ultimate Controller

V1.02 Beta 1 Update log:
There are several button combinations to activate different working modes on 2.4g mode to meet the need of different devices. 
Press & hold the following button combinations for 5 seconds after the connection between the controller and receiver, 
the LED indicator blinks rapidly a few times to indicate the successful switching. 

Switch mode: SELECT+Y         (Apply for Steam Deck & Switch)
Xinput mode: SELECT+X         (Apply for Windows 10 1903 or above)
Dinput mode: SELECT+B         (Apply for Mister, Android and Linux)
Default mode: SELECT+START     (Automatically identify Windows and Switch) 

DINPUT works natively, but I prefer the XINPUT to be supported so we can have decent force feedback/rumble support.

@kakra
Copy link
Collaborator

kakra commented Dec 6, 2022

This project is neither about xboxdrv nor xpad. I'd expect that dinput would be the mode to use for xpadneo, and I cannot guess why rumble should not work then. Without providing log data for xpadneo connecting the device, there's not much I could guess from this report.

Are you asking for support in xpadneo? If so, there are plans to support native Switch mode in the future (see above). Until then, dinput mode should do but xinput mode should also work as long as it can connect via Bluetooth. If you're using a special donge from 8BitDo, we may be out of luck unless I can effort such a controller including the dongle to test myself.

You're the second person to tell that dinput doesn't support dongle although all protocol support seems to be in place. This looks like an artificial restriction of the dongle to me. But then again, I'm not even sure if xpadneo is actually used here.

All your udev rules seem to load user-space helpers, so it's bypassing xpadneo completely.

@btegs
Copy link

btegs commented Dec 17, 2022

@LuisArtDavila and @kakra - There was a merge in xpad recently that may help: paroj/xpad@1821d28

@kakra
Copy link
Collaborator

kakra commented Dec 18, 2022

@btegs Thanks, that looks interesting. I could add a similar patch to xpadneo but we need to ensure that the device identified by those IDs is actually a HID device. Since that patch is in xpad which is not a HID driver, this is probably not a HID device and you rather use xpad or xone for it (the latter may need a similar patch). We currently do not support the GIP protocol in xpadneo (though, this is on my feature list but not planned yet).

With the beta firmware, probably only Switch mode is HID protocol, maybe Android mode (but that seems to miss rumble support). If you guys could share the HID descriptors and device IDs of those modes, we may add some early alpha support in xpadneo. If a mode doesn't offer HID, this has to wait.

@btegs
Copy link

btegs commented Dec 18, 2022

@kakra - Thanks for the update. I also recently got an 8bitdo Pro 2 and using the latest xpadneo makes the rumble run constantly and have to turn off the controller to make it stop. My Xbox Elite 2 does work great though and would be nice to just use xpadneo if i get the Ultimate Wireless down the road as well.

If i were to get the Ultimate controller today, what would be the commands I would run in the terminal to get the information you need? Could try the DirectInput and Xinput modes:

https://www.8bitdo.com/ultimate-2.4g-wireless-controller/
https://download.8bitdo.cn/Manual/Controller/Ultimate/Ultimate-2.4g-wireless-Controller.pdf

Btw if you have access to SteamOS 3.4 code for the Steam Deck, could be of help too: https://www.gamingonlinux.com/2022/12/steamos-34-preview-adds-support-for-8bitdo-ultimate-wireless-controller-dongle/

EDIT: I am on Pop!_OS 22.04 which has the 6.0.6 kernel with support for the Pro 2. Using that as-is or with the latest paroj/xpad DKMS driver will let the controller function fine without xpadneo installed.

https://www.reddit.com/r/SteamDeck/comments/ymv653/guide_to_setup_the_8bitdo_ultimate_24ghz_wireless/

@kakra
Copy link
Collaborator

kakra commented Dec 18, 2022

I also recently got an 8bitdo Pro 2 and using the latest xpadneo makes the rumble run constantly

Yep, this is why I have not backported the last change to the stable branch yet. I think I have to get that controller myself to figure out what's going wrong.

I'll look into the links later.

@btegs
Copy link

btegs commented Dec 19, 2022

@kakra - Forgot to mention this, but here is an AUR package if you want to reference some udev rules: https://aur.archlinux.org/packages/8bitdo-ultimate-controller-udev

Also saw this: https://www.reddit.com/r/SteamDeck/comments/ymv653/comment/iyjztis/

@djust270
Copy link

djust270 commented Jan 19, 2023

@btegs Thanks, that looks interesting. I could add a similar patch to xpadneo but we need to ensure that the device identified by those IDs is actually a HID device. Since that patch is in xpad which is not a HID driver, this is probably not a HID device and you rather use xpad or xone for it (the latter may need a similar patch). We currently do not support the GIP protocol in xpadneo (though, this is on my feature list but not planned yet).

With the beta firmware, probably only Switch mode is HID protocol, maybe Android mode (but that seems to miss rumble support). If you guys could share the HID descriptors and device IDs of those modes, we may add some early alpha support in xpadneo. If a mode doesn't offer HID, this has to wait.

According to USBDeview in Windows

Devicename : XBOX_360_DEVICE_00:00
VendorID : 2dc8
ProductID: 3106

HTML report here https://justgeeks-my.sharepoint.com/:u:/g/personal/dave_justgeeks_co/EX9fV5WNyp5PimcjYqJUz9ABYwx4mfh3C7XvpQubK8o3nQ?e=84rATz

@btegs
Copy link

btegs commented Jan 19, 2023

@djust270 - It seems like 8bitdo reuses IDs: paroj/xpad@4a64f5c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 | type: hardware support Support third-party hardware and clones
Projects
None yet
Development

No branches or pull requests

5 participants