Comments (28)
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.
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.
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.
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.
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.
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.
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.
I have to do a readme XD
from nintendo_switch_reverse_engineering.
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.
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.
I added some doc for the cli and libraries.
from nintendo_switch_reverse_engineering.
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.
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.
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.
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.
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.
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.
Actually, that seem very doable:
- I already have a WIP gamepad to mouse/keyboard mapper, you just need to update https://github.com/Yamakaky/joy/blob/master/gyromouse/src/main.rs#L113-L131 for the key presses. It also supports the dualshock, and https://docs.rs/gilrs could be used to add other gamepads. It doesn't support the ringcon which is very joycon specific, so that would need to be added.
- The virtual keyboard part seems easy, for example https://randomnerdtutorials.com/raspberry-pi-zero-usb-keyboard-hid/
I can guide you through it at https://github.com/Yamakaky/joy/discussions.
from nintendo_switch_reverse_engineering.
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.
@Yamakaky I feel that gyroscope and timestamp are fused,
from nintendo_switch_reverse_engineering.
What do you mean by that?
from nintendo_switch_reverse_engineering.
from nintendo_switch_reverse_engineering.
Enable IMU (6-Axis sensor) JOY CON FW 4.17 subcmd 40 03 Gyro ?
from nintendo_switch_reverse_engineering.
from nintendo_switch_reverse_engineering.
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.
@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.
@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.
Anyone has been able to pull calibration and step data from the ring?
from nintendo_switch_reverse_engineering.
Related Issues (20)
- compile a list of joycon drivers and modules from different languages? HOT 2
- How to solve Subcommand 40 02
- Is there a list of Clone controllers which you have found to work (or not work) when plugged into other hosts?
- HD Rumble is not on par with the Switch
- Pinout for the joycon rail flex cable specifically? HOT 6
- When all USB ports are not working on dock HAC-007
- Do you know anything about switch game cards? I'm trying to use reverse engineering in one HOT 5
- Enabled HID Gyro/Acc over Bluetooth
- Wired joy con wired status response expansion
- Joystick operating voltage HOT 1
- Payloads HOT 1
- Anyway to reverse A/B X/Y
- About Pro controller/Joycon LTK error ,ask for help
- How do I test the the joycon buttons with a multimeter
- [Nintendo Switch.com]
- Joycon not connecting to Switch, powering up or charging/PCB issue? HOT 3
- Joycon L&R PCB dimensions
- 8Bitdo Ultimate Controller doesn't work via Bluetooth on Linux
- Stick data decoding?
- Help with Joycon Issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nintendo_switch_reverse_engineering.