Android apps, communicating with a device via USB port - android

I am new to Android Platform and I Like to know whether it is possile for an Android device(App) to communicate with Linux system via USB port for 2 way communication . If yes how it can be done . Thanks for your help

USB support is limited in Android currently and only available on > 3.0. Look at the online developer's docs.
USB Docs

Related

Android emulator that supports Bluetooth

Do you guys know of an Android emulator that supports Bluetooth?
If none, then are there any that can use a Bluetooth USB dongle?
Android emulator does not have bluetooth capabilities, as mentioned in the SDK's docs and several other places
Refer to this documentation: https://developer.android.com/studio/run/emulator#starting

Connect Windows to Multiple Androids via Wi-Fi Direct using VB.Net

I want to create a small wireless network with a Windows 8.1 laptop as the "hub," connected to up to 8 Android devices. I need to transfer files in both directions, between the laptop and the devices.
This needs to be a system that requires minimal setup since it will be distributed to the laptop owners. The developer will not be available to help. Minimal hardware and software requirements can be specified, but not actual models of laptops and devices.
It seems to me that Wi-Fi Direct is the best option to do this. I know VB.Net best, so I would like to use that for development. Does anyone have sample code that could get me started? Would I also need an app to run on the devices to set up the pairing and network?
Thanks!

Communicating with serial USB device over Android

I have one custom made device for measuring current. This device can be connected to PC and communication is done over USB. It is based on FTDI chip. I have application written in Java and that application is using rxtxSerial.dll library and gnu.io.rxtx_2.1.7.4.jar. Now I want to port this application on my android device and I'm litte bit confused what to do that? All I have is android tablet (os version 4.1.1), OTG cable and this measuring device.
Should my device be rooted? Is there any kind of library that I can simply add to my Java Android application and read data over USB? Where to start?
I have tried to port existing application for PC using same library, but rxtxSerial.dll is missing and I can't transfer it to my android device.
I can really recommend the USB-Serial-For-Android library, it supports multiple popular usb-to-serial chips (also FTDI) and there is no rooting required. Check out the GitHub project here.
There is a project dedicated to serial communication on Android. android-serialport-api. I think, it is a good resource to start with.
FTDI also provides Android related resources.
I think there's currently only one properly maintained library for serial USB communication and it's felHR85/UsbSerial. It supports several USB chips including FTDI (see Devices Supported).
Unfortunately mik3y/usb-serial-for-android seems to be dead.
And no, you don't need to root your device for connecting to and communicating with a USB device.
EDIT: We have a maintained fork of mik3y's 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 are working together.

Communicating with an xbee module using Android 3+ phone

I want to connect my Xbee module to my android phone and communicate with it by sending AT commands.
I do know of the USB host facility provided by Android phones, but I do not know how to send data to it.
I have the java-Xbee API and I am able to talk to the Xbee using my computer but since my project involves using the Android OS, any help on this topic will be appreciated.
According to this Google Code Page, the java-Xbee API requires Java >= 5 and RXTX. Considering those two requirements:-
RXTX on android is not an out of the box lib and may require some hacking which may or may not work.
I'm not a Java VM expert, but i know desktop OS JVMs work differently from Dalvik.How well would Dalvik run code developed for JVM? Here is a nice StackOverflow topic discussing the two.
Faced with the above challanges, are you brave enough to boldly go where no man has gone before?
Could you also consider the following well documented and supported approaches:-
Ytai Ben-Tsvi & Sparkfun's IOIO-OTG
Saves you the headache writing android 3.1+ USB host code and thus allows you to use cheaper phones that run droids 1.5 to 2.3 (without hacking the latter).
Digi's WiFi to Xbee
Allows you to link your android phone (or any other programmable wifi enabled computer) to your device over the internet.

Embedded System USB to Android Device

I am writing an Android 2.1 application that needs to get data from a USB device. The USB device is an embedded system i created. The embedded system has no OS. Also, the android device does not send any data to the embedded system.
How should i go about this, I'm guessing i will need to make a high-level driver to communicate from USB to the application. But, i have never made a Linux driver before.
If creating a high-level driver is the best way to do this, can someone give me some references so i have somewhere to start.
If there are other ways to accomplish this i would also like to hear about it
-Thanks
The Android Open Accessory Development Kit is where you should start looking. Like many of other Google's documents, the tutorial is reasonably complete and should provide you with a good starting point
Good Luck!
I think you will need to recompile Android kernel to add usb device support.
It can be an option if you are working on some dedicated project and only one Android phone should be supported. If you want to support all kinds of Android phones, I can suggest to implement USB host in your embedded system( if it is possible), thus your Android phone can be connected using ADB protocol.

Categories

Resources