manual/generic/android/open-accessory
Description
Open accesory validation
Maintainer
- botao.sun@linaro.org
OS
- android
Scope
- functional
Devices
- panda
- panda-es
- vexpress-a9
- vexpress-tc2
- arndale
Steps to reproduce
- Execute the following commands to setup test environment on host PC # apt-get source libusb # apt-get install libusb-dev # apt-get install libusb-1.0-0-dev
- Follow instructions on the below webpage to set up a device for development and install Android Eclipse: http://developer.android.com/sdk/index.html#ExistingIDE http://developer.android.com/tools/building/building-eclipse.html
- Download the accessory applications C code as a template from the below link: http://android.serverbox.ch/wp-content/simplectrl.c
- Identify device PID and VID no using 'lsusb' command
- Change into the code (siplectrl.c)the VID & PID into the device appropriate VID & PID
- Connect the device using USB mini A to USB with host
- Cloning the openaccessory project from here: http://staging.git.linaro.org/people/soumya.basak/accessory.git
- Run eclipse goto File > Import Select Android and Existing Android Code into Workplace > Next
- Browse the root directory
- Select the Project root directory 'Right Click' and Run As > Android Application
- It will automatically install & Launch the app into device
- Run gcc simplectrl.c -I/usr/include/ -o simplectrl -lusb-1.0 -I/usr/include/ -I/usr/include/libusb-1.0