From owner-freebsd-usb@FreeBSD.ORG Wed Jul 20 13:22:07 2011 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D98F106566B for ; Wed, 20 Jul 2011 13:22:07 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id 2DD308FC16 for ; Wed, 20 Jul 2011 13:22:06 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=+LLZvqFYyQMD97787hX2hEPd56rg/J55He15d4DUFUo= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=fa5KVJVg6bUA:10 a=WQU8e4WWZSUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=1fD-6izRr7WVgPn3Yp4A:9 a=wPNLvfGTeEIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 155303323; Wed, 20 Jul 2011 15:22:05 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Wed, 20 Jul 2011 15:19:55 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201107201519.55975.hselasky@c2i.net> Cc: Subject: Re: Powercycling USB device on hub X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2011 13:22:07 -0000 On Wednesday 20 July 2011 14:30:37 Peer Stritzinger wrote: > Hi, > > is ist possible to power-cycle the HUB port of a USB device by > programmatic means (via script or libusb or some ioctl)? > > It would be perfect if I could power-off/on just a certain device but > it would also help to power-cycle all devices on a HUB. > Hi, Using the usbconfig utility in 8 stable and 9 current, you can set the configuration to 255 which means unconfigured and then 0 for the root HUB. For non-root HUBs you can BUS-reset the devices usbconfig -d X.Y reset or set_config aswell. There is also a power_off command, but your device might not come back after that. --HPS