White Paper WP_001. Connecting Peripherals to an Android Platform

Similar documents
Technical Note TN_152. USB 3.0 Compatibility Issues Explained

Determining USB Peripheral Device Class

Application Note AN_385. FTDI D3XX Driver Installation Guide

Application Note AN_243. FT312D USB Host to UART Cable Application

Technical Note. TN_134 FTDI Android D2XX Driver

Application Note AN_149. Upgrading a passive DB9 RS232 Interface to an active USB Interface using an FTDI DB9-USB-RS232 Module

Application Note. AN_136_Hi-Speed Mini Module EEPROM Disaster Recovery

Application Note AN_242

Application Note AN_241. FTDI_AOA_HyperTerm_User_Manual

Future Technology Devices International Ltd. FTDI Drivers Installation guide for. Windows 7

Application Note AN_101. Submitting Modified FTDI Drivers for Windows Hardware Certification

Future Technology Devices International Ltd. Application Note AN_234. FTDI Drivers Installation guide for. Windows 8

Application Note AN_209. AN_209 PDIUSBD12 to FT120 Migration Guide

Technical Note TN_146. Creating Android Images for Application Development

Simplified Description of USB Device Enumeration

Future Technology Devices International Ltd

Technical Note. TN_132 Adding FTDI Devices VCP Driver Support to Android

Technical Note TN_158. What is the Camera Parallel Interface?

Application Note AN_299. FT800_FT801_Internal_Clock _Trimming

Application Note AN_185. Vinculum-II UART to USB HID Class Host Bridge

Application Note AN_276. FT800 Audio File Conversion

UMFT4222PROG FT4222 Programmer Module

Future Technology Devices International Ltd

Future Technology Devices International Ltd. USB NMC-2.5m. USB to USB Null Modem Cable. Datasheet

Future Technology Devices International Ltd. FTDI Drivers Installation guide for Windows XP

Future Technology Devices International Ltd. USB-Key. Datasheet

Future Technology Devices International Ltd. AN232R-02 FTDIChip-ID for the FT232R and FT245R

TTL-232R-PCB. TTL to USB Serial Converter PCB. Datasheet

Future Technology Devices International Ltd. Technical Note TN_101

Command Processor for MPSSE and MCU Host Bus Emulation Modes

Future Technology Devices International Ltd. USB to RS232 UART Serial Converter PCB. Datasheet

Future Technology Devices International Ltd. FTDI Drivers Installation guide for. Windows VISTA

FT2232H Mini Module. USB Hi-Speed FT2232H Evaluation Module. Datasheet

FT4232H Mini Module. USB Hi-Speed FT4232H Evaluation Module. Datasheet

Technical Note. TN_147 Java D2xx for Android

Future Technology Devices International Ltd USB TO RS422 UART SERIAL CONVERTER PCB. Datasheet. Document Reference No.: FT_000119

Future Technology Devices International Ltd. FTDI Drivers Installation guide for Windows XP

FTDI Chip. VM800P Datasheet Embedded Video Engine Plus Module. VM800P Embedded Video Engine Plus Module Datasheet Version 1.0

C232HD. USB 2.0 Hi-Speed to UART Cable. Datasheet

Application Note AN_254. FT800 Designs With Visual TFT

VDIP1. Vinculum VNC1L Module. Datasheet

USB Hi-Speed Serial/Hub Module. Datasheet

VF2F. USB Flash Disk File-to-file Transfer Vinculum Evaluation Kit. Future Technology Devices International Ltd. Preliminary - Subject to Change

TTL-232R. TTL to USB Serial Converter Range of Cables. Datasheet

Future Technology Devices International Ltd. Windows XP Installation Guide

C232HM. USB 2.0 Hi-Speed to MPSSE Cable. Datasheet

Application Note AN_250. Configuring FT313H Driver for Embedded Linux

Application Note AN_146. USB Hardware Design Guidelines for FTDI ICs

Future Technology Devices International Ltd. VF2F2. USB Flash Disk File-to-file Transfer Vinculum Evaluation Kit.

Future Technology Devices International Ltd

USB-COM422-PLUS1. Datasheet

Technical Note TN_105

Application Note AN_208. FT311D and FT312D Demo_APK_User_GuideFT311D and FT312D Demo_APK_User_Guide

Future Technology Devices International Ltd. USB to RS232 Serial Converter Range of Cables. Datasheet

The DB9-USB Family of. UART Converter Modules. Datasheet

USB-COM232-PLUS4. Datasheet

DB9-USB-RS232 Module. Male & Female. Datasheet

TTL-232R-3V3 USB to TTL Serial Converter Cable

USB-COM422-PLUS2. Datasheet

Vinco Development Module. Datasheet

Application Note AN_100. Using the FT232R/FT245R with an External Crystal or Oscillator

FTDI Ltd DS_US232R-10(R-100/500) USB to RS232 Adapter cable. Data Sheet

Application Note AN_252. FT800 Audio Primer

TTL-232R. TTL to USB Serial Converter Range of Cables. Datasheet

Application Note AN_113. Interfacing FT2232H Hi-Speed Devices To I2C Bus

Future Technology Devices International Ltd. FT311D

Leveraging the Android Accessory Protocol

Future Technology Devices International Ltd. UM245R USB - Parallel FIFO. Development Module. Datasheet

Application Note AN_180. FT232H MPSSE Example - USB Current Meter using the SPI Interface

GPS 35 USB. installation and quick start guide

Universal Serial Bus Implementers Forum EHCI and xhci High-speed Electrical Test Tool Setup Instruction

How To Use An Atmel Atmel Avr32848 Demo For Android (32Bit) With A Microcontroller (32B) And An Android Accessory (32D) On A Microcontroller (32Gb) On An Android Phone Or

An Analysis of Wireless Device Implementations on Universal Serial Bus

ICs. Modules. Cables. FTDI Chip USB Solutions BRIDGING TECHNOLOGIES.

IEEE /ZigBee USB Dongle

EPSON Perfection 1650/1650 PHOTO. Scanner Parts. Scanner Specifications. Basic Specifications. device Effective pixels

PT Mbps Powerline Adapter. User Guide

AN220 USB DRIVER CUSTOMIZATION

2 To 1 Serial (RS-232) AUTO SWITCH. AS-251S User Manual

PL-2303 (Chip Rev H, HX, X) USB to Serial Adapter Windows Driver Installer Manual

User Manual. USB2.0 to IDE and SATA Adapter Cable. Model: DA-70202

FAQ Sprint Mobile Broadband USB Modem 598U By Sierra Wireless

PL2303 USB-to-Serial Controller Android USB Host Solution (How to Connect PL2303 Device to Android Tablets & Phones)

Application Note AN_240. FT800 From the Ground Up

UC232R ChiPi Minimum Component FT232RL USB to RS232 Converter Cable

USB / Data-Acquisition Module NOW LEAD-FREE

USB to RS-422/485 Serial Adapter (ID-SC0911-S1/SC0A11-S1) User s Manual

USB Port Extender Kit

Quick Start Guide. GV-AS Controller

Pen Drive to Pen Drive and Mobile Data Transfer Using ARM

A-307. Mobile Data Terminal. Android OS Platform Datasheet

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

USB ENGINEERING CHANGE NOTICE

DATASHEET. ADAM Arduino Display Adaptor Module. Arduino Compatible Shield P/N: 4Display-Shield-FT843 For the 4D Systems 4DLCD-FT843 Display

Ways to Use USB in Embedded Systems

EPSON Perfection 2450 PHOTO. Scanner Parts. Scanner Specifications. Basic Specifications. US letter or A4 size ( inches [ mm])

Transcription:

WP_001 Connecting Peripherals to an Android Platform Issue Date: 2012-02-09 This white paper will describe some of the options for connecting peripheral accessories to Android OS based tablets/phones. The main focus will be the use of the Android Open Accessory Initiative. Use of FTDI devices in life support and/or safety applications is entirely at the user s risk, and the user agrees to defend, indemnify and hold FTDI harmless from any and all damages, claims, suits or expense resulting from such use. Future Technology Devices International Limited (FTDI) Unit 1, 2 Seaward Place, Glasgow G41 1HH, United Kingdom Tel.: +44 (0) 141 429 2777 Fax: + 44 (0) 141 429 2758 Web Site: http://ftdichip.com

Table of Contents 1 Introduction... 2 1.1 What is Android?... 2 1.2 Connecting peripherals... 2 2 Android Open Accessory Mode... 3 2.1 What is Android Open Accessory Mode?... 3 2.2 How a peripheral attaches to an Android in Open Accessory Mode... 3 3 Software Applications... 5 3.1 Connecting the software application to the hardware... 5 3.2 Data consuming applications... 5 3.3 Data producing applications... 5 4 Summary... 6 5 Contact Information... 7 Appendix A References... 8 Document References... 8 Acronyms and Abbreviations... 8 Appendix B List of Tables & Figures... 9 List of Tables... 9 No table of figures entries found.... 9 List of Figures... 9 Appendix C Revision History... 10 1

1 Introduction This white paper will describe some of the options for connecting peripheral accessories to Android OS based tablets/phones. The main focus will be the use of the Android Open Accessory Initiative. 1.1 What is Android? Android is a Linux based operating system that is becoming very popular in mobile devices such as phones and tablets. The processor in current generation Android platforms is typically ARM based with the OS being optimised to support the hardware on the platform. This means the minimum required drivers to support the platform hardware are included in the OS which is often locked by the device supplier to prevent users customising their OS. The OS is regularly updated with many new features being added with each release. Figure 1 shows the historical progression of Android releases. 2008 2009 2009 2009 2009 2010 2010 2011 2011 V1.0 V1.1 V1.5 V1.6 V2.0 V2.2 V2.3.x V3.x V4.x Cupcak e Donut Eclair Froyo Ginger Bread Honey -comb Ice Cream Sandwich Figure 1.1 Android OS releases 1.2 Connecting peripherals With mobile phones the concept of connecting peripheral accessories was rarely considered, but with tablets this is less likely to be the case. In conventional hardware such as laptops and desktops, there will be a wide variety of connectors and driver support for connecting peripherals such a mice, printers etc. With the mobile tablet where size, weight and power consumption are critical concerns there are less likely to be all these connectors available. Many Android platforms are now supplied with On The Go (OTG) USB ports, allowing for the USB port to be either a host or a device. Some of these OTG ports will be USB device only i.e. they can only connect to a USB host as a USB device. Some of the newer generation devices will be full OTG offering host and device capabilities. However the potential issue with the host port is that a particular peripheral may require a special driver to be loaded which may mean the owner of the platform has to ROOT their device to get the permissions to allow access for installing new drivers. Rooting a device may invalidate a manufacturer s warranty and is not really a task that a typical consumer could/should be expected to perform. Fortunately from version 3.1 (Honeycomb) onwards Android have provided a new and novel solution to the problem, called Android Open Accessory Mode.Features 2

2 Android Open Accessory Mode 2.1 What is Android Open Accessory Mode? Android Open Accessory Mode allows for connecting peripherals to an Android platform where the Android is the USB device and the peripheral (accessory) is the USB host. This is the complete reverse of conventional interconnect. This game changing approach to attaching peripherals allows for 3 key advantages: No need to develop special drivers for the hardware. No need to root devices to alter permissions for loading drivers. The power to use the port is provided by the peripheral ensuring the mobile device battery is not drained faster by the external hardware being attached. ANDROID DEVICE USB DEVICE USB HOST + POWER ANDROID ACCESSORY Figure 2.1 Android Open Accessory Mode Connection 2.2 How a peripheral attaches to an Android in Open Accessory Mode To connect to an Android platform in Open Accessory Mode the platform must first support the mode. This is true of OS version 3.1 onwards, but may also be available on OS versions as far back as 2.3.4 if the OEM has back ported the feature to this OS version. When an Open Accessory device is connected to the Android it must send a vendor request to the Android to enquire if the device supports Open Accessory Mode. This is the Get_Protocol command. If the reply is no then the communication stops there. However, if the reply is yes then the peripheral sends its own unique descriptor strings to identify itself. There is then another USB vendor request to enable the Open Accessory Mode and re-enumerate the Android device in this configuration. When enumerated as an Open Accessory Mode device there will be one USB BULK IN endpoint and one USB BULK OUT endpoint as well as the control endpoint. This interface will be full speed (12Mbit/s) USB allowing for data transfer in and out. 3

PLUG PERIPHERAL HARDWARE INTO ANDROID USB PORT VENDOR CMD: Do You support Open Accessory Mode? (GET_PROTOCOL) YES VENDOR CMD: SEND DESCRIPTOR STRINGS VENDOR CMD: ENABLE OPEN ACCESSORY MODE RE-ENUMERATE IN OPEN ACCESSORY MODE STOP NO Manufacturer: Model: description: version: uri: serial: 1 BULK IN EP 1 BULK OUT EP FULL SPEED (12MHz) START ANDROID APPLICATION Figure 2.2 Android Open Accessory Mode Enabling 4

3 Software Applications 3.1 Connecting the software application to the hardware Typically an application will connect to hardware via drivers. However Android Open Accessory Mode does not require users to install extra drivers. Each Open Accessory Mode USB host has a set of string descriptors that the Android OS is capable of reading. These strings will match an application on the Android OS. The application then uses these strings to auto start the application when the hardware is connected. The strings that must be sent are: Manufacturer: Used to declare the peripheral manufacturer. Model: Used to declare the hardware model. Version: Used to provide a version number for the peripheral. Additional identifier strings may also be sent: description: Used to provide a descriptive name for the peripheral uri: Used to provide a URL for obtaining more information from the internet. If no installed application matches the strings supplied, the OS will display a message box with a link to the web site specified in the URI string (if supplied). serial: Used to provide a serial number for the peripheral 3.2 Data consuming applications The Android OS is a full OS with ever increasing processing capabilities. Making full use of this power can be realised by adding peripherals to the basic Android device such as temperature sensors, pressure sensors and CANBus engine management controllers that will provide raw data to be processed on the Android platform itself. 3.3 Data producing applications The flip side to receiving lots of data for offline processing is to be a data producer controlling hardware. A typical example may be to send data to a printer to obtain hard copies of data or to make use of the GPS capabilities of the Android platform to then control a robot and move it into position. 5

4 Summary Android powered devices are so much more than just mobile phones. Unleashing the full potential is about adding peripherals (accessories) to the basic mobile device. By making use of the Open Accessory Mode, the development is simplified (no drivers) and the battery life is not compromised either as the peripheral must provide the power. There are already a few manufacturers waking up to this possibility, including FTDI, who want to make connectivity to the mobile platforms a reality and Open Accessory Mode may just be the future, delivered now. 6

5 Contact Information Head Office Glasgow, UK Future Technology Devices International Limited Unit 1, 2 Seaward Place, Centurion Business Park Glasgow G41 1HH United Kingdom Tel: +44 (0) 141 429 2777 Fax: +44 (0) 141 429 2758 E-mail (Sales) E-mail (Support) E-mail (General Enquiries) sales1@ftdichip.com support1@ftdichip.com admin1@ftdichip.com Branch Office Hillsboro, Oregon, USA Future Technology Devices International Limited (USA) 7235 NW Evergreen Parkway, Suite 600 Hillsboro, OR 97123-5803 USA Tel: +1 (503) 547 0988 Fax: +1 (503) 547 0987 E-Mail (Sales) E-Mail (Support) E-Mail (General Enquiries) us.sales@ftdichip.com us.support@ftdichip.com us.admin@ftdichip.com Branch Office Taipei, Taiwan Future Technology Devices International Limited (Taiwan) 2F, No. 516, Sec. 1, NeiHu Road Taipei 114 Taiwan, R.O.C. Tel: +886 (0) 2 8791 3570 Fax: +886 (0) 2 8791 3576 Branch Office Shanghai, China Future Technology Devices International Limited (China) Room 408, 317 Xianxia Road, Shanghai, 200051 China Tel: +86 21 62351596 Fax: +86 21 62351595 E-mail (Sales) E-mail (Support) E-mail (General Enquiries) tw.sales1@ftdichip.com tw.support1@ftdichip.com tw.admin1@ftdichip.com E-mail (Sales) E-mail (Support) E-mail (General Enquiries) cn.sales@ftdichip.com cn.support@ftdichip.com cn.admin@ftdichip.com Web Site http://ftdichip.com System and equipment manufacturers and designers are responsible to ensure that their systems, and any Future Technology Devices International Ltd (FTDI) devices incorporated in their systems, meet all applicable safety, regulatory and system-level performance requirements. All application-related information in this document (including application descriptions, suggested FTDI devices and other materials) is provided for reference only. While FTDI has taken care to assure it is accurate, this information is subject to customer confirmation, and FTDI disclaims all liability for system designs and for any applications assistance provided by FTDI. Use of FTDI devices in life support and/or safety applications is entirely at the user s risk, and the user agrees to defend, indemnify and hold harmless FTDI from any and all damages, claims, suits or expense resulting from such use. This document is subject to change without notice. No freedom to use patents or other intellectual property rights is implied by the publication of this document. Neither the whole nor any part of the information contained in, or the product described in this document, may be adapted or reproduced in any material or electronic form without the prior written consent of the copyright holder. Future Technology Devices International Ltd, Unit 1, 2 Seaward Place, Centurion Business Park, Glasgow G41 1HH, United Kingdom. Scotland Registered Company Number: SC136640 7

Appendix A References Document References Replace this text. List FTDI and external datasheets, application notes, website links and other documents. Notice the hyperlink in the example. AN_146 USB Hardware Design Guides for FTDI ICs Acronyms and Abbreviations Terms USB USB-IF Description Universal Serial Bus USB Implementers Forum 8

Appendix B List of Tables & Figures List of Tables No table of figures entries found. List of Figures Figure 1.1 Android OS releases... 2 Figure 2.1 Android Open Accessory Mode Connection... 3 Figure 2.2 Android Open Accessory Mode Enabling... 4 9

Appendix C Revision History Document Title: Document Reference No.: FT_000633 Clearance No.: FTDI# 279 Product Page: http://www.ftdichip.com/ftproducts.htm Document Feedback: Send Feedback Revision Changes Date 1.0 Initial Release 2012-02-09 10