Wednesday, February 1, 2012

Android USB Host Mode (OTG)

I want to demonstrate Android's USB Host mode today. Some of you might know it as OTG or USB On The Go. This allows you to plug portable devices like flash drives, keyboards, mouses, etc to your phone directly via USB! Anyways, before you go any further, please note that I have a Galaxy Nexus and was using this OTG cable. Please also note that just because this cable worked for me, does not mean it will work with other phones. If you have a Galaxy Nexus, this will most likely work, if you have another model, go Google for one or try this one, it's up to you. The best way is probably to buy one, if it doesn't work, get another. They are pretty cheap usually just a few dollars. Mine was under $2 with free shipping. You can click on the images to view the full size.

 Here is me plugging in a SD card via a SD to USB adapter on the OTG cable. Even though this feature is already built-in to the Android OS, Google haven't really released a way for the partition to be mounted. To solve this problem, get StickMount from Android Market. Root is required to do this. (Who doesn't have a rooted Android these days. XD) This method can be used for regular flash drives or external hard drives (needs to be self powered). Obviously StickMount is an unofficial way of mounting the partition and still have bugs. For me, I got no issue reading from the flash drive but crashes when I tried to write. Anyways, you need a File Explorer to be able to view the contents after StickMount mounts the partition.

Android already have native support for USB keyboards. No need to install anything else, your device should pick up on it once you plug it in. Anyways, just make sure you focus on a text box before you start typing. Also, the arrow and and enter keys works kind of like a trackball.

Android also have native support for USB mouse! Once you plug on your mouse, a small cursor will appear on your screen. Left and right clicks simulate you touching the screen. The scroll wheel scrolls up and down on webpages and Facebook. It also makes your home screen go left and right. 

 This is one of the features Canon EOS owners will like. You can connect your DSLR via USB to your Android phone and use it as a remote shutter release. Just install Remote Release from the Android Market (Free App) or DSLR Controller (BETA) from the Android Market (Paid App) and you can control all sorts of functions on your camera directly from your phone! This includes viewing Live View from your phone, adjusting the ISO, Shutter Speed, Aperture, etc... 

Anyways, these are just a few examples of what you can do with OTG. Go get yourself one if you love messing with electronic stuff. LOL I also heard you can plug multiple devices too with a powered USB hub, I didn't try it out yet because I don't have one. I tried a passive USB hub and it didn't work... Not enough power? Anyways the other surprising thing is the Galaxy Nexus battery only outputs 3.8v, but I measured 5v on the OTG after plugging it in. I think there might be a small step up transformer inside the phone. Either way, this is great as there will be a lot of uses for this. I hope more smartphones incorporate features like this.