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

Xinput support #137

Open
hachirokumiku opened this issue Oct 9, 2022 · 7 comments
Open

Xinput support #137

hachirokumiku opened this issue Oct 9, 2022 · 7 comments

Comments

@hachirokumiku
Copy link

would you add xinput support to ESP32-BLE-Gamepad?

@lemmingDev
Copy link
Owner

lemmingDev commented Oct 9, 2022 via email

@LeeNX
Copy link

LeeNX commented Oct 29, 2022

Microsoft XInput, not to be confused with X.orgs XInput ... ;-).

Found - https://github.com/dmadison/ArduinoXInput with something data info - https://www.partsnotincluded.com/understanding-the-xbox-360-wired-controllers-usb-data/.

but I don't have MicroSoft Windows to test or play with, maybe somebody else might find some of this useful.

But my thinking, is that you would need to license or emulate a Microsoft XBox controller.

MS XInput device seems a little limited compared to the BLE HID Game device.

@Mystfit
Copy link

Mystfit commented Dec 25, 2023

I managed to get XInput working by emulating either a Xbox One S (model 1708) or Xbox Series X (model 1914) controller over in my composite HID fork. It does mean that the buttons and axes end up having to be fixed rather than dynamic as I had to match up with what XInput expected via the HID report map.

I would like to backport the Xbox controller code but I've refactored a big chunk of the library to work with combining a mouse and keyboard into the same device so it might be tricky.

@lemmingDev
Copy link
Owner

Legend
https://github.com/Mystfit/ESP32-BLE-CompositeHID

@LeeNX
Copy link

LeeNX commented Mar 19, 2024

Hey @Mystfit , your fork does not have open issues, where is the best place to chat about some suggestions. I don't really want to message from within this repo. Would make it a little noisy.

I would like to suggest an update to the ReadMe in the default branch, so that people known what is different, without having to go a little deep diving.

I was also wondering about how much overhead adding adding keyboard and mouse into the same library? Latency and Resources?

@Mystfit
Copy link

Mystfit commented Mar 19, 2024

Hey @Mystfit , your fork does not have open issues, where is the best place to chat about some suggestions. I don't really want to message from within this repo. Would make it a little noisy.

I would like to suggest an update to the ReadMe in the default branch, so that people known what is different, without having to go a little deep diving.

I was also wondering about how much overhead adding adding keyboard and mouse into the same library? Latency and Resources?

Hi @LeeNX, thanks for the heads up - I've opened up issues and discussions on the fork and we can continue this conversation over there if needed.

I have an updated readme that I've been working on and forgot to check in that will clarify the differences between the libraries. The gamepad portion is relatively similar to this library but it is initialised differently - I'll make sure to make that the primary code example in the readme shows the difference. I have updated all of the included code examples in the library to work with the new system though.

The combined HID report descriptor has an upper limit of 512 bytes (NimBLE limitation) which can be exceeded if you combine too many devices together or enable too many features. I've managed to exceed it before so I need to create a descriptive error message and put this limitation in the readme.

@LeeNX
Copy link

LeeNX commented Mar 19, 2024

Thanks @Mystfit , that is awesome. I will move my questions and PR into your repo.

@lemmingDev I think we can point Xinput and multiple device question into https://github.com/Mystfit/ESP32-BLE-CompositeHID repo. See if I can get around to a PR soon.

Thank you very much you awesome people!!

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