0

I just exchanged my Samsung Galaxy Tab 2 7" (found to not work via this question I asked here: How to tell if an Android device has Open Accessory Mode) for a Acer Iconia A100 tab for the purpose of using the ADK and the open accessory mode. However, now that I have this tablet home, it is still not working! I tried it out of the box with 2.3 (nothing) then I performed the update to 2.3.1 and still got nothing! This is getting very frustrating.

The A100 is listed to work on several sites including this one here: http://www.whizzosoftware.com/forums/blog/1/entry-47-tablets-and-the-android-open-accessory-development-kit-adk/ as well as page 11 of the book "Beginning Android ADK with Arduino" (available on google books)

I cannot figure out why this isn't working. I set up everything according to here: http://developer.android.com/guide/topics/usb/adk.html and everything works perfectly until I get to the last step, under "Running the DemoKit Android application" step 8. When I perform this step the tablet never gets past the "please connect a DemoKit board" screen. I have the micro USB from the tablet plugged into the Arduino ADK board (with the firmware installed) and the ADK board plugged into my computer for power.

Does this tablet not work either? This is very annoying trying to get this to work. Thanks for anyone that can help.

The only possible areas that I might be doing wrong are when I am building the android application: under "Running the DemoKit Android application" step 5. It lists "For Build Target, select Google APIs (Platform 2.3.3, API Level 10)" To do this, I am right clicking on my project in eclipse, and selecting properties>android, and then selecting Google API's level 10.

Also, when I compile the firmware for the ADK board from google, the Arduino IDE gives me several error that are all syntax that need to be changed because of updating. I forget exactly what this was but it was changing some read and receive functions I believe.

Community
  • 1
  • 1
tknickman
  • 4,285
  • 3
  • 34
  • 47
  • Something to note, I am not using the Google ADK board with the attached accessory shield, I am just using an Arduino ADK board trying to simply establish a connection – tknickman May 09 '12 at 23:10
  • If you open the serial monitor in the Arduino IDE while you are plugging in the tablet you should see some human readable messages that. Did you ensure that your baud rate was set to 115200 in the serial monitor? – FoamyGuy May 10 '12 at 13:54

2 Answers2

1

Default Google's DemoKit is too complicated to have it as a starting point for ADK. You might want to try something simpler, say, https://github.com/yanzm/HelloADK - this worked for me.

There are telltale signs of what is happening at the ADK console - you might want to run arduino IDE or any other serial port monitor and look at messages that pop up at the serial output while you are connecting your Android device.

Also, be careful what sources you use to compile your firmware. This page gives a set of instructions that is more up to date than the page you used: http://labs.arduino.cc/ADK/Index

vt.
  • 436
  • 6
  • 12
  • Thanks for the answer, I tried this, but when I put the Arduino code into the Arduino IDE I get this error upon verification /Users/Home/Documents/Arduino/libraries/AndroidAccessory/AndroidAccessory.h: In function 'void loop()': /Users/Home/Documents/Arduino/libraries/AndroidAccessory/AndroidAccessory.h:65: error: 'int AndroidAccessory::read(void*, int, unsigned int)' is private helloled.pde:-1: error: within this context – tknickman May 10 '12 at 15:38
  • @jangoforhire: Use the fact that AndroidAccessory extends Stream class. Like this: `{ AndroidAccessory acc; Command *command = Command::read(&acc); } Command* Command::read(Stream *inputStream) { while (inputStream->available() < 1) { wait() }; int c = inputStream->read(); and so on and so forth}` – vt. May 10 '12 at 16:47
  • Ok I'm working on this. C isn't my favorite yet, but i'm getting there. The trouble line is this: if (acc.isConnected()) { int len = acc.read(msg, sizeof(msg), 1); so what should i change to? – tknickman May 10 '12 at 16:54
0

I was able to get both the demokit example and another example working using the ADK on an Acer Iconia Tab A100 running Ice Cream Sandwich 4.0.3 with an Arduino using the Circuits@Home USB Shield.

My setup sounds a bit different from what you are trying to do on the Arduino end but perhaps what I have done will help. I have documented what worked for me at http://digitalhacksblog.blogspot.com/2012/05/arduino-to-android-turning-led-on-and_29.html.

digitalhack
  • 446
  • 3
  • 6