Looking-Glass / JoyconLib

Joy-Con library for Unity.
MIT License
467 stars 91 forks source link

Switch ringcon compatibility. #37

Open l337Rooster opened 4 years ago

l337Rooster commented 4 years ago

Any ideas on how we might be able to get ring con compatibility to work. I am a bit new to this, but I took some time to read through JoyCon.cs and some of info on github (excuse my ignorance if anything I write sounds off).

I ran the demo with my switch joy con and attached the ring con. I hopped that the ring con tension sensor might report it as one of the exiting analog inputs. But that doesn't seem to be the case after checking the unity inspector.

Perhaps the ring con tension data is available on the HIDapi, if so we might be able to process those bytes coming into the report_buff that JoyCon.cc. We may need to request a longer buffer from HIDapi? Or issue some other request to it? If possible, any idea where we might find some details on how to decode that new data off the buffer?

Maybe its not possible to do this without updating the HIDapi as well? Perhaps HIDapi needs an update as well to even pull in this new data?

I do recall my switch issuing a "controller update" when I setup Ring fit. So perhaps something new is going on and HIDapi also needs an update?

Otherwise, perhaps the library you use to get the report_buffer needs to be updated as well.

Is there any homebrew software elsewhere that anyone knows of using the ring con yet?

Thanks for taking a look. Any pointers would be helpful :).

MrWater98 commented 3 years ago

Do you have any progress on this problem. I am also curious about this question.

l337Rooster commented 3 years ago

I forget where it was. But somewhere on GitHub there was an example that used a ringcon. But it was not for unity

I looked at the unity joycon example. And the code reads and decodes data off of a buffer. Presumably the ringcon data is just encoded differently. I didn't spend much time here. But dumping and trying to decipher the bits may work. Looking at how the non unity example may have insights.

That's how I guess one could proceed and figure it out

On Tue, Aug 25, 2020, 8:05 PM Narcissus2 notifications@github.com wrote:

Do you have any progress on this problem. I am also curious about this question.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Looking-Glass/JoyconLib/issues/37#issuecomment-680466902, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHDDO3MDFTJCWLO7VBSPY5DSCR3WTANCNFSM4OXUZB5Q .

MrWater98 commented 3 years ago

If you find that example, you could put it here.

I have tried to read https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering but I have no idea whether there are any related theories and steps to crack this bit of Bluetooth signals.

pepijnmm commented 3 years ago

Seems that the people that got it working are using the titan two https://github.com/Minyus/RingFit_MegaMan https://github.com/SuperLouis64/RingfitAdventure-BotW-Mod We know it is a flex cable. At least according to https://www.youtube.com/watch?v=RRX7Ds0e2F8 Mis this helps haven't looked at it yet: https://switchbrew.github.io/libnx/ringcon_8h_source.html