From owner-freebsd-usb@FreeBSD.ORG Tue Sep 9 23:14:54 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 747331065676 for ; Tue, 9 Sep 2008 23:14:54 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 3B4F38FC13 for ; Tue, 9 Sep 2008 23:14:54 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.2/8.14.2) with ESMTP id m89NErBD028560 for ; Tue, 9 Sep 2008 17:14:53 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.2/8.14.2/Submit) with ESMTP id m89NErNP028557 for ; Tue, 9 Sep 2008 17:14:53 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Tue, 9 Sep 2008 17:14:53 -0600 (MDT) From: Warren Block To: usb@freebsd.org In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (wonkity.com [127.0.0.1]); Tue, 09 Sep 2008 17:14:53 -0600 (MDT) Cc: Subject: Re: usbhidaction with non-HID devices 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: Tue, 09 Sep 2008 23:14:54 -0000 On Tue, 9 Sep 2008, Warren Block wrote: > My Epson scanner has one button. I'd like to have that button activate a > program. usbhidaction(1) does that for uhid devices. > > Of course, the scanner is not a HID, and usbhidaction doesn't like non-HID > devices: > > % usbhidaction -v -c usbhid.conf -f uscanner0 > usbhidaction: hid_get_report_desc() failed: Operation not supported by > device > > Is there an existing way to do this? Responding to my own post: /usr/ports/sysutils/scanbuttond can do this--if you use ugen instead of uscanner. It polls, but the port shows a clever way to set it up so devd starts scanbuttond when the scanner is turned on, and kills it when the scanner is turned off. All of this leads me to ask: Besides a known device name (uscanner), what does uscanner provide that ugen does not? -Warren Block * Rapid City, South Dakota USA