Connect external hardware to android tablet - android

Im developing an application for a manufacturing plant. They want to connect a scale, printer and meter counter to an android tablet.
They use rs232 ports.
Im planning on using the galaxy view tablets that have a Micro Usb port, then hook that up to usb hub and then use a rs232 converter.
My question is will this be able to communicate to the tablet? At least show the raw values and will it know its 3 separate pieces of hardware?

I have a similar problem but only part of your problem here:
Connecting external hardware to Android Phone
You need to ask those hardware manufacturer to send you the Android driver to include in your Android app. It will run on some phone but may not work on all phone. Most software developer will refuse to provide support for Android as there are so many manufacturers and possibly compliance issue. Your best bet will be to ask the hardware manufacturer which phone/tablet they have tested the device on. In any case you still need a hardware driver like the one for windows.

Related

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!

USB code for Android 2.3.4

I want to use usb in my application to retrieve data from my computer (present in text files) to android mobile and read it... what are the neccessities in terms of hardware and helpful links for the usb code...
Recently google launched USB accessory for android 2.3 ... it have classes UsbManager, UsbAccessory etc... i want to use that ... how can it be used.??
Usually the opposite of this is observed, where the android mobile projects itself as a usb device (client) , The USB host controller driver on the computer recognizes the device and handles future USB requests from your client. This is just the hardware layer, mind you. Since the USB protocol has become so ubiquitous, the computer actually stores multiple families of drivers both at the kernel layer and user space to be able to handle the variety of requests and their user space interpretations.
Since android mobiles are primarily linux-based devices, to achieve your end you will need to integrate these USB host-based driver families to your device's kernel / ROM. You will need to create a custom ROM (someone else asked this question here). This link provides you a list of drivers corresponding to specific hardware families.
Additionally, you will need to set up necessary programs on your computer that allows it to project itself as a USB client.
If you use linux on the computer too, this article might help you to start.

How to generate a video signal from Android device via USB?

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.

How to communicate with a USB device from Android tablet?

From a year ago, Is there a way to communicate with USB devices on Android? this didn't look like a common requirement, but tablets have evolved, and hopefully, the OS has, as well.
I need to operate a simple USB relay card from my Curtis LT8025 tablet, currently running 2.1 patched.
I'm also a newcomer to both Android and java, so relatively clueless!
No need for bi-directional communication, just a simple serial command out to the device.
Any suggestions?
Thanks!
Dave
Sadly, there is currently no standard API to achieve wired communication with Android devices. I was facing a similar issue a while back (see Android: Communicating with a USB device which acts as host ).
I was able to successfully implement the solution provided by CommonsWare. Leave a comment if you need more help regarding this and I can provide details.
Edit (more details) -
Basically, I narrowed down to two possible solutions for this problem:
Modify the Android source itself to include custom drivers for whatever purpose you need and install this in your tablet. Since its mostly based on Linux, if you develop the drivers for Linux, the same can be used in Android with a little modification. This solution is simpler to develop, but not practical commercially if you are not providing the tablet/phone yourself.
Make your USB device act as an host and implement the ADB driver/command-set in your device. When connected, you can issue "adb forward" to forward tcp ports so you can interact with your Android apps and have two way communication between the device and the app.
I used the second method and it works flawlessly. But its only practical if you are making USB host devices. for USB slaves, first method is the only way I recon.
If you are using a serial device and have the ability to talk to it over native serial, you might want to consider IOIO (see http://ytai-mer.blogspot.com/2011/04/meet-ioio-io-for-android.html for more details).
I'm building an Android custom system. I did connect several devices on the USB. I looked to connect a device on the OTG port, the one that usually gets out of a tablet on which you use ADB. I gave up. This is a nightmare. I don't think you can use ADB on the OTG USB that is currently a device and expect to be able to use another device like a USB to serial converter. That means that you loose the whole ADB toolchain for debugging when you want to use the port as a host. On top of that, the USB OTG drivers you have for your tablet was probably not very well tested in host mode since it's not really used that way. So lots of headakes.
The simple way that I found was to use the second USB port on the CPU. This one is a plain HOST port (unfortunately limited to 12 Mbit/s). Unfortunately, I don't know if there are any tablet out there with 2 USB port available from outside (One OTG and one host).
If you get a set-up with two USB port (one HOST) then it's possible to compile as a module (drivername.ko), a usb to serial converter. There are several chipset supported in the kernel source tree and I already used a few of them and it works.
hope this bit of info is helpful.

android: api to external usb devices for robotic applications

Android devices become incredible cheap (especially those with android v1.6). I'm considering to use one as a brain of autonomous robot. Unfortunately I didn't find any info on that.
I would like to connect two external USB-webcams and some DIY-selfmade USB ADC & output-ports converter to steer the wheels and read analog distance sensors. If I choose some cheap netbook than they usually already have 3 usb ports. But if I will be forced to use a tablet, then it requires also an usb hub.
Do android devices support usb-hubs?
Is there any API to grab still frames from external usb webcams (e.g. "vfa://0" & "vfa://1")
Is there any API to read from USB custom device? Let assume that it will simulate serial port for simplicity.
Do I get all of this in android 1.6 or any newer version?
As an update for your information: Based on answers I assume that android device will be too expensive in comparison to effort. I will go for cheap atom netbook with standard linux & arduinio USB device for controls & sensors. At cost of half kg (one pound) heavier device I will save months on learning & development.
You need an android device that either supports usb host mode out of the box (a few of the cheap tablets apparently do) or a phone that can do so with custom usb power wiring and perhaps a new kernel driver (as many phones can).
You will likely need root.
The api would be the normal linux USB stack, including just about any C-coded source-available device driver available for a desktop linux (excepting those that use bits of x86 binary windows drivers run in a compatibility wrapper).
You could interact with that either from the ndk using normal methods (device files, read/write/ioctl) or with careful driver design so things really look like files you can probably get at some of it from java or at the very least java with some thin ndk wrappers around device file operations.
Essentially, this isn't an "android" question, it's a question about the capabilities of a particular android device's hardware, how to get root on that device, and then it becomes a standard embedded linux question.
As far as I know you won't get any of this with the default Java API. Lots of this stuff can however be achieved if you build a custom kernel and add needed modules to it. Basically it all comes down to kernel hacking and won't be really Android related.
I'm very interested in stuff like that myself so keep me updated please.

Categories

Resources