Global Sources
EE Times-India
Stay in touch with EE Times India
EE Times-India > Embedded

Designing USB device with Android framework

Posted: 05 Dec 2014     Print Version  Bookmark and Share

Keywords:Android  USB  Compatibility Test Suite  Linux kernel  RFC2119 

When it comes to USB, an Android device can operate in two modes—USB device mode or USB host mode.

USB Device Mode
When an Android device is connected to a host PC using USB, as illustrated in figure 1, the Android device is said to be in USB device mode and power is sourced from the host PC USB port. (A device that needs more power than the host can provide should have its own power source.)

USB Host Mode
When a USB device is connected to an Android device, as illustrated in figure 2, the Android device is said to be in USB host mode, and the Android device has to supply power to the connected device. An Android device functioning as a USB embedded host or as an On-The-Go (OTG) host must supply 5V/500mA of power when the connected device is USB bus powered.

 Android device in USB device mode

Figure 1: Illustration of an Android device in USB device mode.

 Android device in USB host mode

Figure 2: Illustration of an Android device in USB host mode.

There is also a unique Android USB setup, which was introduced during the Honeycomb version of Android, named the USB accessory mode.

USB Accessory Mode
In USB accessory mode, an Android device that is in the USB device mode can manage external devices. This ability is achieved by connecting the Android device to an external embedded accessory device, which acts as a USB host. The Android device goes to USB accessory mode in order to manage devices that connect to the accessory device. Figure 3 depicts Android accessory mode with a simple illustrative example of managing a camera from an Android device using an accessory device. Accessory mode is explained in detail in Chapter 5 of the book, which will provide you with a better understanding of the process.

 Android device in USB accessory mode

Figure 3: Illustration of an Android device in USB accessory mode.

The USB section of Android CDD defines which USB functionalities have to be supported in the host and device modes. Table 1 and Table 2 capture the requirements when an Android device acts as a USB device or as a USB host.

 USB Device Requirements

Table 1: Android CDD 4.4 requirements as defined in USB Device Requirements.

Existing and new devices that run Android 4.4 are very strongly encouraged to meet these requirements in Android 4.4 so that they will be able to upgrade to future platform releases.

 USB Host Requirements

Table 2: Android CDD 4.4 as Defined in USB Host Requirements.

 First Page Previous Page 1 • 2 • 3 • 4 • 5 Next Page Last Page

Comment on "Designing USB device with Android fr..."
*  You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.


Go to top             Connect on Facebook      Follow us on Twitter      Follow us on Orkut

Back to Top