From owner-freebsd-current@FreeBSD.ORG Thu Nov 12 03:57:59 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C71641065672 for ; Thu, 12 Nov 2009 03:57:59 +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 739528FC17 for ; Thu, 12 Nov 2009 03:57:59 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.3/8.14.3) with ESMTP id nAC3vGQl070262; Wed, 11 Nov 2009 20:57:16 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.3/8.14.3/Submit) with ESMTP id nAC3vGOh070259; Wed, 11 Nov 2009 20:57:16 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Wed, 11 Nov 2009 20:57:16 -0700 (MST) From: Warren Block To: eculp In-Reply-To: <20091111175935.19402q31p6gbp1q8@econet.encontacto.net> Message-ID: References: <20091111175935.19402q31p6gbp1q8@econet.encontacto.net> 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.2.2 (wonkity.com [127.0.0.1]); Wed, 11 Nov 2009 20:57:16 -0700 (MST) Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Epson MFP CX5600 was Re: usb2 + scanner HP ScanJet 4300C X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2009 03:58:00 -0000 On Wed, 11 Nov 2009, eculp wrote: > Based on the Luigi's link included in an almost year old email to these > lists, I purchased an Epson CX5600 with all intentions of using the scanner > but never seemed to get around to configuring it. Many things have happened > since then including new USB, etc. etc. The printer still works fine using > cups. I have just tried to configure the scanner without luck. A device > isn't created in /dev and only the printer is recognized on boot: > > Nov 11 17:24:51 ed kernel: uhub0: 5 ports with 5 removable, self powered > Nov 11 17:24:51 ed kernel: uhub2: 5 ports with 5 removable, self powered > Nov 11 17:24:51 ed kernel: GEOM: ad4s2: geometry does not match label > (255h,63s != 16h,63s). > Nov 11 17:24:51 ed kernel: GEOM: ad4s3: geometry does not match label > (255h,63s != 16h,63s). > Nov 11 17:24:51 ed kernel: uhub1: 5 ports with 5 removable, self powered > Nov 11 17:24:51 ed kernel: uhub3: 5 ports with 5 removable, self powered > Nov 11 17:24:51 ed kernel: ugen1.2: at usbus1 > Nov 11 17:24:51 ed kernel: ugen2.2: at usbus2 > Nov 11 17:24:51 ed kernel: ulpt0: on usbus2 > Nov 11 17:24:51 ed kernel: ulpt0: using bi-directional mode > > I installed: > > drwxr-xr-x 2 root wheel 512 Nov 11 16:27 sane-backends-1.0.20_4 > drwxr-xr-x 2 root wheel 512 Nov 11 16:41 sane-frontends-1.0.14_5 > drwxr-xr-x 2 root wheel 512 Nov 11 16:47 xsane-0.996_1 > > added entries in usbdevs Not needed for scanners any more, I think. > and devd.conf. Things are different than they used to be since uscanner(4) is gone. Now, you can just refer to the USB device, probably ugen2.2 from above. The Handbook scanning section does have notes for FreeBSD 8. However, I wanted to create a static device for the scanner at uscanner0. First, devd is used to recognize the scanner on attach. devd.conf: attach 20 { device-name "ugen[0-9]+"; match "vendor" "0x04b8"; match "product" "0x010a"; action "/bin/ln -sf /dev/$device-name /dev/uscanner0; \ /sbin/devfs rule applyset" detach 20 { device-name "ugen[0-9]+"; match "vendor" "0x04b8"; match "product" "0x010a"; action "/bin/rm /dev/uscanner0" Note that this doesn't care which ugen device is created, it looks for the vendor and product ID of the scanner. When that device attaches, a link is created to /dev/uscanner0 and devfs rules are reapplied so the owner and permissions are set on that link. Speaking of which, devfs.rules: add path 'ugen*' mode 0660 group operator add path 'usb*' mode 0770 group operator add path 'uscanner*' mode 0660 group operator About that middle rule: I found that was needed to let non-root members of the operator group scan. It may be a mistake. And finally, /usr/local/etc/sane.d/epson.conf has just: usb /dev/uscanner0 -Warren Block * Rapid City, South Dakota USA