I have been trying to get the FTDI D2xx driver working with my Android 2.3.4 tablet for a while now. After solving a number issues relating to actually loading the driver I am now in a situation where the FTDI device is just not seen by the sample application FTDI provides.
There are no errors reported in either LogCat or Java (debug) the device is just simply not found.
Java_com_ftdi_D2xx_getDeviceInfoList() returns zero.
The tablet is rooted, and the permissions for the ueventd.rc file are set to:
/dev/bus/usb/* 0666 root usb
The USB port I have connected my TTL-232R to does work (in that I can read a USB memory stick with it at least...)
Has anyone else experimented with this and/or got it working? If so some pointers would be greatly appreciated!
Many thanks
Does 2.3.4 support USB Host?
http://developer.android.com/sdk/android-2.3.4.html
No USB host support — Android 2.3.4 and the Open Accessory Library do not support USB host mode (for example, through UsbDevice), although USB host mode is supported in Android 3.1. An Android-powered device running Android 2.3.4 can not function as a USB host. The library enables the Android-powered device to function as a peripheral only, with the connected accessory functioning as USB host (through UsbAccessory).
I've got the sample working with ICS.
Well, I must manually switch from USB peripherals to USB host and vice versa in terminal emulator, since stock kernel does not support otg, custom kernel support otg, but not turn it on automaticly.
cmd1="echo host > /d/otg/mode"; // usb otg host on
cmd2="cat /d/otg/info</"; // check usb status, must be usb a_host and otg=1
cmd3="echo peripheral > /d/otg/mode"; // usb oth host off
Related
Is there any way to make a communication between a peripheral with android OS with RS232 support and a non android smart TV with RS232 support? Basically, I have to create an app which will be installed on the android based peripheral so that when it is connected to the TV using single RS232 cable, commands could be sent from peripheral to TV.
I have not been able to proceed because I am unable to find a process for that.
From what I understand, in stock Android unless you are doing something special in NDK (C code) with specific hardware there isn't a serial connector.
Android Things has a UART but that is specific to Android Things hardware.
If you are trying to get a off-the shelf phone/tablet to connect via serial, a USB-serial dongle would probably be the quickest route.
See: Communicating with serial USB device over Android
Since the microUSB connector will be occupied you can run adb over Wifi. See: Run/install/debug Android applications over Wi-Fi
I am working on a project where I have to connect my android device (LG G3) to a GPS with usb. I can't figure out how I can get the data out of my GPS and I do not want to use the device it's internall GPS because I need to be pretty accurate.
If you want to program your own USB GPS to Android, you can take a look at USB Host
According to USB Host documentation:
When your Android-powered device is in USB host mode, it acts as the
USB host, powers the bus, and enumerates connected USB devices. USB
host mode is supported in Android 3.1 and higher.
To use an USB external GPS you have to enable Android developer Options on your phone and enable using mock locations so the service (your one or a third party one) can send locations to the system "bypassing" the internal location system.
There are several apps that can transfer GPS data to your application (take a look at Your are here GPS for example. This app also lets you wath NMEA data).
I would like to transfer data from a USB Host (of my Laptop or Android Device) to Serial COM port (of a Desktop PC) through a USB - Serial port(DB-9) adapter.
Is there any library existed to do this task??
i have already studied and tried http://developer.android.com/guide/topics/connectivity/usb/host.html but failed.
Can i send data by a using a java program or Android App from my Laptop or Android Device ??
Can i receive data by an app in Desktop PC and show us????
If so please guide me how.
Yes, this is possible, the implementation will depend on what device you pick.
Check out the usb-serial-for-android project for the communication from Android to the USB device. This has support for most major USB to UART Bridge devices such as a Silicon Labs, Prolific, FTDI and CDC Class devices.
You can talk to it as a serial device from your laptop computer using normal serial communications such as POSIX method for Linux or OSX or the Commuincations API for Windows.
I know that the latest android device with API>3.1 support USB host mode or USB OTG that allows you to connect a lot of usb devices like flash disks,mouse,keyboard etc. but can you connect any device that does not have common general drivers like USB to uart device,printers,cameras
I have linux drivers for these devices in source codes as .c files, So is there a way that I can build and install those drivers to an android phone and make the usb devices usable on the phone?
To use linux drivers for android you have to compile your own kernel or kernel module. If you expect your app to be used by other people, this is not a feasible way.
For some low bandwidth USB devices it is possible to write user space drivers in java using the Host API. For USB-UARTs there is the usb-serial-for-android project that is implementing a user space driver based on this API.
Never Mind ! I found a standard way for my device here It provides interface through native code and IPC and official library from manufacturer
I googled for this but didn't find any related thread.
How can we disable a particular device so that it could not be connected via USB like using any virus or any program(preferably in java) while the USB ports should be opened for all other USB devices, i.e., by making changes in USB device not in USB ports.
Thanks !