
Android Open Accessory Development Kit | Android Developers - atularora
http://developer.android.com/guide/topics/usb/adk.html
======
inoop
Been there, done that.

<http://code.google.com/p/microbridge/>

edit: a bit of technical background. We all know that most Android devices and
almost all phones really only support USB slave. This is mostly electrical,
their controller chips almost always support OTG or Host, but they simply do
not provide +5v on the USB bus to power an external device.

Hence in order to talk USB with your phone you had the option of rooting your
device and use OTG (if supported), or to make the accessory play Host. In the
latter case the accessory needs to talk the ADB (Android Debug Bridge)
protocol to the phone, which is precisely what MicroBridge did using exactly
the same hardware as ADK (Arduino + max3421e USB host controller). The ADB
protocol provides byte stream multiplexing over USB, meaning that your USB-
enabled microcontroller can tell your phone to give you a bidirectional byte
stream to TCP ports, running daemons like logcat, a shell, etc. To establish a
connection with a running app, that app simply listens on a TCP port, and the
MCU opens a byte stream to that port using ADB.

What ADK does differently however, is that it adds a new USB protocol to
Android. It previously supported three configurations: USB storage device,
tethering, and ADB. The new ADK protocol is much simpler than ADB and really
just only offers a single pipe with just reading/writing functionality. This
is much simpler to implement (although ADB wasn't exactly rocket science), but
most of all it's much cleaner and doesn't require the user to enable debugging
in the phone settings.

ADB implementations have sprung up recently for various microcontrollers, such
as PropBridge [http://robots-
everywhere.com/re_wiki/index.php?title=PropBri...](http://robots-
everywhere.com/re_wiki/index.php?title=PropBridge) for the propeller (which
also comes in a DIP package btw, really nice for hobbyists), and IOIO for the
PIC24: <http://www.sparkfun.com/products/10585>. These people will support the
new protocol as well, so I expect there will be quite a bit of hardware choice
in the near future.

------
mortenjorck
This is big, but it could be huge with one more element.

Right now, if you build some kind of appliance with the ADK, your market is
limited to Android users. You're making a device for which the UI can be
hosted on a user's mobile phone. But why does it have to be a phone? A proper
Android competitor to the iPod would be a start, but here's what I would see
as the game changer:

A $49 Android device with just a gigabyte or two of storage, no 3G, no camera,
and an older ARM CPU, that can simply become the dedicated screen for
something. You don't have to be an Android user and plug your phone into your
exercise bike; your bike (or anything else in your home or office) just has a
screen and a touch UI.

~~~
joezydeco
For $49 you're probably not going to get enough horsepower to run the whole
system unless you can get the volume large enough. OMAP3 or i.MX5 could do it,
maybe some of the later Chumby models could work.

------
mcpherrinm
This is a pretty big move. In the past, developing accessories for phones has
had a huge overhead for development, and weren't easily distributed as
expensive licenses from manufacturers were required, or users had to
root/jailbreak their device. Consider how Square changed the payments market
with their simple hardware device. Now we have the tools to allow more people
to begin experimenting. It's a huge opening for hobbyists and startups to
really get a great experience with making some hardware for Android. I'm
really excited to see what people can come up with.

------
fragmede
This is a nice, but I think it's a step in the wrong direction.

It would be much better if Google had simply mandated that starting with, say,
Android 3.1, all devices had to support USB OTG
(<http://en.wikipedia.org/wiki/USB_On-The-Go>) without needing to be rooted.

What I'd _really_ like to see is host mode being supported by Google from the
get go. Sven Killig managed to get that running on his Nexus One to great
effect. <http://sven.killig.de/android/N1/2.2/usb_host/>

Instead, we've running TCP, on top of ADB, running on top of USB.

~~~
inoop
Actually they don't use ADB but rather implemented their own USB protocol,
which is why it doesn't work on current devices. See also this rant here:
[http://romfont.com/2011/05/11/a-closer-look-at-googles-
open-...](http://romfont.com/2011/05/11/a-closer-look-at-googles-open-
accessory-development-kit/)

~~~
fragmede
Thanks for the link. I had wondered how multiple devices would work. (Plus,
it's nice to see that I'm not the only one who came to the same conclusion -
just add support for USB OTG.)

This whole ADK thing _reeks_ of hardware-done-by-software guys. (Which is just
as bad as software-done-by-hardware guys.) (I also hesitate to use the word
engineer in this case.)

The AT90USB micro-controller has the same AVR core as the Ardunio which
they're leveraging, and with LUFA, does _fine_ in OTG or USB slave mode, and
there are PICs that do USB if that's more your thing.

Electrically speaking, there is very little difference between a USB slave and
a USB master, but unfortunately that's not something that's correctable in
software.

Android is running Linux (specifically the kernel), which has drivers for a
number of things, including USB card readers, printers, numerous USB-serial
converters including FTDI, and other, more esoteric hardware too. Why re-
invent the wheel, or in this case, drivers?

~~~
inoop
As a software engineer I object to that! At least software engineers would
have thought their design through, instead this this whole thing looks thrown
together by a bunch of amateurs over the weekend. I think it's more a
testament of the 'there I fixed it!' attitude that's the cause of so much
Android-related WTFs in general.

As for LUFA, I'm working on a port of MicroBridge to AT90USB. I'll get working
on it as soon as I receive the dev board.

~~~
fragmede
You're right, so I updated my comment. :p

------
cjoh
Still need to crack the final step-- how does a hobbyist make an accessory and
get it to mass production. Kickstarter is one way, but I'm eager for JIT
Manufacturing... or something.

~~~
follower
Funny you should mention that.

I've been interested in that concept for a few years--the idea of "craft
consumer electronics": small run, customised to a particular niche that isn't
viable at large volumes.

I'd be really interested in finding people who were interested in exploring
this area. I've had some conceptual thoughts around solutions but nothing
concrete.

~~~
sahillavingia
<http://quirky.com/> is tackling that same space.

~~~
cjoh
The thing with Quirky is that they're still gatekeepers. I've got to go
through some pretty significant game mechanics. What would be useful is self-
serve small run manufacturing. Or a lendingtree.com model for manufacturing,
where you have a prototype and manufacturers bid on the project.

------
scotth
Could this be the beginning of a physical world where computers frequently
interact to provide rich and useful function?

I, for one, hope so. Can't wait to play with this.

------
toblender
Damn you google stealing my idea! <http://toblender.com/comic/real-wood-
knock/>

------
follower
This represents an intriguing intersection of two big tech trends.

I'm teaching an introductory Arduino workshop at OSCON (O'Reilly Open Source
Convention) again this year in July. Last year at OSCON Google had a big
Android workshop, I'm curious what impact this announcement will have on
interest in the Arduino workshop.

------
Jun8
This is awesome, it'll be a great boost to Arduino, too. I had many Android
developer friends who had never heard of the Arduino platform.

In addition to phones, this opens the way for customa add-ons to Google Tv
box.

------
orangecat
Combine this with the eye tracking demo and glasses with a heads-up display,
and you become a universal remote control.

------
daveman692
Any info on where to buy one of the hardware kits?

~~~
trotsky
That web page links to this for "buy the hardware components": <http://www.rt-
net.jp/products/rt-adk>

Though with machine translation I must admit I'm at a loss. Maybe they presume
3rd parties will step up to sell them on their own?

~~~
Aqua_Geek
> Maybe they presume 3rd parties will step up to sell them on their own?

The gerber files are included in the download on the page: <https://dl-
ssl.google.com/android/adk/adk_release_0506.zip>

Waiting for someone to jump on this...

------
jinushaun
Most exciting announcement at Google IO, IMO.

------
mikeknoop
Were there any announcements regarding NFC support at I/O?

