views:

3391

answers:

7

What would be the best way to access the USB as a serial port on a android device (HTC Magic) ? I am thinking about a OBD-II interface, can I do this on a startdard phone or more likely I'll need a modified firmware ?

A: 

From what I can tell Android is Linux of some sort, to have USB device which would apear as serial port, you should write a driver for that device. I don't know much about OBD-II interface but i am guesing they use some sort of USB driver for windows, same is for android, not mentioning the application to handle the driver.

CrazyChris
A: 

I don't think the current Android devices can act as a USB host only as a USB device when attached to a host. So using the USB port as a serial port is not likely.

Craig
+3  A: 

According to this post, Matt Porter presented a review of Android at the Embedded Linux Conference Europe. I mention this mostly because of the example used to describe the current state of Android.

"Just one more practical example: You cannot even plug a USB drive to an android system, since /dev/sd* is not an expected device name in their hardcoded hotplug management.

Executive summary: Android is a screwed, hard-coded, non-portable abomination."

I'm sure someone's working on it, but I'm afraid for now you're out of luck unless you're willing to go low-level and edit the OS.

Kevin Williams
+1  A: 

Depending on the USB chip in your particular phone, it may be possible to rebuild the kernel to support USB Host mode or USB On-The-Go (Host + Gadget modes) instead of the normal USB Gadget mode. I've found some people speculating that it could be possible on the HTC Dream. Assuming you could reconfigure the USB port in Host mode a USB to serial, ODB-II, or CAN should be doable.

Tim Kryger
A: 

How is it possible with Archos5IT device. With Battery dock Archos supports USB host mode and it could detect storage device. What kind of driver or configuration is needed to interface with OBDII (USB serial device)? Any help or link will be appreciated.

Govind
+2  A: 

PSFreedom (project to jailbrack Playstation 3) has list of controllers which support usb host mode which then translate to supported Android devices.

My own expirience is that usb host works on HTC Dream/G1 without problems.

For OBD-II I would suggest bluetooth ODB-II dongle which side-stepps problem with usb host adapter.

dpavlin