On 05/05/2012 23:58, Alexander Schreiber wrote:
  On Sat, May 05, 2012 at 06:52:21PM +0100, Pete
Turnbull wrote:
  If the voltage on each is within a specific
(fairly
 narrow) range the iPhone knows it can pull at least an amp.  A different
 range tells it 500mA.  Else nothing. 
 Which is still wrong since you can pull up to 500 mA from a standard USB
 port (after negotiation, but you probably can get away with trying to pull
 500 mA regardless, especially if the other end is a stupid charger and not
 a full USB host implementation - which shouldn't be too hard to figure out). 
OK, "after negotiation" -- but if the iPhone doesn't get any negotiation
how does it know what it can draw?  Should it assume the full 500mA, or
might it be a low-power charger that won't even do that?  Some laptops
will give 5V but only at a few mA when asleep, some chargers give
substantially less than 500mA.  Hence the resistor network.  In fact an
iPhone /will/ negotiate, but if the negotiation fails it relies on the
cruder simpler hardware.
I'm not suggesting it's perfect -- I've found plenty of situations where
it fails (like with some docking units) -- but I can see some logic to it.
--
Pete                                            Peter Turnbull
                                                Network Manager
                                                University of York