Android OS Forum banner
1 - 3 of 3 Posts

· Android Beginner
332 Posts
Discussion Starter · #1 ·
Has anyone messed around with the Android AOA 2.0 yet? I want to send HID signals to Android (play, pause, skip track, volume) using an Arduino but the AOA page doesn't give much information. An example of how to send a skip track signal to Android would be the most helpful thing in the world to me.

Also, if someone can suggest a way to do audio out via USB to L/R analog RCA jacks for Android that would get my little project a huge leap forward!

The AOA 2.0 page

· Registered
1 Posts
I guess you would have already found your answer. Anyways here it goes. :)

Look into:

AOA 2.0 HID and Android Key Mapping (Look at HID Consumer Page (0x0c) section)

Steps to activate HID Class:

  1. Check AOA Version Number (Proceed only if its Version 2) [ACCESSORY_GET_PROTOCOL]
  2. Register HID Device with Device ID and size of Report Descriptor [ACCESSORY_REGISTER_HID]
  3. Send HID Report Descriptor [ACCESSORY_SET_HID_REPORT_DESC]

A Sample HID Consumer Report Descriptor:

0x05, 0x0c, // Usage Page (Consumer Devices)
0x09, 0x01, // Usage (Consumer Control)
0xa1, 0x01, // Collection (Application)
0x19, 0x00, // Usage Minimum (0),
0x2A, 0x3C, 0x02, // Usage Maximum (0x23C),
0x15, 0x00, // Logical Minimum (0)
0x26, 0x3C, 0x02, // Logical Maximum (0x23C)
0x75, 0x10, // Report Size (10)
0x95, 0x01, // Report Count (1)
0x81, 0x00, // Input (Data,Array,Absolute)
0xC0 // End Collection

Ex: If you want to send a "Play/Pause" command, send "0x00cd" as a Control Request as follows:

/* Control request for sending HID events.
* value: Accessory assigned ID for the HID device
* index: 0
* data the HID report for the event
1 - 3 of 3 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.