Tuesday, September 4, 2012

USB Host on Android

Android 4 supports USB host.  This is great! 

Does it actually work?  Wellll.... sort of.

Observations so far:

  • Galaxy Nexus:  Works fine with OTG cable, huge power budget.
  • N7: Works fine with OTG cable, huge power budget
  • Xoom 1: Some things work, some don't.  "Simple" USB ops seem fine, but complex stuff (like driving a USB wifi NIC) seem to blow up.
  • Motorola Razr Maxx: This one is extra weird.  USB host exists, but requires a +5v backfed power, with enough amps on it to charge the phone in host mode.  That's a hell of a thing.  The Razr also enforces an excessively small power budget (so small I'm not sure it allows ANY device to function) unless a hub is in the chain.  It doesn't even have to be an externally-powered hub!  (Well, except that you have to externally provide USB power regardless).
  • HTC One V: AKA the Ninja Phone, is reported to have non-working USB host due to kernel bugs.  Custom ROMs only?
  • Other phones: No idea, let me know in the comments?
How do we fix this? Even on phones with a generous power budget, we need to prevent high-power USB devices from draining the phone battery (sometimes in the matter of 30 minutes).

I'm working on a USB power injection board which provides micro-usb ports for phone and battery packs (on the assumption that everyone has a ton of micro cables handy by this point), an integrated one-port USB2 high-speed hub to handle power budget problems, and a standard female USB socket for client devices.

Could you solder together some cables and get the same effect?  Sure.  You could also use a no-logic power splitter board like one I made earlier.  But it's really ugly, and prone to falling apart at the worst moments.

So I'd rather do it cleanly.