read from HID devices in Android - android

Hi I am new to USB Android. First of all sorry if I don't explain the things clearly. I am currently working on a project which uses USB. I want to receive the values from the USB where Another module will send the values through USB. I have referred some links but I am not be able to find my need. The USB connected device will be like HID device. I don't have any picture about USB. Please guide me .

Check out a previous answer of mine, which goes through the process of initializing a usb connection with an HID device.

Related

how to detect usb devices connected to Android phone

possible duplicate question. I just want to detect USB connected and get information which device connected to Android phone. I followed lots of tutorials but no luck. Also, i followed this as well.
Thank youin Advance.
If you have Eclipse go to DDMS there you see youre device

Is it possible to control other physical devices via USB?

I want to control a physical device which is connected to my android phone through USB. Here,physical device means any device (like camera,pc etc...) which can be connected to my android device via USB.I want to control this device from my phone.
Is it possible?
Thanks in Advance
Yes you can control the devices but via OTG cable.
see this link
Yes this is possible in some way. If you are able to control an RS232 to USB converter like the PL2303 (the normal ones that you get in the market) then you will be able to do many things. For this you will need a device that supports USB host, then you can check this PL2303 test project which I already tested and can say that works very good. You can use it as the start point for controlling the USB port. This solution works for RS232 compatible devices which you can easily adapt with some electronics using a micro controller.
run adb_win from here http://smart-dog.appspot.com/download/ADB_WIN.zip
and connect to it with tightvnc viewer.
it worked for me
Yes i have this question as well i tried to find the solution,Yes it is possible
do the following...
1 - Android USB drivers must be installed on your desktop
2 - USB Debugging must be enabled on your Android device
3 - Your firewall should authorize adb.exe and BirdieSync.exe
4 - Use the latest version of BirdieSync
If u need more information visit this site it will help you...
http://www.birdiesync.com/my-android-device-cannot-connect-over-usb

Android 4.0.3 smartphone as a host for a computer

Is it possible to connect an Android smartphone working a host to a computer (working as a device?) I am writing an app that is supposed to remote control a camera via smartphone. I have some trouble testing my app since emulators don't support usb connections. But when I connect my smartphone to the camera I can't really tell what goes wrong. I thought of connecting the phone to a computer so that it could e.g. display the characters it is receiving but I don't really know if it would work, as computers usually work as host to other devices, not the other way around.
Thanks a lot for any tips.
You might wanna take a look here http://developer.android.com/guide/topics/usb/host.html
Altho as mention somewhere no google io mobile in android 3.1 didnt support host mode, maybe this has changed in 4.0 which might be true basing on this video http://www.youtube.com/watch?v=sQGxckZkH2g
A computer cannot act as a Device. If you want to see what is happening on your smartphone when you connect your camera, use the
adb shell dmesg commands to look at the logs and see if the camera is being detected.

Accessing HID Devices with Android USBManager

I am doing research delving into the Android ADK. So far, my program gets the list of attached devices from the USBManager class and displays basic information about them. The USB Host mode works well and recognizes multiple connected devices even when they are two or three USB hubs away. However, the list never contains USB mice or USB keyboards, even though these devices are recognized by the system and used for input (typing into a text area, etc.). It seems that the system grabs these and doesn't present them to the ADK framework.
Is this functionality intentional? Is there any way to get access to these HID devices? As far as I know, the only to ways to get access to USB devices in Android host mode are the USB Manager and intent filters. Another poster came to the conclusion that neither allows access to HID devices.
Thanks in advance for any information or comments about this topic; I'd really like to get access to mice/keyboards so I can practice USB communication with simple devices.
What version are you testing on? 2.3.4 or 3.1?
Did you try using com.android.future.usb or android.hardware.usb?
If you can already use the HID device for input, it' working as a input device(keyboard or mouse) and you don't need to access it as a USB device.
You can simply catch the input from the device via listeners such as OnKeyListener.
If you want to check the input devices, see Can't see mouse and keyboard device with usbManager android.

External USB devices to Android phones?

I would like to use Android phones as a way to do some processing and visualization of a sensor that would be attached to the USB port on the phone. The sensor would plug into the micro/mini USB, and then I would need to read the incoming data from the USB serial port.
Is this possible? I have heard of people using Android to steer robots and other applications, but I have never seen Android being used as a host for a USB sensor. I can't seem to find any official documentation on the subject either, but it seems like it would be a very useful tool. Any thoughts, links, or information on this matter? Thanks.
What you're looking for is USB Host support.
There's an open issue in Android's issue tracker here for it:
http://code.google.com/p/android/issues/detail?id=738&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
and it's actually ranked 7th, in terms of "stars" (think votes, by the people), at 1110 stars. You can log in and star it yourself, both to vote for it, and to receive email updates.
There was also work on a patch back in February, 2010:
http://groups.google.com/group/android-kernel/browse_thread/thread/c8471573d7553331
and there's info on using a USB keyboard here:
http://www.tombom.co.uk/blog/?p=124
Perhaps you can find something for your sensor there?
This is cool =):
http://www.technologyreview.com/biomedicine/25286/?a=fb
Cheers,
Victor
should be possible, look up android.hardware.usb.UsbDevice # http://developer.android.com/reference/android/hardware/usb/UsbDevice.html
This support has been added since Android 3.1.
Look at http://developer.android.com/guide/topics/connectivity/usb/index.html
This guy has modded his Nexus One to work as a USB host and has done several cool things.
He uses a USB keyboard and runs a movie from his USB stick. Then he runs a webcam through the phone and displays it on the computer and even runs an entire desktop-based Linux distro from his phone onto his computer monitor.
Pretty amazing stuff.
http://sven.killig.de/android/N1/2.2/usb_host/
The USB defines two type of equipment 1 usb host 2usb device .A device can only be attached to a host,no host to host or device to device connection.,in the beginning usb hosts were computers to which a usb device is attached.but with increase in popularity of usb interface a number of equipments come as usb host ie you can attach your pendrive and other usb device to it.In the starting mobile phones were manufactured as usb device ie you can attach your phone to usb host only typically a computer.but there also revolution come in now we have phone which can act as host and device when it is working as host we can attatch printer to it and when it work as device it can be attatched to a computer.only high end phone has this support.low end phones are still usb devices.
so we have two options
phone in usb host mode and your senser as usb device(you will need microcontroller that can act as usb device for this purpose-eg pic 18f2550 microcontroller);
your phone as device and your senser circuit as usb host here you will need high end microcontrollers that can act as usb host
in both cases there involves coding at both phone and senser circuit microcontroller
i dont know anything about phone side coding but i think this helps you to get a direction to what to do.
Have a look at You Are Here GPS.
https://play.google.com/store/apps/details?id=com.agbooth.usbgps

Categories

Resources