Code Monkey home page Code Monkey logo

Comments (46)

ndeadly avatar ndeadly commented on May 18, 2024 1

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.

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024 1

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 MINUS + DPAD_DOWN for Home on any controller.

I'll consider this controller supported now.

from missioncontrol.

ricardoesppinozag avatar ricardoesppinozag commented on May 18, 2024

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.

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

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?

from missioncontrol.

ricardoesppinozag avatar ricardoesppinozag commented on May 18, 2024

Sorry for te closed, i hope the photo can help, thank you.

from missioncontrol.

ricardoesppinozag avatar ricardoesppinozag commented on May 18, 2024

WhatsApp Image 2020-08-31 at 12 52 46 PM

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

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.

from missioncontrol.

ricardoesppinozag avatar ricardoesppinozag commented on May 18, 2024

Okay, I can test whatever is needed to see compatibility, thanks for your work

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

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.
MissionControl-0.1.0-xiaomi.zip

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.

hid_report_tool.zip

from missioncontrol.

ricardoesppinozag avatar ricardoesppinozag commented on May 18, 2024

Look, it didnt appear connected at console menu but in hid repport there somo information. These photos are from there:

No button in use:
No button pressed
Right stick pressed:
Right stick pressed
Left stick pressed:
Left stick pressed

Im sorry i dont know about the bites/bytes affected but i can try anything you need, Let me know if i can help in something else. Thanks.

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

Hmm, not sure why it wouldn't have showed up as connected. Maybe I got the ID wrong.

If you want to speed things up you could try and note down the numbers that change when you press each button or push the stick to an extreme position in x or y. If this flies over your head feel free to ignore and I'll figure it out eventually or find someone else with the same controller to test.

To understand what we're doing here:
If you look at those screenshots you've sent me, you'll see that the third number in white changes with each different state you showed
hid_report

If you punch these numbers into a programming calculator in hex mode, you'll see that they correspond to a binary number with (usually) exactly one bit set to 1. These ones correspond to the button being pressed.
calc

0x20 -> 00100000
0x40 -> 01000000

You could write these down something like the below, or simply copy down all the numbers as shown in your screen captures

left stick pressed:
byte[3] = 0x20

right stick pressed:
byte[3] = 0x40

from missioncontrol.

puked79 avatar puked79 commented on May 18, 2024

2020090312400200-DB1426D1DFD034027CECDE9C2DD914B8
2020090312412700-DB1426D1DFD034027CECDE9C2DD914B8
2020090312413900-DB1426D1DFD034027CECDE9C2DD914B8
2020090312414900-DB1426D1DFD034027CECDE9C2DD914B8
2020090312415300-DB1426D1DFD034027CECDE9C2DD914B8
2020090312420100-DB1426D1DFD034027CECDE9C2DD914B8
2020090312420500-DB1426D1DFD034027CECDE9C2DD914B8
2020090312421000-DB1426D1DFD034027CECDE9C2DD914B8
2020090312421400-DB1426D1DFD034027CECDE9C2DD914B8
2020090312422400-DB1426D1DFD034027CECDE9C2DD914B8
2020090312423300-DB1426D1DFD034027CECDE9C2DD914B8
2020090312423500-DB1426D1DFD034027CECDE9C2DD914B8
2020090312423700-DB1426D1DFD034027CECDE9C2DD914B8
2020090312423900-DB1426D1DFD034027CECDE9C2DD914B8
2020090312424100-DB1426D1DFD034027CECDE9C2DD914B8
2020090312424300-DB1426D1DFD034027CECDE9C2DD914B8
2020090312424500-DB1426D1DFD034027CECDE9C2DD914B8
2020090312425900-DB1426D1DFD034027CECDE9C2DD914B8
2020090312430500-DB1426D1DFD034027CECDE9C2DD914B8
2020090312431400-DB1426D1DFD034027CECDE9C2DD914B8
2020090312432600-DB1426D1DFD034027CECDE9C2DD914B8
2020090312433300-DB1426D1DFD034027CECDE9C2DD914B8
2020090312434200-DB1426D1DFD034027CECDE9C2DD914B8
2020090312434700-DB1426D1DFD034027CECDE9C2DD914B8
2020090312440700-DB1426D1DFD034027CECDE9C2DD914B8
2020090312441100-DB1426D1DFD034027CECDE9C2DD914B8
2020090312441400-DB1426D1DFD034027CECDE9C2DD914B8
2020090312441700-DB1426D1DFD034027CECDE9C2DD914B8
2020090312443800-DB1426D1DFD034027CECDE9C2DD914B8
2020090312444600-DB1426D1DFD034027CECDE9C2DD914B8

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

@puked79 Thanks mate, I'll get to adding the button mappings.

from missioncontrol.

puked79 avatar puked79 commented on May 18, 2024

youre welcome ;) Seems like "home button" works, too - but its only registered for the fraction of a second - to fast for my eyes...

and thanks again for this great project! I love it!

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

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 0x3c value in the screenshots you posted. Maybe you could see if that or any other values change depending on the battery level or whether the controller is charging via cable.
hid_report_tool-xiaomi.zip

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.
MissionControl-0.1.0-xiaomi-experimental.zip

You can use this tool I made to help test the mappings.
ControllerTest.zip

from missioncontrol.

puked79 avatar puked79 commented on May 18, 2024

that was fast.

tested - unfortunately it does not work.
ControllerTest does not detect any button. The program itself and missioncontrol itself are working - i tested with a wii pro controller .
hid_report_tool blacks out. it does not crash, but shows nothing. When wiimote and the xiaomi gamepad are connected, it flickers and shows only values for the wiimote.

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

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.

from missioncontrol.

puked79 avatar puked79 commented on May 18, 2024

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?!

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

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 2717:3144. If that all checks out I'll make you a build with logging included so we can log the connection process.

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?

from missioncontrol.

puked79 avatar puked79 commented on May 18, 2024

I did on Aug. 27th ;P

edit: I checked, if data is send when home button is pressed. No - there is not. At least nothing shows up in the modified hid_report_tool.

mpwcRlZ
l2VVXGT

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

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 btdrv-mitm.log. Note that the log is wiped every time you reboot.

The logging introduces a fair amount of lag, so it's not recommended to leave this build installed outside of debugging issues like this.

MissionControl-0.1.0-debug-logging-xiaomi.zip

from missioncontrol.

pabermod avatar pabermod commented on May 18, 2024

photo_2020-09-03_17-26-53
It seems the first 4 Hex values are the same (last pro controller) And the 8 digits at the end

from missioncontrol.

pabermod avatar pabermod commented on May 18, 2024

btdrv-mitm.log
Not working with latest build

from missioncontrol.

pabermod avatar pabermod commented on May 18, 2024

Also when I try the hid report tool as soon as a I push one button the screen goes black

from missioncontrol.

pabermod avatar pabermod commented on May 18, 2024

I want to note that this gamepad has a gyroscope

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

@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).
MissionControl-0.1.0-xiaomi-experimental-silence-event.zip

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

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.

from missioncontrol.

pabermod avatar pabermod commented on May 18, 2024

from missioncontrol.

puked79 avatar puked79 commented on May 18, 2024

@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).
MissionControl-0.1.0-xiaomi-experimental-silence-event.zip

tested - makes no difference

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

Try this one. I think I was just stupid and forgot to actually create the controller handler XD.
MissionControl-0.1.0-xiaomi-experimental.zip

from missioncontrol.

puked79 avatar puked79 commented on May 18, 2024

It works :) - thank you!
a/b and x/y are reversed
hid_report_tool does not show anything at all

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

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.
All good. This build should fix it.
MissionControl-0.1.0-xiaomi-experimental.zip

Does this controller have a player led indicator or anything?

from missioncontrol.

pabermod avatar pabermod commented on May 18, 2024

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.
All good. This build should fix it.
MissionControl-0.1.0-xiaomi-experimental.zip

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

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

It does not have a player indicator. Can you map the "Home" button of the gamepad?

Oh, is it not working? Maybe I don't have the mapping quite right. Can you post the screenshot?

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

Try this one.
MissionControl-0.1.0-xiaomi-experimental.zip

from missioncontrol.

pabermod avatar pabermod commented on May 18, 2024

Home button not working with that latest version

photo_2020-09-07_17-32-28

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

Hmm that looks fine for the current mapping. How are you verifying the buttons are working? Did you try it with ControllerTest.nro?

from missioncontrol.

pabermod avatar pabermod commented on May 18, 2024

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

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

from missioncontrol.

pabermod avatar pabermod commented on May 18, 2024

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

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.
MissionControl-0.1.0-xiaomi-experimental.zip

from missioncontrol.

pabermod avatar pabermod commented on May 18, 2024

Now using the minus button works good as home button... So it seems the "Home" button is sending a strange event

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

@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.

from missioncontrol.

pabermod avatar pabermod commented on May 18, 2024

No, the home button is working as previously, quick flash of the last byte even when holding it

from missioncontrol.

ndeadly avatar ndeadly commented on May 18, 2024

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.

from missioncontrol.

pabermod avatar pabermod commented on May 18, 2024

it doesnt

from missioncontrol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.