Arduino Mega ADK and Sony Erricson Xperia Mini Pro X17i works (well sort off!)
Well After all the banging, thumping and moaning I have managed to get the Xperia Mini Pro X17i to communicate with the Arduino Mega ADK!
First was patching of the Arduino code aka firmware, that took a lot of work mostly due to running the 1.0.1 version of the Arduino programming environment. After editing loads of it then replacing the Google ADK files with the ones from http://www.circuitsathome.com/category/mcu/arduino/usb-shield I got the code to compile and upload but still couldn’t get the Xperia Mini Pro X17i to recognize it (well the phone charged but that’s it) I hit on an idea of using the Xperia live dock!
Powering everything up (mega using separate adapter) I connected the phone to the dock and “Unsupported accessory” message popped up, Yes its at least reading it in the liveware manager app. After looking back through the arduino code I found the answer in AndroidAccessory.cpp
The following lines
#define USB_ACCESSORY_VENDOR_ID 0x18D1
#define USB_ACCESSORY_PRODUCT_ID 0x2D00
Needed to be changed but to what I hear you ask? The VENDOR_ID and PRODUCT_ID are incorrect (this is stated but I just ignored it causing some of the grief) After a bit of google I worked out how to get my ID code in Windows 7.
Once I had my codes I changed the lines to this
#define USB_ACCESSORY_VENDOR_ID 0x0FCE
#define USB_ACCESSORY_PRODUCT_ID 0×0166
Recompiled and now it’s recognized as Supported Hardware! (This is just for the Sony Erricson Xperia Mini Pro X17i)
Now I need to learn how to modify the Android demo app to make it work!
Note to get the demokit app to work I had to edit the manifest file (see previous file) which solved the errors then I cheated and just suppressed/ignored the warnings and it compiled, unfortunately there a bug in it which is preventing the app from displaying properly or recognizing the board!
I hope this information will be helpfull to you out there also venturing into this field.