Hi
I'm working with the latest freescale android version 4.2.2 on a custom board with i.MX6DL. Every time I tried to connect the Arduino 2 board through USB OTG port android detect it as media device. Debugging the kernel code I found that enable debug messages inside the file arcotg_udc.c cause android to detect Arduino as USB accessory as shoud correctly be. It seem the debug messages introduce some delay that allow the device to be detected correctly. To be more specific the problem is the indetification string (manufacturer, model, description and so on) sent from arduino device are not received correctly and I can see this error in the terminal:
acc_complete_set_string, err -108
Since android can not know the type of device assign media device as default. Currently I'm not able to figure out the problem yet.
Someone have a suggestion for this issue?
Thank you
Hi ,
If you can't connect to i.mx android 4.x with accessory. we suggest you modify your try accessory mode as below:
send GET_PROTOCOL_VERSION
delay 1ms
send STRING_VENDOR,
delay 1ms
send STRING_NAME,
delay 1ms
send STRING_LONGNAME,
delay 1ms
send STRING_VERSION,
delay 1ms
send STRING_URL
delay 1ms
send STRING_SERIAL,
delay 1ms
#ifdef USE_USB_AUDIO
send ACCESSORY_AUDIO
delay 1ms
#endif
send ACCESSORY_START
delay 1ms
The delay time ,you can adjust it for your accessory .
Fabiof
Has your issue resolved? If yes, please close the DI, othewise keep working with Shaojun with your issue. We will clsoe a DI if no activity in 3 days.
Thanks,
Yixing
You need to check the Arduino 2 board usb timing, or change usb cable.
The usb accessory function has been verified on FSL K60 and K70 devices.
Hi
Both i.MX and Arduino are in the same board, no cable is necessary. Arduino communicate with android using interna firmwarre based to Arduino development libraries. I found a workaround that seem to work into the android code but I really don't like it. When you said "usb timing" what do you eman exactly? I need to modify something into the arduino firmware code?