From owner-freebsd-current@FreeBSD.ORG Wed Apr 4 01:16:53 2012 Return-Path: <owner-freebsd-current@FreeBSD.ORG> Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A71461065673 for <freebsd-current@freebsd.org>; Wed, 4 Apr 2012 01:16:53 +0000 (UTC) (envelope-from rcm@fuzzwad.org) Received: from mail.volente.us (unknown [IPv6:2001:470:7:d47::2]) by mx1.freebsd.org (Postfix) with ESMTP id 449A68FC12 for <freebsd-current@freebsd.org>; Wed, 4 Apr 2012 01:16:53 +0000 (UTC) Received: from shiny-w0.fuzzwad.net (localhost [127.0.0.1]) by mail.volente.us (8.14.4/8.14.4) with ESMTP id q341GpmZ036065 for <freebsd-current@freebsd.org>; Tue, 3 Apr 2012 20:16:51 -0500 (CDT) (envelope-from rcm@fuzzwad.org) Message-ID: <4F7BA105.9010502@fuzzwad.org> Date: Tue, 03 Apr 2012 20:16:53 -0500 From: Ron McDowell <rcm@fuzzwad.org> User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <4F7B761B.4030104@fuzzwad.org> <1333491971.1090.51.camel@revolution.hippie.lan> In-Reply-To: <1333491971.1090.51.camel@revolution.hippie.lan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Switching on/off 5V power to a USB port X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current <freebsd-current.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current> List-Post: <mailto:freebsd-current@freebsd.org> List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 04 Apr 2012 01:16:53 -0000 On 4/3/12 5:26 PM, Ian Lepore wrote: > On Tue, 2012-04-03 at 17:13 -0500, Ron McDowell wrote: >> I just got a little USB powered fan and it sure would be nice if I could >> have cron on my FreeBSD box turn it on or off at certain times by >> switching off the 5V line on a USB port. Anyone know how I can do >> that? Thanks. >> >> BTW this is a pretty decent fan for the money. :) >> http://www.amazon.com/gp/product/B0033WSDOM/ >> > > The usbconfig(8) command has power_on and power_off commands. I've > never used them so I can't say for sure they'll do what you want. > > -- Ian The good news is that "usbconfig -u 4 -a 5 power_off|power_on" works fine. Hardware is a Dell Latitude D-430 notebook running: FreeBSD d430 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r232714M: Fri Mar 9 12:41:34 CST 2012 rcm@d430:/usr/obj/usr/src/sys/GENERIC amd64 When booting up, the fan powers up just as: uhub7: <vendor 0x413c product 0xa005, class 9/0, rev 2.00/25.07, addr 5> on usbus4 shows up, which was a pretty good clue to what device it is. Automatically turning it on is pure laziness on my part... turning it off is more about forgetfulness though. :) On 4/3/12 5:45 PM, Devin Teske wrote: > Alternatively, you could just plug your USB fan into your monitor. A > fellow engineer and I discovered that most monitors power-down the USB > ports when entering power-save mode (with Dell, HP, and Viewsonic, > this is whenever the screen blanks due to inactivity; are you using > DPMS and/or greensaver?). Walking away from the PC will cause the fan > to [eventually] turn off, while waggling the mouse brings it back to > life. Devin, sorry, my monitor is too old to have USB ports on it...if it did that would be even a better solution. Thanks for the help everyone! -- Ron McDowell San Antonio TX