I read the Android Open Accessory Development Kit and I noticed that:
The Android 3.1 platform (also backported to Android 2.3.4) introduces
Android Open Accessory support, which allows external USB hardware (an
Android USB accessory) to interact with an Android-powered device in a
special "accessory" mode.
So, the Arduino Mega 2560 ADK is supposed to work with android device above 3.1? 'Cause I tried to make it work, but my device is currently 2.2.1, so i guess that's why it wasn't working...
Despite that... Why is the IOIO board working with the 1.5 device? Because the IOIO is also based on the Android Open ADK?
Does anyone have a clue...?
Or is there any way the Mega ADK is able to communicate with android 2.X...?
it depends on what arduino libraries do you use to connect the arduino to android. as far as I know... Arduino Mega 2560 ADK has an USB host interface and can communicate starting with android 2.2.3
you can check Google's ADK documentation
Related
I have had the most frustrating time trying to connect Arduino Mega ADK board to a JellyBean (Android 4.1.1) tablet. The USB host library from Android ADK does not work for the Arduino Mega ADK board, and the alternative library ArduinoADK-beta-001 from http://labs.arduino.cc/ADK/AccessoryMode does not seem to be available any more (link broken as of November 2013).
I managed to compile some sample sketches on the Arduino Mega ADK using the modified ADK library by circuitsathome.com, which is available from Github at https://github.com/felis/USB_Host_Shield_2.0, but the board then does not communicate with the 4.1.1. Android tablet. Specifically, the tablet recognized that the USB has been connected, but could not communicate with the board. Probable reason being that the JellyBean uses version 2 of the ADK protocol, which is not supported by the USB host library.
I have following questions:
1) has anyone suceeded in connecting the Arduino Mega ADK board with a JellyBean Android device?
2) If yes, which arduino libraries have been used? Where can I currently find the ArduinoADK-beta-001 (or it's successor).
Any feedback is highly appreciated, Ondrej Votava
I know it is too late. But this might help. I had similar issues for the past few weeks connecting and communicating the mega adk and Android. As I got succeeded now, I wrote blog posts which might help you and others with similar issues. I did run the application on Kitkat and Lollipop without any issues, but not sure about Jellybean. Here are few changes that are to be made to make the android application work on most of the devices.
Change import com.android.future.usb.UsbAccessory; to import android.hardware.usb.UsbAccessory;
Change UsbAccessory accessory = UsbManager.getAccessory(intent); to
UsbAccessory accessory = (UsbAccessory) intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY);
And Here is the link to the blog post http://blog.srichakram.in/2015/09/arduino-mega-adk-and-android.html
I am trying to get started with Android ADK.
My goal is to connect Arduino UNO + blue-tooth and Android devices via blue-tooth.
I discovered that ADK needs Linux kernel 2.6.35+ which is used for Android 2.3.4 to allow communication via USB.
So it's clear that all devices should support this requirement for USB communication.
But what about blue-tooth? Does it mean that the same rules applies to blue-tooth interaction?
Is it possible to establish connection and data exchange with device for instance with Android 2.1 (API level 7).
So, any explanations are warmly appreciated
UPDATE#1
My primary goal is to connect Android 2.1 device with Arduino via blue-tooth.
My first thoughts were that I should use ADK but I discovered that at least for USB it depends on linux kernel version.
But I think it still may be possible to use blue-tooth instead of USB and possibly I may still use ADK, if not how can I connect Arduino with android via blue-tooth without ADK.
Well.. Not sure I understand your problem exactly but I try to give you the best possible answer I can.
There is no relationship between ADK and Bluetooth. You need ADK if you use a USB cable to connect your ADK compatible development board with your Android mobile. The USB compatible board or the ADK shield contains a USB peripheral controller so it can control the USB devices through cable.
In your case you don't need any physical connection between your Arduino and the android device so it is a matter of Bluetooth connectivity. You just have to use a cheap Bluetooth Module with your mobile (Not needs to be an Android anyway).
Now you have to connect the Bluetooth module with your Arduino. Now you have two Bluetooth enabled equipment so you are ready to communicate. I found some good tutorials on web that you can use as a starting point.
How to control Arduino over bluetooth
Arduino Android Bluetooth Communication
Let me know if you need further clarification.
Bluetooth functionality seems to have been a part of the Android APIs since level 5. Thus Android 2.1 should work just fine!
Is it possible, to connect more than one accessory to my device using the ADK? For example using a nexus and a usb hub. Could I connect two arduino boards?
This is currently not possible, but the APIs do allow for this feature to be supported whenever the underlying system can.
Is it possible to create an application for Android, which can generate a video signal (HDMI or VGA) via USB?
Any Android device has miniUSB port. Theoretically it's possible to create a small commutator device on microcontroller or microscheme, which will be a USB-host for Android device. You'll connect Android device with commutator and then connect commutator with monitor.
For example, the scheme looks like: Android phone -> commutator (USB-host) -> TV/Monitor.
Summary, I need to connect android phone with TV via miniUSB port. I found soft which can use miniUSB -> HDMI cable, but those apps only for Motorolla Droid and HTC Evo.
I'll glad to get links to existing apps or projects on that theme, to info about software generation HDMI-signal and connecting Android devices with another devices.
Thank you and sorry for my bad english!
Not much chance of that working out: lacking an appropriate converter chip there is no way you will be able to generate an HDMI or DVI signal using only the 4 pins on a standard USB or mini-USB port. You will need to look into building a converter box that does the right thing: something like http://wiki.chumby.com/index.php/What_is_NeTV.
Those cables are not doing 'HDMI' generation - basically, some phones use the extended standard which has more than just USB in the socket.
Specifically, OMAP3/OMAP4 based phones (Droid, Evo) have an onboard HDMI/DVI chip - the cable just breaks out the pins.
I'd look at Open Accessory Development Kit for inspirations about what can be done in hardware.
Apparently with Android 2.3.4 and 3.1 one can now access USB accessories.
I have a Ardupilot Mega (based on Arduino) board with a USB cable connected to my laptop, and I can connect to it using a simple serial communications program over COM7 and 115,200 baud. This allows me into the command-line interface, and I can issue commands and get logs.
Is it possible to write an Android app that will communicate over USB to my Ardupilot Mega board?
I've seen many similar threads, but most of them were pre-USB host.
usb-serial-for-android is my open source library written for exactly this need. It supports FTDI and CDC-ACM usb serial devices using Android's USB host support; no root or ADK necessary. It can talk most Arduinos.
The project is still in its early days, but the basic support has worked well enough for several projects. There is also a discussion list where you can get help.
Unfortunately the library from mik3y's answer (see here: mik3y/usb-serial-for-android) seems to be long dead. It has many problems and waiting pull requests. Also the LGPL licence prevents anybody to fork it and maintain it.
But don't lose your hope, there's a working replacement and it's under the MIT licence. felHR85/UsbSerial.
EDIT: I found a maintained fork of mik3y's library. But the licence or readme is not updated, so I suppose the owner doesn't have a connection to mik3y and simply took it and improved it. I hope he won't get into any trouble because of the licence, because we need this library. See kai-morich/usb-serial-for-android
EDIT2: It seems that all of these libraries are maintained again, mik3y joined forces with kai-morich and they're working together now.
EDIT3: mik3y/usb-serial-for-android is under MIT license now. And still maintained in 2022.
Maybe. Check out the Android Open Accessories announcement on the Android Developers Blog. The Arduino Mega ADK is compatible. Not sure about the Ardupilot Mega.
From their page:
The Android 3.1 platform (also backported to Android 2.3.4) introduces
Android Open Accessory support, which allows external USB hardware (an
Android USB accessory) to interact with an Android-powered device in a
special "accessory" mode. When an Android-powered powered device is in
accessory mode, the connected accessory acts as the USB host (powers
the bus and enumerates devices) and the Android-powered device acts as
the USB device. Android USB accessories are specifically designed to
attach to Android-powered devices and adhere to a simple protocol
(Android accessory protocol) that allows them to detect
Android-powered devices that support accessory mode. Accessories must
also provide 500mA at 5V for charging power. Many previously released
Android-powered devices are only capable of acting as a USB device and
cannot initiate connections with external USB devices. Android Open
Accessory support overcomes this limitation and allows you to build
accessories that can interact with an assortment of Android-powered
devices by allowing the accessory to initiate the connection.
Note: Accessory mode is ultimately dependent on the device's hardware
and not all devices will support accessory mode. Devices that support
accessory mode can be filtered using a "uses-feature" element in your
corresponding application's Android manifest. For more information,
see the USB Accessory Developer Guide.
The following list of distributers are currently producing Android
Open Accessory compatible development boards:
The Arduino Store provides the Arduino Mega ADK (in EU nations or
non-EU nations) that is based on the ATmega2560 and supports the ADK
firmware. DIY Drones provides an Arduino-compatible board geared
towards RC (radio controlled) and UAV (unmanned aerial vehicle)
enthusiasts. Microchip provides a PIC based USB microcontroller board.
Modern Device provides an Arduino-compatible board that supports the
ADK firmware. RT Corp provides an Arduino-compatible board based on
the Android ADK board design. Seeed Studio provides an
Arduino-compatible board that supports the ADK firmware. SparkFun's
IOIO board now has beta support for the ADK firmware.
You can check out the library described in Slick USB 2 Serial Library.
It enables common USB-to-serial adapters to work with Android devices that have USB host mode without needing to root.
http://slickdevlabs.com/
I am currently using the library in my own app, however I think you can get away with just the app that slick has on the market. There are two free apps and one is the "pro" version of one of the free ones; search slick usb in Google Play.
It does use HOST mode and you can change the baud rate to whatever you need.