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 0x0166
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.
つづく
On the demokit app issues, I found the following:
– Firstly the issues with R not compiling which just requires using the right target
– If your board isn’t connected to a joystick the “init_joystick” function in the arduino board fails to run so you need to comment it out.
This worked for me. If you have problems with it recognising what board you are using you will want to check in res/xml/accessory_filter what manufacturer and model is setup us (usually Google Inc. and Demokit) and then you need to have the same values on your Arduino sketch for acc.start.
I am trying to find the time to write a guide on how to fix this. Give me a shout if you want to collaborate.
Thanks, when I have the time to look back into it I will do some more.
…..great I have