When Nintendo unveiled their newest console, the Switch, in January, much emphasis was placed on the "Joy-Cons", two small independent controllers that could each function separately, serve as half of a normal controller when paired together, or attach to the console for charging and handheld use.
While the Joy-Cons are designed to solely pair with Switch units, their wealth of features, including Kinect-style cameras that can import full scale devices into the game world, full gyroscopic and accelerometer controls on par with smartphones, and linear actuators that allow for the simulation of detailed, multi-body impact of textured objects within the Joy-Con, (known to Nintendo as "HD Rumble"), all combined with a low price point of $30 per hand, make them an ideal choice for VR developers looking to enhance immersion, as well as for other computer programs that would not be able to achieve these effects without costly peripherals.
What it does
This project is the first step in what will ultimately be a universal driver over Bluetooth, successfully using a handshake to pair with two Joy-Cons, receive button and position information and transmit haptic data.
How we built it
Prior to BitCamp, we had been involved in an effort to reverse engineer the Joy-Con's serial connections to the Switch when docked, and thus had information about the handshake and message parsing format, but not the meaning of individual bytes. At BitCamp, we used this information as a basis for establishing low energy Bluetooth communication with the Joy-Cons and then, through trial and error, managed to isolate the meaning of the bytes being sent in packets we intercepted between the Joy-Cons and the Switch itself.
Challenges we ran into
The data was intentionally masked and used timed signatures to prevent signal collision and easy spoofing, and as a result, fully accurate location information was almost impossible to gather, and HD rumble can be a bit hit and miss if transmission isn't perfect.
Accomplishments that we're proud of
It's always fun to reverse engineer stuff, especially a new transmission format!
What we learned
We learned a lot about how the Switch transfers data, obviously, but it also gave us some much needed experience reverse engineering protocols, especially when testing your guesses is either not readily available or doesn't provide any response at all. (The Joy-Con clam up if not addressed properly and sometimes even unpair.)
What's next for JoyCon Driver
Obviously getting the rest of the data mapped to what bytes represent it would allow for full and accurate transmission. Once we have that; we can use the Joy-Con like any other computer peripheral, which means getting it supported by Unity or something like that, so people can start using it.