Doing things even more serious.

Previous chapters of “How I hacked Google Daydream controller”:

(Part I) Reversing and making it compatible with Apple iOS devices.

(Part II) Developing compatibility across multiple platforms.

(Part III) What about using two controllers at same time?

(Part V) Ghetto positional tracking.

The future of virtual reality is mobile. Several sources report that the Samsung Gear VR headset powered by Oculus is the mobile VR platform with the highest adoption. However, on this platform, mobile virtual reality experiences still don’t feel as immersive as they should. There are several reasons for this, one of them is the absence of a cross-platform high-performance controller.

From a developer stand point, this situation gives you a hard time in implementing viable solutions for compelling mobile VR experiences.

On the other hand, there is, of course, the Google Daydream controller. It is a great product, fluid, responsive, with a beautiful design and good battery life, but… It was born with an armored protocol (until this hack) and is only compatible with its own platform which struggles to find wide adoption as it is compatible only with very few devices.

“To be open source, or not to be open source, that is the question” (sorry Shakespeare)

This is a limit that cannot be ignored, especially, by the developers. “The more open you are, the more adoption you will achieve”. This way of thinking inspired me to hack the Google Daydream controller as I did.

When Google launched its controller and its platform adorned with an excellent explanatory reference, it inexorably laid the mobile virtual reality guidelines, opening the way to all its successors.

But now we try to deal with all the above limitations: consider a mobile-oriented Unity3D developer, for example, who wants to develop a videogame or virtual reality experience and publish it. If he decides to adopt the Google Daydream controller as the main input system, he would find himself forced to make it available on Android 7.x smartphones. Only a few devices could use it, and that’s a shame, especially when you consider that Unity3D was born as a cross-platform engine to allow you to create something portable across multiple platforms such as iOS and Android.

So, did I mention the compatibility of Google Daydream controller with the Samsung Gear VR headset?

Surprise, surprise…

Google Daydream Controller Hacked (Running on Samsung Gear VR compatible smartphone through Unity3D)

What’s going on here?

My challenge in breaking the Google Daydream controller chains, as indeed my propaganda to make it open source, had to continue. So I decided to bring my hack to the next level: to extend its compatibility to Unity3D and make it universally compatible. I wanted to make it run not only on iOS, but also on ALL the unsupported versions of Android (≥4.4 KitKat, according to Bluetooth LE compatibility).

Ok, but… How?

First of all, I refactored the source code of my first hack in which I characterized the Google Daydream controller specifications in the ad-hoc JavaScript class. Later, I ported in C# both the decoder (through which I interpreted the original BLE packets) and also the AHRS system (that takes care of 3-axes tracking for the absolute orientation).

Nightmare driver architecture: making Google Daydream an universal controller.

After importing a 3D model of the Google Daydream controller inside Unity3D IDE, I created a “Nightmare.cs” script and I assigned it to the game object. This driver abstracts the low-level communication interface of the bluetooth device via native plugins (for both iOS and Android). It takes care of both scanning and pairing processes as well as communicating data via the available channels.

Once the handshaking procedure is finished, it takes a few seconds for the driver to find the bluetooth device. Finally, I was able to interact with the Google Daydream controller in a totally smooth and responsive way.

Google Daydream Controller Hacked (Running on iOS through Unity3D)

Do you think you have missed something along the way? Reading previous chapters of “How I hacked Google Daydream controller” may will help you to understand how things began:

(Part I) Reversing and making it compatible with Apple iOS devices.

(Part II) Developing compatibility across multiple platforms.

(Part III) What about using two controllers at same time?

(Part V) Ghetto positional tracking.