Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Apr 2015 14:36:50 +0200
From:      Bernd Walter <ticso@cicely7.cicely.de>
To:        Matthias Apitz <guru@unixarea.de>, Hans Petter Selasky <hps@selasky.org>,  freebsd-usb@freebsd.org
Subject:   Re: power off 5V on USB port
Message-ID:  <20150410123650.GJ96011@cicely7.cicely.de>
In-Reply-To: <20150408055546.GA1998@c720-r276659>
References:  <20150407133014.GA1790@c720-r276659> <55240C26.7000905@selasky.org> <20150408055546.GA1998@c720-r276659>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 08, 2015 at 07:55:46AM +0200, Matthias Apitz wrote:
> El día Tuesday, April 07, 2015 a las 06:56:06PM +0200, Hans Petter Selasky escribió:
> 
> > > Hello,
> > >
> > > I'm using an Ubuntu smartphone connected on one of the USB ports to my
> > > netbook as a router to the Internet. I wanted to power-off the USB port to
> > > a) save energy in the netbook and
> > > b) not having the phone always charged for the memory effect in the battery.
> > >
> > > I tried:
> > >
> > > $ usbconfig
> > > ...
> > > ugen0.3: <AquarisE4.5 BQ> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
> > >
> > > # usbconfig -d ugen0.3 power_off
> > > # usbconfig -d ugen0.3
> > > ugen0.3: <AquarisE4.5 BQ> at usbus0, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=OFF (500mA)
> > >
> > > as you can see the state is now pwr=OFF, but in this state the USB port
> > > is not longer usable. What is the correct way to shutdown the 5V
> > > provided via USB to the device?
> > >
> > 
> > Not all USB ports support power off.
> 
> I will go and look for a cable with type-A receptacle and type-A plug and
> will cut the red line of pin 1 to see if this let the phone still asume
> that someting is conected on USB to talk with;

Technically this can work, but per specification it shouldn't because a
device isn't allowed to attach to an USB bus without power.
Self powered devices are required to watch the host supplied power.
This is to avoid leaking current into powered down devices.
I'm pretty sure this specification rule is often violated, so you have a
chance to get this working.

-- 
B.Walter <bernd@bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150410123650.GJ96011>