USB host mode in ICS

I am trying to connect a USB sensor (see Toradex) to an Android phone (Desire Z) running Android 4.0.3.

To test this, I wrote a small application to list connected devices.

It is assumed that the USB HOST mode is also implemented to power the USB sensor (HID) ... but this is not so.

I have an OTG USB cable, and now when I attach the cable, a small icon (car mode) appears in the status bar.

I am disappointed since I have been waiting for this feature for a while ...

Any thoughts? I read almost everything related to this (Sven's work and much more), but I might have missed something ...

Thanks!

+4
source share
1 answer

Over the past year and a half, I have worked hard to create a custom platform for Android. Some were near Froyo, but mostly on Gingerbread. Most of all on the equipment that I added was either UART or USB, which should be done. Unfortunately, adding USB peripherals to an Android device is not as easy as adding it to a PC or MAC. PC and MAC have almost unlimited memory space (hard disk). They can contain drivers for a very large number of devices. This enables automatic detection and automatic loading of drivers. On an Android device, this is much more careful, only the necessary drivers are stored on the device. Each time I added a new device, I had to compile a driver for my platform and make some changes to my configuration. You can also download the driver as a module, rather than compiling it with the kernel (gives file.ko output). Although, the driver should be written accordingly. But you will have to install it by changing the "init.rc", which requires root privileges.

Here are some links to a question / answer about drivers on Android. That should give you a little more information: USB touch screen

Hope this helps, but unfortunately a lot of work.

0
source

Source: https://habr.com/ru/post/1389545/


All Articles