At the Google IO Conference in May, the Android team unveiled a few exciting features for connecting Android devices to the external world. USB Host capability, for instance, gives a device the ability to power and connect to USB input devices such as keyboards, mice, and joystick controllers. USB Accessory support, by contrast, allows the Android device to behave as an Accessory, so that another device can be the Host. This will allow you to plug your Android device in to a piece of hardware and communicate with real-world components like sensors, motors, etc.
At IO, they also demonstrated (and gave away) the Android Development Kit, or ADK. This is an Arduino Mega board with a USB Host chip as well as an Android Demo Shield, designed by Google to demonstrate a variety of inputs and outputs. For inputs the board has 3 pushbuttons, an analog joystick, a capacitive touch sensor, a light sensor and a temperature sensor. Outputs include RGB LEDs, relays, and some custom servo outputs.
When I went to Maker Faire in late May, I managed to get my hands on one of the ADK kits. Unfortunately my phone is stuck waiting for the long upgrade cycle of Samsung and AT&T, so it’s still on version 2.2, and doesn’t support accessory mode.
Recently, I picked up an Android tablet – an Acer Iconia Tab A500, with Honeycomb (3.1), which should give me the green light to begin developing. However, I have run into some trouble getting the ADK to talk to my device.
First the app would simply crash with a Force Close error. There were some class issues – the demokit app references the 2.3.4 library com.android.future.usb which doesn’t exist in Android 3.1. After changing them to android.hardware.usb the app would at least run and get to the “please connect a DemoKit board” screen. (thanks to this post on StackOverflow for noting the API changes)
So now the app runs, but when I plug in the ADK board, the app doesn’t recognize it. The Arduino environment doesn’t provide a whole lot of debugging tools, you’re pretty much stuck putting debug print statements everywhere in the code typing as much as possible to the console. But I’m finding some kind of protocol error when it tries to address the Android device. I haven’t been able to find much documentation on what the underlying AndroidAccessory and Usb classes do, and what a protocol error 5 might mean, or if anyone else has encountered and gotten past this problem.
And this brings me to the title of this post. There’s really not much out there when it comes to knowledge or documentation on the Android Open Accessory development. Google hasn’t changed the ADK release since May (this includes the ADK Arduino code, the Android app, or anything). They’ve updated some of the documentation but there are quite a few invalid URLs in there, and no further demo code of any kind. There’s no official word on what devices support Accessory mode. None of the tablet manufacturers references it on their spec sheets. Google gave away a Samsung Galaxy Tab to the attendees of IO, but it appears that even that device doesn’t support Accessory mode. From the 3.1 documentation it would appear that support is built into the software, so all 3.1 devices should work, but that doesn’t seem to be the case.
There also doesn’t seem to be much in the way of “unofficial” support, from bloggers, developers, techies and the open source community. Sure, it’s been out for less than 3 months, so you might want to give some slack, but Google is used to early adopters (over 10 million users on Google+ in only two weeks!). Besides, they gave out tablets and ADKs at a developer conference, full of people eager to dive in and start working, right? Where are the demos, or even the youtube videos of people doing anything with the ADK? (Ok, I did find one guy)
But the lack of information out there is almost overwhelming. Because of the lack of information, I can’t tell if I’m doing something wrong, or if the Acer tablet doesn’t support accessory mode. I can’t get an answer from Acer, I can’t find any info from Google (and it’s not like they have a support department I can email). The only real thing I can find is that the Motorola Xoom does support accessory mode – in a recent Open Call for Google Developer Day, Google had a challenge to give away free tickets to international developer days just for the ADK, and the requirements list “You must have access to a Nexus S, Nexus 1, or Xoom.” So the Xoom supports it. But nothing else? Or is the Xoom the only one that Google likes? (then why did they give away Galaxy Tabs?)
Anyway, if anyone has an answer or some links to share, I’d appreciate it. I’ll spread any information that comes my way.
(On a side note, I’ve also got an FTDI USB Host chip (VNCLO-START1) which is not Arduino-based, but I was told it will also work with Open Accessory. I haven’t started messing with it yet, but we’ll see.)
Update: The Acer Iconia Tab A500 does not support Accessory mode.
An Android Developer at Google responded to my question on StackOverflow, indicating “we have been in touch with Acer about this issue and a fix is forthcoming”.
I also received a response from Acer Tech Support:
”This issue was sent to our engineers. The unit currently does not support USB Accessory mode; however, we are planning to release an update that adds this functionality. Unfortunately, we are unable to determine when this update will become available. I apologize for the inconvenience.”
If they contact me with an update I’ll post it here…
Useful links:
Android Open Accessory Documentation
http://developer.android.com/guide/topics/usb/accessory.html
ADK Documentation
http://developer.android.com/guide/topics/usb/adk.html
Android documentation android.hardware.usb
http://developer.android.com/reference/android/hardware/usb/package-summary.html
Hey there!
Coincidentally I am tinkering with the VNC2 and A500 too. It looks very much like the USB Accessory protocol is not supported (at least device side) for the A500.
With the VNC2 I get my Nexus S to launch an Activity when connecting the VNC2 (actually the intent message disappears after a few seconds, but it’s a start). Furthermore you can find logcat messages that state “UsbService … blabla” which do not even appear on the A500. My best guess is that Acer left out that framework part for whatever reasons…
Long story short: I had to switch to a 3.1 Tab since the “future” packages seem to have issues with the VNC2 and found myself with the A500 having issues with the entire framework stack… join the club 😀
Regards
Manuel
old topic here, but thought i’d post a note anyhow. I have one of the USB ADKs from google io/2011 and a galaxy tab 10.1 also from google io. Early on the galaxy tab did not have 3.1, and usb host mode was not possible. (and yes, this was a disappoint me to me also.) At some point it got 3.1 (but not touchwiz). Recently, I ~finally~ got around to hooking up the ADK to the tab again (and re-installing eclipse, android development etc). Long story short — the Galaxy Tab _does_ run the demokit app, and talks to the google ADK just fine. I did have to modify the demokit app to not use the 2.3.4 “future” wrapper classes, and also the manifest to not _require_ the library.
airtight container to keep it from getting stale, or refrigerate to keep it crisp and fresh tasting.YOUR SHOPPING LIST: Raw Peanuts IN THE PANTRY: Garlic Vegetable Oil Kosher Salt INGREDIENTS 4 cups R…about 1-2 minutes. 3 Add the peanuts and cook for 7-8 minutes, or until the peanuts are medium