Monday, January 15, 2018

usb on the go - How can I determine if my device has USB Host Mode (OTG) support?


Some Android devices can act as a USB host, so that you can use other USB devices attached to them. For instance, browse or import the photos stored on a camera from your phone, or copy files onto a USB memory stick attached to your tablet, plug a full-size USB keyboard or mouse into a tablet, or use an external GPS or wifi device.


How can I tell if my device can do this?



Answer



To use an attached USB device you need to have:



  • A USB OTG (USB On-The-Go) cable


  • USB Host Mode drivers loaded on your device

  • A version of the Android operating system loaded on that device that supports USB Host Mode

  • An Android device (eg phone or tablet) that has built-in hardware support for USB Host Mode

  • And finally there need to be drivers on your device, for whatever USb device you're plugging in.


Operating System


USB Host Mode support was introduced in Android version 3.1 (Honeycomb), so if you have Android 3.1, or newer installed on your device then you should have the necessary support for it in your OS, Android 4 also adds additional USB and OTG support. Also, many third-party ROMs add support for USB Host Mode to phones that have the hardware support, but don't have the necessary OS or driver support in the official operating system release.


Host Mode Drivers


Most devices that have both hardware support and a new enough OS will have the necessary drivers loaded to enable USB Host Mode, but some don't. You can find driver apps on the Play Store for some models that don't have built in drivers. Some models with 3rd party instructions and drivers available are:




Cable


You can't just use a normal USB cable. As these devices can act as both a USB "slave" device (for instance so that you can plug them into a PC and copy music onto your phone, or copy pictures off the phone) and a USB "host" (for example so that you can plug a USB memory stick into your tablet and copy files on or off it) they need some way to tell which they should act as at a given time.


A USB OTG (USB On-The-Go) cable is what is used to tell your device to act as a host, this is like a normal USB cable but it has one of the internal pins connected to Ground at one end to let that device know that it should act as the host (technically pins 4 & 5 are shorted to ground in an OTG cable).


Additionally, as most phones have micro-USB sockets, but most USB dongles have "full-size" USB plugs, as below many OTG cables have a male micro-B USB plug at one end, and a female USB-A plug at the other to convert between the different sized connectors.


Motorola USB OTG cable)
The Motorola Camera Connection kit, which is a USB OTG cable


USB OTG cables can be bought fairly cheaply on places like eBay or the Amazon marketplace, as well as many small electronics shops. You may also find that your device's manufacturer sells an official, branded one, often called something like a "Camera Connection Kit" or "USB Memory Stick Connection Cable". If you're brave you can also find various tutorials on the web on how to make your own OTG cable from a standard USB cable.


USB device drivers


When you plug your USB device into your Android phone or tablet it needs to know what that USB device is and what to do with it. For common devices, like USB memory sticks, or cameras that support PPTP or USB Mass Storage, these will often already be built into the OS. For other USB devices, like Wifi, 3G or Bluetooth dongles there may not be drivers pre-built into the OS, or only drivers for certain specific devices.


How to test everything together



There are some apps that can help you test whether you have all of the necessary hardware and software to do this, such as USB Host Diagnostics. Using it to test your device's capabilities is very simple



  • Install USB Host Diagnostics from the Play Store

  • Run it

  • Tap the Start Diagnostics link, and following the directions first ensure that you have nothing plugged into USB on your device and then plug a device (such as a USB flash drive) in when prompted


USB Host Diagnostics running


If everything works you should end up with a summary screen like this, showing firstly a few details about your device and the running OS, then letting you know whether or not your device says that it supports USB Host Mode, and then the all important final Verdict that lets you know whether testing the Host Mode access worked or not:


USB Host Diagnostics results screen


If everything is working and the app successfully detected your USB device (showing that your USB Host Mode is working) you should have "Yes"s in the ringed sections, and some details showing how much access 3rd party (ie non-built-in) apps have to the device. If not, there should be details there to help you track down where the problem is.



Alternatively, Chainfire, the author of USB Host Diagnostics, has a (long) listing of all the reports that people have submitted after running the test on their devices. You can look your device up in the list and see if people with your device and operating system version have passed all of the tests, or not. Have a look for your device here: http://usbhost.chainfire.eu/


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...