开发者

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 seem开发者_开发百科s 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

  1. 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);
  2. 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜