What is this good for?
Usb Host Controller let's you see what devices are connected to your phone, and also lets you mount external drives.
There are already a lot of apps for that
Yes, but UHC has some distinctive features:
How to use
- To enumerate devices it does not use neither the USB Host API, nor external applications, like lsusb from busybox. Instead it reads the information from the filesystem, which is always avialable, therefore it can be used to debug all kinds of devices which have USB host support.
- It has a special features to help control the USB Host mode of S5PC210 based Samsung devices (Galaxy S, Nexus S, etc.)
- It also has some features usually not available (even from the command line), like the ability to reload the partition information, and the ability to reset USB devices
Most of the functionality should be straightforward, but the USB tab might need some clarification:
The USB tab shows all the USB devices connected to your phone, that have been found by the system. Below the devices you can see all of the USB Mass Storage devices (external hard drives, flash drives, other Android phones, etc.), with their avialable partitions. You can click on any line, and based on the line you click on you will have a list of options to choose from:
What are the options if I have an S5PC210 based phone
- Clicking on an USB device in the upper part lets you reset that device. Sometimes mice, and keyboards need to be reset for them to work correctly.
- Clicking on a partition lets you mount it to a mount point. The application will ask you where you want to mount it. The list of mount points can be set inside the settings panel. If the partition is mounted you can unmount it here.
- Clicking on a Mass Storage Device (not on the partitions, but the base device above tha partitions) will lets you reset the hard drive, or reload the partition table of the disk. The latter is useful, if the system doesn't recognize a change in its partition information. This is usually needed, if you connect an external card reader, and you insert or remove a card from it. It also makes conecting other Android phones as storage possible, as they will not send their partition tables until you switch the USB Storage mode on them on.
The application lets you change how the USB Host is working in the S5PC210 based
kernels (and currently only on those!). The avialable modes are:
- Client: Default mode, means no matter what happens the phone stays in client (USB gadget) mode
- Host: No matter what happens, the phone switches to host mode and stays there. Not recommended.
- OTG: The phone is in client mode by default but changes to host mode if an OTG cable is detected.
- Auto-host: The phone is in client mode by default but changes to host mode if any type of cable is detected. (good for homemade OTG cables where pins 4-5 are not shorted)
Using Host mode is not recommended, as the root hub of the S3C Host driver won't re-enumerate devices if they are changed (It is still useful for debug purposes). If you need host mode use either OTG mode (preferred if you have a valid OTG cable, which means it has the 4th pin grounded), or auto-host mode, which you should use if you have a "non valid" OTG cable (on which the 4th pin is not connected)