Interfacing Arduino DUE with android based phone

I want to connect my android based phone with arduino DUE through usb cable, not wireless, not bluetooth. Is it possible? If possible then give me some example code or something that can help me with it.

It is possible if your phone can work as a Usb host. This usually involves software but also some additional hardware (a cable or a pluggable module) provided by the manufacturer. If your phone has this capability you should be able to find Android programs that can talk over Usb using a serial protocol. Or you may go to the Android developer site and look for documentation and code examples. From the point of view of the Arduino there is nothing different between talking through Usb to an Android phone or a PC.

There is a mega2560 ADK (Android Development Kit???) It is the same as a regular mega2560, but it has a USB host controller on it to talk to Android 3.x.x devices. And of course there is a host of development stuff available.

spatula:
It is possible if your phone can work as a Usb host. This usually involves software but also some additional hardware (a cable or a pluggable module) provided by the manufacturer. If your phone has this capability you should be able to find Android programs that can talk over Usb using a serial protocol. Or you may go to the Android developer site and look for documentation and code examples. From the point of view of the Arduino there is nothing different between talking through Usb to an Android phone or a PC.

I guess you are right about the communication between arduino and PC or Android but i was asking about the plug and play capacity of android with Arduino DUE board. Thanks

afremont:
There is a mega2560 ADK (Android Development Kit???) It is the same as a regular mega2560, but it has a USB host controller on it to talk to Android 3.x.x devices. And of course there is a host of development stuff available.

Well i know about the arduino mega 2560 ADK thats why oi referenced it in the question. My question is about the new Arduino DUE board because I have to use DUE board not the arduino mega 2560 ADK. Thanks by the way.

There is the Arduino Commander, but it doesn't list the Due as a supported device: https://play.google.com/store/apps/details?id=name.antonsmirnov.android.arduinocommander&hl=en.

Another one to try is Android USB serial monitor lite: https://play.google.com/store/apps/details?id=jp.ksksue.app.terminal&hl=en.

MichaelMeissner:
There is the Arduino Commander, but it doesn't list the Due as a supported device: https://play.google.com/store/apps/details?id=name.antonsmirnov.android.arduinocommander&hl=en.

Another one to try is Android USB serial monitor lite: https://play.google.com/store/apps/details?id=jp.ksksue.app.terminal&hl=en.

Does it mean that there isn't any Plug-and-Play capacity of arduino DUE to connect with android based phone.

u09068ee:

MichaelMeissner:
There is the Arduino Commander, but it doesn't list the Due as a supported device: https://play.google.com/store/apps/details?id=name.antonsmirnov.android.arduinocommander&hl=en.

Another one to try is Android USB serial monitor lite: https://play.google.com/store/apps/details?id=jp.ksksue.app.terminal&hl=en.

Does it mean that there isn't any Plug-and-Play capacity of arduino DUE to connect with android based phone.

I have an Uno which doesn't have the USB host connections that the Due has. Presumably using the USB host port instead of the programming port, you could emulate any device. As I recall, there are libraries to emulate mice and keyboards. The question is what app do you want to use on the Android side and can it interact with USB devices.

MichaelMeissner:

u09068ee:

MichaelMeissner:
There is the Arduino Commander, but it doesn't list the Due as a supported device: https://play.google.com/store/apps/details?id=name.antonsmirnov.android.arduinocommander&hl=en.

Another one to try is Android USB serial monitor lite: https://play.google.com/store/apps/details?id=jp.ksksue.app.terminal&hl=en.

Does it mean that there isn't any Plug-and-Play capacity of arduino DUE to connect with android based phone.

I have an Uno which doesn't have the USB host connections that the Due has. Presumably using the USB host port instead of the programming port, you could emulate any device. As I recall, there are libraries to emulate mice and keyboards. The question is what app do you want to use on the Android side and can it interact with USB devices.

I am developing a custom app on android that has to interact with the arduino DUE board. Thanks for your reply.

u09068ee:
Well i know about the arduino mega 2560 ADK thats why oi referenced it in the question.

I guess I'm blind then. I mean, I see you mentioned the DUE; I just wanted to make sure you knew about the ADK stuff as you might be able to make use of some of it.

Now I'm curious: can I have this "plug and play" Arduino on my Mac? I would be ready to switch to Windows if that were the only option.
My Uno is seen as a comm device, it has something in the firmware that makes the Mac create a usb port with a serial terminal on top. I've tried linux and I still get a usb serial port. Didn't try Windows, I know it requires drivers, but I see people using COM3, COM4... so I guess it's the same.

I know the Leonardo is smarter and can emulate a keyboard or a mouse attached to a Usb host interface using a serial protocol, but that's the Leonardo.

The bottom line, I'm afraid, is that people like me are unaware of this "plug and play" stuff even if they are always plugging the Arduino to a Usb host interface and playing with it.

I have finally got the answer to my question here: http://arduino.cc/forum/index.php/topic,139279.15.html