Android Open accessory with LPC

In accessory mode, the external hardware act as USB host and android powered device act as USB device. Here I am using LPC1768 board as external USB hardware. So I have programmed the device as USB host. After enumeration process , we have to follow these steps to adhere Android Open Accessory protocol.

1.Get protocol version
2.Send identity string
3.Start accessory mode

1.Get Protocol version
We send control request 51(0x33) to get accessory protocol version.It may return 1(A0A 1.0) or 2(AOA 2.0).

2.Send Identity strings
Here we have to send manufacturer,model,description,version,URI and serial number to communicate with the accessory app.The send string control request is 52(0x34)

3.Start accessory mode
To start accessory mode, send control request 53(0x35).

Re-enumeration detects the device’s VID as 0x18d1 and PID as 0x2d00. PID varies according to its version.Please check various PIDs available at android website.

Now launch the app matched by identity strings.
Refer the following article for more details – http://dthoughts.com/blog/2015/07/15/monitoring-vehicle-parameters-via-android-accessory-application/

One thought on “Android Open accessory with LPC

  1. vvibin04 October 26, 2015 / 5:06 am

    Thanks. A good and very informative compilation. Last couple of days I was working on setting up the Android Head Unit simulator for Android Auto. I have compiled some of the key transactions happening over USB bus to explain this protocol in my blog. Just putting here as a reference ,if the same may be helpful to you.

    Cracking Android Open Accessory transactions

    Liked by 1 person

Leave a comment