[plug] Can I force 500ma max power for usb?

William Kenworthy billk at iinet.net.au
Wed Nov 6 07:23:44 UTC 2013

Phones a samsung galaxy s2

USB power can be charging downstream ports (CDP - charge + data) or
dedicated charging ports (DCP - charge only)

CDP "negotiate" (by software) a value - hence my problem as this seems
to be 96ma - one document talks of the charge current corrupting data
transfers which is a reason to limit it.
DCP shorts two of the wires together and tells the usb port to charge
only.  Docs are vague in what I have read so far but it seems to default
to 500ma in my case

A further complication are other schemes to indicate extra current
capability - one phone I had use a 48k resistor across the data pins (I
think) which told the custom charger to release up to 2 amps.

In my case, I have only CDP cables at work, software thats negotiated
96ma but has charged at a higher rate in the past with DCP cables.

The fix: identify the usb bus/port and

echo 1 > /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-3/bConfigurationValue
echo 1 > /sys/devices/pci0000:00/0000:00:1a.7/usb1/bConfigurationValue

(I did both) - a small shell/perl script will suffice to automate it.

Proof - it charged in a short amount of time instead of trickle
charging.  No indication from lsusb that anything had changed though so
I guess its down to cutting up a usb cable so I can insert a current
meter into the path and confirm it.  Unfortunately I dont think the
phone can tell me either. (default samsung rom)


On 06/11/13 15:00, Pavel Volský wrote:
> Hello William,
> my first thought was - how can you be sure it is not the phone's logic
> restricting the power allowed to the phone?
> On the other hand my second thought was - to shut up because i know
> very little about this. But I really would like to know more how you
> can measure and set this in Linux.
> So, if you have any know-how resources, send me a link please.
> Ps - what kind of phone do you have? I can try some tests on my SGS 3.
> Pavel
> On 6 Nov 2013 11:42, "William Kenworthy" <billk at iinet.net.au
> <mailto:billk at iinet.net.au>> wrote:
>     I would like to override a USB hubs max power setting:
>     I have a samsung phone that depending on the cable gets enumerated and
>     sets maMurdoch Searchx power from the usb hub (PC, Laptop etc.) to
>     96ma.
>     For some reason if it doesn't get enumerated it gets a significantly
>     faster charge rate (I suspect that it piggybacks an existing
>     connection
>     that has already been negotiated to 500ma.)  For practical purposes it
>     works well for this small subset of cables ... which is my current
>     dilemma.
>     If I only have standard full function usb cables (4 wire, independent
>     earths) that enumerate fine, except they negotiate 96ma (less than the
>     100ma default if accurate!), can I override the negotiation and
>     set max
>     power to 500ma? - note I am not trying to force 500ma current draw but
>     set the threshold to 500ma.
>     OS is gentoo but hardware is either ASUS, Dell or Apple ... same
>     problem, same 96ma which supports the fact that more than this current
>     is really available if I can access it.
>     BillK
>     _______________________________________________
>     PLUG discussion list: plug at plug.org.au <mailto:plug at plug.org.au>
>     http://lists.plug.org.au/mailman/listinfo/plug
>     Committee e-mail: committee at plug.org.au <mailto:committee at plug.org.au>
>     PLUG Membership: http://www.plug.org.au/membership

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20131106/021a21a6/attachment.html>

More information about the plug mailing list