Re: Epson MFP CX5600 was Re: usb2 + scanner HP ScanJet 4300C

From: Warren Block <wblock_at_wonkity.com>
Date: Wed, 11 Nov 2009 20:57:16 -0700 (MST)
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: <SuYin> at usbus1
> Nov 11 17:24:51 ed kernel: ugen2.2: <EPSON> at usbus2
> Nov 11 17:24:51 ed kernel: ulpt0: <USB2.0 Printer> 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
Received on Thu Nov 12 2009 - 02:57:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:57 UTC