From owner-freebsd-usb@FreeBSD.ORG Fri Apr 10 13:02:02 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7732E6 for ; Fri, 10 Apr 2015 13:02:02 +0000 (UTC) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "raven.bwct.de", Issuer "BWCT" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 35B3A2E6 for ; Fri, 10 Apr 2015 13:02:01 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id t3ACaw4j012309 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 10 Apr 2015 14:37:05 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id t3ACaqT2048735 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 10 Apr 2015 14:36:52 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id t3ACaq1u016512; Fri, 10 Apr 2015 14:36:52 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id t3ACaoZ3016511; Fri, 10 Apr 2015 14:36:50 +0200 (CEST) (envelope-from ticso) Date: Fri, 10 Apr 2015 14:36:50 +0200 From: Bernd Walter To: Matthias Apitz , Hans Petter Selasky , freebsd-usb@freebsd.org Subject: Re: power off 5V on USB port Message-ID: <20150410123650.GJ96011@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <20150407133014.GA1790@c720-r276659> <55240C26.7000905@selasky.org> <20150408055546.GA1998@c720-r276659> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150408055546.GA1998@c720-r276659> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 13:02:02 -0000 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: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) > > > > > > # usbconfig -d ugen0.3 power_off > > > # usbconfig -d ugen0.3 > > > ugen0.3: 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 http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.