-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Controller support request for Xiaomi Gamepad #40
Comments
the control connects and appears as pro controller in mission control app but does not work and does not appear in the config controls menu. |
Can you post the output of the app so I can see what it's using for a hardware ID? Might just be a simple matter of whitelisting that. Do you know anything about the input format it uses? |
Sorry for te closed, i hope the photo can help, thank you. |
Thanks. Looks like it uses a unique ID, so there shouldn't be any issues identifying the controller. I think it might use the same format as an Xbox 360 controller though so I'll need to make a new handler for it. I'll probably need you to test a build for it in the next day or two when I get a chance to work on it. |
Okay, I can test whatever is needed to see compatibility, thanks for your work |
Here's a build with initial support for the xiaomi. It should now appear to connect to the console but not respond to button presses just yet. Could you install that and then run this tool to view the raw HID reports? It's a bit crappy and lags by about 1sec but will show how the data changes when you use the controls. If this makes sense to you, you could try to figure out which bits/bytes are affected by which buttons. Otherwise, a screenshot of the output would be a good start for me to find further info online. Note this app steals the HID controller events from the system, so you will need to use the home button on the joycon to exit. |
@puked79 Thanks mate, I'll get to adding the button mappings. |
you and thanks again for this great project! I love it! |
Ah yeah, the old firmware on the xbox controller puts the home button on a separate report too. It flashes up because it gets quickly overwritten with the usual button/stick data report. Try this version where I've filtered out the normal button packets from the xiaomi. It's also worth noting whether you see any other reports come up. One of these may contain battery level info (though it could also be that Anyway, here's a new build with the controls mapped according to the images you posted. Let me know if anything is not as it should be. You can use this tool I made to help test the mappings. |
that was fast. tested - unfortunately it does not work. |
Strange. So no controls work at all (even if incorrect)? Does the controller show up as connected to the system now? Yeah that's to be expected with the hid_report_tool. I'm filtering out the main button data report from the xiaomi in the hope of catching any others that might be sent. You shouldn't really have two wireless controllers connected when using this as they will interfere with one another (the reason for the flickering). At some point I might refine this tool for general use, but at the moment it's just a bit of a hack I was using for my own purposes. |
I just wanted to test, if it crashed - that`s why i connected a second controller. It indeed does not flicker, when only the wii controller is connected. No, it does not show as connected to the system. I guess ControllerTest would only work, if it was?! |
Ok, sounds like maybe it's not completing the handshake with the console after connecting. This can mean one of two things. Either the controller ID hasn't been matched and the handler isn't attached, or your switch is sending some commands to the controller that I haven't seen before and therefore don't handle. Start by dumping your controller database with btdb.nro and confirm your controller has the same ID as @ricardoesppinozag Oh also, what I was mainly interested in with the modified hid_report_tool was whether you see any data send when you press the home button, as this might be sent in a different report. Did you check that? |
Everything looks fine to me. Install this build with logging enabled and get a log of attempting to connect the controller. It will create the log on your SD root at The logging introduces a fair amount of lag, so it's not recommended to leave this build installed outside of debugging issues like this. |
btdrv-mitm.log |
Also when I try the hid report tool as soon as a I push one button the screen goes black |
I want to note that this gamepad has a gyroscope |
@pabermod yeah it's not expected to be working yet. That build simply enables logging. It looks like maybe this controller is generating an unknown HID event that other controllers don't. See if this build where I drop the event makes any difference (no logs here). |
Do you know if anything special has to be done to enable it? I'm guessing that's what those |
For what i know it is enabled by default. I will try the Last build later
Obtener Outlook para Android<https://aka.ms/ghei36>
…________________________________
From: ndeadly <notifications@github.com>
Sent: Thursday, September 3, 2020 6:10:46 PM
To: ndeadly/MissionControl <MissionControl@noreply.github.com>
Cc: Pablo Bernal <kbronctjr@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [ndeadly/MissionControl] Controller support request for Xiaomi Gamepad (#40)
I want to note that this gamepad has a gyroscope
Do you know if anything special has to be done to enable it? I'm guessing that's what those 00s at the end of the data reports might be for, but I'd expect them to be changing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#40 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACFD2HSEIWPKGNK7CZPURGTSD65YNANCNFSM4QQYXNAQ>.
|
tested - makes no difference |
Try this one. I think I was just stupid and forgot to actually create the controller handler XD. |
It works :) - thank you! |
Nice. I didn't think those looked right vs other XInput controllers. I just looked at your captures again and I guess you tried to report in terms of how they would map to a Switch Pro controller, rather than the face value of the buttons themselves. Does this controller have a player led indicator or anything? |
It does not have a player indicator. Can you map the "Home" button of the gamepad? I manage to capture a screenshot of the changed byte when pressing the home button. It changes the last byte from 00 to 01 |
Oh, is it not working? Maybe I don't have the mapping quite right. Can you post the screenshot? |
Try this one. |
Hmm that looks fine for the current mapping. How are you verifying the buttons are working? Did you try it with ControllerTest.nro? |
With comtroller test and in the main menu
Obtener Outlook para Android<https://aka.ms/ghei36>
…________________________________
From: ndeadly <notifications@github.com>
Sent: Monday, September 7, 2020 5:49:00 PM
To: ndeadly/MissionControl <MissionControl@noreply.github.com>
Cc: Pablo Bernal <kbronctjr@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [ndeadly/MissionControl] Controller support request for Xiaomi Gamepad (#40)
Hmm that looks fine for the current mapping. How are you verifying the buttons are working? Did you try it with ControllerTest.nro?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#40 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACFD2HUXFP4KPY6OUO7UHHTSET6GZANCNFSM4QQYXNAQ>.
|
Yeah I can't see why that wouldn't be working then. If you run hid_report_tool does the value stay as 01 if you hold the home button down or just flash up on the screen? I'm wondering whether maybe it needs to be registered as pressed for multiple reports before it's recognised |
It Just flashes
…________________________________
From: ndeadly <notifications@github.com>
Sent: Monday, September 7, 2020 5:49:00 PM
To: ndeadly/MissionControl <MissionControl@noreply.github.com>
Cc: Pablo Bernal <kbronctjr@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [ndeadly/MissionControl] Controller support request for Xiaomi Gamepad (#40)
Hmm that looks fine for the current mapping. How are you verifying the buttons are working? Did you try it with ControllerTest.nro?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#40 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACFD2HUXFP4KPY6OUO7UHHTSET6GZANCNFSM4QQYXNAQ>.
|
Maybe that's the issue. Does it flash up as 01 again when you release maybe? Or just stays 00.. In this build I've swapped the back and home buttons. See if the physical home button shows as a press of the minus button or not. |
Now using the minus button works good as home button... So it seems the "Home" button is sending a strange event |
@pabermod that's to be expected, but does the home button work as the minus button (even briefly) when you press it. I want to know whether home presses are maybe handled differently by the system or if my mapping is still somehow wrong. |
No, the home button is working as previously, quick flash of the last byte even when holding it |
I don't think you're understanding what I'm asking of you. The underlying behaviour of the controller won't change, so looking at hid_report_tool will always show the same thing. I want you to take a look at ControllerTest and see whether pressing the home button (which I've now mapped as the minus button) flashes up as a button press or not. |
it doesnt |
Hmm, weird. I might have to sleep on this one for now then as I want to try and push out a new release tonight to fix some other issues. |
I've reworked the way that controller state is processed in version 0.3.0. See if it makes any difference to your Home button issue. Either way, you can now use the combo I'll consider this controller supported now. |
Controller support for Xiaomi Gamepad would ve aprecciated, awsome work, contrats and thankyou.
Website link: https://xiaomi-mi.com/accessories-for-tv/xiaomi-mi-bluetooth-gamepad/
The text was updated successfully, but these errors were encountered: