Overview

Google Glass can be controlled by voice command, touchpad or the Myglass App. However, I noticed that when you stay outside in winter, voice commands wouldn't work as well due to wind (and wearing a scarf!) and I find myself reluctant to take my hands out of my pocket and remove my mittens. So for winter use, I designed this remote to control Google Glass.

Components and Wiring

To build a remote, you will need a Bluefruit, several buttons, breadboard and wires. Also you need a power supply. You can use a Lithium battery or a 3xAA or 3xAAA battery pack to make it portable.
The wiring is pretty simple. For each button, one end needs to be connected to ground, and the other one should be connected to one key pin of Bluefruit. And you need to connect power to Vin and GND.

Remap keys

Before you use Bluefruit with Google Glass, the keys should be remapped to function keys to control Glass. We can use arrow keys to navigate items. Use ESC key to cancel and RETURN to select. Also we can use snapshot key to take a picture. Support for the snapshot report (and other consumer reports) is added in v1.2 but you can use regular keys in v1.0 or v1.1

You can use the graphical remapping sketch to map each key.
You can select input type, key type and key. In this case, it is "KEYBOARD","SYMBOL&FUNC" and "LEFTARROW". Then you click "ADD_KEY" button to add it.
Before you upload this mapping to Bluefruit. Make sure Bluefruit is paired to the computer you are using. You can press "SEND_MAP" to upload mapping. If you see "Key mapping sent successfully", you can hold the button on Bluefruit to unpair it with computer.
Now it is ready for Google Glass.

Pair Bluefruit with Google Glass

By default the Google Glass can only act as a slave device that be paired to your tablet or phones as an accessory. But it can also behave as a master device that search and connect to other devices.

This method is first revealed in Voiding Your Warranty: Hacking Glass session at Google I/O. If you want to go straight to see how it works, you can use this link.

In order to access to settings panel, first you need a working Android SDK, you can refer to this GDK tutorial.

Then you need to install two apps by typing following command to install them:

  • adb install Settings.apk
  • adb install Launcher2.apk

However Google did not release the two apks officially. But Jeff did some research on it and compiled these two apks and released them on his blog. You can either download from his site or download the following zip file.
After your installation of Settings and Launcher2. you can swipe all the way left to settings.
Tap your trackpad you will see the Launcher option. Do not check "Use default for this action"or you can not access the other option until you uninstall Launcher2.apk
In Launcher you will see the classic Android home screen. Click the All Apps button.
In All apps screen, you will see three Apps. "Glass Home" will take you back to Google Glass home screen. "Launcher" will show the Android home screen again and "Settings" will lead to settings panel.
In settings panel you can choose "Bluetooth" to pair Bluefruit. You can also go to "Display"->"Sleep" to keep screen on longer without interaction.
Then you can search and pair devices just like you are using a regular Android device.

Test on Google Glass

When Bluefruit is connected to Google Glass. You can press buttons and corresponding key commands will be sent to Google Glass. The following picture shows that I took a picture by press a button on Bluefruit.

Unpair Bluetooth devices

In google glass you can click an Bluetooth item to disconnect it. But there is no way to click the icon on right side to unpair that device in it's subscreen.
In order to prevent paired devices from piling up, I wrote a small app in eclipse that allow you to unpair Bluetooth devices. If you have "No Launcher activity found!" error in eclipse, you can:
Go to Run > Run Configurations. Then, under Launch Action, change it from Launch Default Activity to Launch; and select the activity listed in the dropdown. Hit Apply and try running the APK again.

When the app is running on Google Glass. You will see a list of paired devices.
You can choose the device you want to unpair and click it. An asterisk will appear on it's right side.
Then click "Unpair" button, the selected device will disappear, indicating it is no longer paired.
This guide was first published on Nov 09, 2013. It was last updated on Nov 09, 2013.