Giter VIP home page Giter VIP logo

Comments (28)

ringrunnermg avatar ringrunnermg commented on August 27, 2024 3

I have just made public a working implementation of the Ringcon to PC software - https://github.com/ringrunnermg/Ringcon-Driver. Any feedback would be great.

Also, good work Yamakaky, it took me months to get the data and it wasn't as complete as what you have got.

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024 1

I made some progress following #98. After configuration, the ringcon flex is sent instead of the accelerometer in the third IMU packet in the standard input report. The gyro and 2/3 of the accelerometersstays the same. I'm looking to replicate it in https://github.com/Yamakaky/joy, will post when it works.

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024 1

It works, you can run cargo run --bin joytk ringcon with a paired joycon. It shows the raw hex value from the ringcon. I can also read the number of offline flex (when you press the stick with the switch off), there is what seem to be a crc but I can't find how it works. I can only write a flex count if I already know the CRC. Here are some values I measured:
https://0bin.net/paste/t6RlxsgX#YR4iCrD-sO/UB1RWx2VY9cPBmJUP/Ira1S6QtrRpmg0. At 0x1f3/500, the ringcon auto turns off.

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024

The setup process is as follow: https://github.com/Yamakaky/joy/blob/master/joycon/src/hid.rs#L443. I don't know what most of these commands do XD.

from nintendo_switch_reverse_engineering.

Kurainu avatar Kurainu commented on August 27, 2024

Oh nice good to hear you got progress. I also wanted to try to make sense how to get the flex sensor data etc.
maybe i find some time this weekend to play around with the ringcon myself and hopefully get figure out something useful 😄.

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024

I recorded some traces, you can use my tool cargo run --bin joytk decode < trace/x.log. It filters out the rumbleonly output and full input reports, basically only subcommands.

from nintendo_switch_reverse_engineering.

Kurainu avatar Kurainu commented on August 27, 2024

I think i use your Tool and i try to get the relay/proxy thingy up and running that i can get a look at the packets in realtime or do my own trace.

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024

I have to do a readme XD

from nintendo_switch_reverse_engineering.

Kurainu avatar Kurainu commented on August 27, 2024

Yeah do it or i try and error my way Through it xD. or i try to use the python script from the repo in the #98

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024

You have to use the python script for capture, my tool only does the decoding part using my parsing lib.

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024

I added some doc for the cli and libraries.

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024

And I added a subcommand to proxy and record, all in rust! It's pretty raw so testing would be appreciated ;)

from nintendo_switch_reverse_engineering.

Kurainu avatar Kurainu commented on August 27, 2024

I tried the python script but i dont get the relay to send the packets from the Joycon/Ringcon through my Linux Laptop to my Switch. Its mostly Stuck at the SDP Adverstising but if it goes past it co conection to my Switch is made. Is it intended to work or i'm missing something? .
But i can Capture the packets from the Joycon to a log file and use your Rust Script to decode them. And i Test the proxy and record Thingy when i get home

The rest of my Remaining free Weekend i tried first to understand what your rust script sends to activate the ringcon but its a slow progress because i dont know rust that well. Because when i have those i can tinker with it in a language that i know better than rust :D. If you could send me those commands as bytes if would be Great and saves my quiet some time getting those @Yamakaky :)

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024

Sure, I wanted to add logging anyway XD

I did my joycon lib will structs everywhere which makes it very convenient to use, but can make it hard to figure out the exact bytes sent.

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024

I added full logging support, env RUST_LOG=debug cargo run --bin joytk ringcon monitor now show the raw reports \o/

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024

oooh, you found the crc table for the ringcon? nice! Out of curiosity, how did you find it?

And yeah, I see everyone using raw buffer manipulation and copy pasted 20 lines loops while I'm like https://github.com/Yamakaky/joy/blob/master/joycon/src/hid.rs#L477 ^^

BTW you can detect if the ringcon is plugged by reading the Connection Info field in the standard input report. See https://github.com/Yamakaky/joy/blob/master/joycon-sys/src/input.rs#L225 for the additional values. It seems there is only one accessory that plugs to the ringcon so a lot of it is guess work. See also https://github.com/Yamakaky/joy/blob/master/joycon-sys/src/accessory.rs for what I could find about the protocol.

I still have to do some testing on which subcommands are required. I have a tight schedule for now so it may take some time ^^

from nintendo_switch_reverse_engineering.

WitoTV avatar WitoTV commented on August 27, 2024

Do you guys think we could get this as a "raspberry pi zero w" USB-connected device?
Aka. presents itself as keyboard + mouse or controller?
Of course, some kind of desktop app would be needed to make a setup, select output type, bind actions, etc...

I kind of want to make that but all the buffer shenanigans are too much my front-end developer brain.
(I may do it but it may take forever to fully understand the whole buffer stuff)

aka. joycons - (bluetooth) -> pi -> (usb) -> pc/console.

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024

Actually, that seem very doable:

I can guide you through it at https://github.com/Yamakaky/joy/discussions.

from nintendo_switch_reverse_engineering.

hoverbird avatar hoverbird commented on August 27, 2024

Amazing work @Yamakaky and @ringrunnermg, I've been trying to get at this data (off and on, I'm no hardware hacker) for over a year with very little success... so excited y'all have really cracked this! 👏👏👏👏👏👏

from nintendo_switch_reverse_engineering.

xinzhuwei avatar xinzhuwei commented on August 27, 2024

@Yamakaky I feel that gyroscope and timestamp are fused,

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024

What do you mean by that?

from nintendo_switch_reverse_engineering.

xinzhuwei avatar xinzhuwei commented on August 27, 2024

from nintendo_switch_reverse_engineering.

xinzhuwei avatar xinzhuwei commented on August 27, 2024

Enable IMU (6-Axis sensor) JOY CON FW 4.17 subcmd 40 03 Gyro ?

from nintendo_switch_reverse_engineering.

xinzhuwei avatar xinzhuwei commented on August 27, 2024

@Yamakaky

from nintendo_switch_reverse_engineering.

Yamakaky avatar Yamakaky commented on August 27, 2024

I'm sorry @xinzhuwei but I'm not sure what you mean by that? You indeed have to call subcommand 40 with parameter 03, which I called MaybeRingcon here https://github.com/Yamakaky/joy/blob/2691f8c655213672eb385adaae5a073353a0177c/crates/joycon/src/hid.rs#L487.

from nintendo_switch_reverse_engineering.

xinzhuwei avatar xinzhuwei commented on August 27, 2024

@Yamakaky Yes, in mayberingcon mode, the data and timestamp of the gyroscope change. I don't know the change protocol. It seems to be related to subcommand 5C

from nintendo_switch_reverse_engineering.

xinzhuwei avatar xinzhuwei commented on August 27, 2024

@Yamakaky
Yes, in MaybeRingcon ;
In the Bluetooth data report, is the gyroscope data related to the time stamp?
but ,I don’t know the protocol of gyroscope data and time stamp

a1306440000000ec877bde67790a8dfd3e0212101700f6ff0c006dfd7e010f101200fcfff0ff55fd5900191011000000e4ff

from nintendo_switch_reverse_engineering.

german77 avatar german77 commented on August 27, 2024

Anyone has been able to pull calibration and step data from the ring?

from nintendo_switch_reverse_engineering.

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.