Date: Sat, 08 Dec 2007 03:07:38 -0700 From: Predrag Punosevac <punosevac@math.arizona.edu> To: =?ISO-8859-15?Q?Micha=EBl_Gr=FCnewald?= <michael.grunewald@laposte.net> Cc: "Jason C. Wells" <jcw@highperformance.net>, freebsd general questions <freebsd-questions@freebsd.org> Subject: Re: Scanner Compatibility Message-ID: <475A6CEA.8040500@math.arizona.edu> In-Reply-To: <86wsrpaao5.fsf@Llea.celt.neu> References: <4757979F.5020109@highperformance.net> <4757B9CC.4030600@math.arizona.edu> <86wsrpaao5.fsf@Llea.celt.neu>
next in thread | previous in thread | raw e-mail | index | archive | help
Michaël Grünewald wrote: > Predrag Punosevac <punosevac@math.arizona.edu> writes: > > >> I use Epson Perfection 1670 and it works like a charm. Unfortunately >> it does require binary blob which might be something you want to >> avoid. >> > > What is that binary blob stuff? Do you mean by this a binary image > that should be loaded in kernel --- after being correctly wrapped just > like some wifi card drivers? If this is the case, there is no chance > to make the blob work under amd64, is there? > > Ok, Let me clarify firstly some things. Firmware is a binary file which you extract in this case from the M$ .cab file supplied to you by scanner manufacturer. You place this file on proper file /usr/local/share/sane/snapscan. (So it is different than a kernel module for Wi drivers that you kldload into your kernel) I have never bothered to understand scanning as much as I tried to understand Unix printing but I believe that this file is used by sane to speak proprietary language of your particular scanner. In essence your scanner uses this file to explain the Sane the page layout and graphics. So it is not a driver! I am not sure if there is such thing as Command Scanner Language (you are probably familiar with Command Printer Language) and something equivalent to Postscript language in world of printers. Anyhow, if you are serious about security you should never use any type of binaries supported by hardware vendors. (I sound if I have been using too much OpenBSD lately :-) ) I see no reason why should sane-backhands work any different on amd64. On another hand if you are using amd64 that tells me that you are running serious production servers so why would you want to attach a scanner to such machine is not really clear to me. You may attach a scanner to a workstation running i386 and possibly make scanning available on the local network but never to serious production server. >> If you need step by step instructions how to install scanner you >> might contact me via private mail. >> > > I am very interested in this kind of technical information, since I do > foreplan to buy a scanner. If you really think[1] this discussion would > be a nuisance for the list, would you be kind enough to CC me? > > [1] One can consider that even if the discussion topic does not hit > most of its members, it can be useful to contribute here these > technical details because they will be archived and could then be > referenced in future discussions, searched, etc. > As I said before the handbook is excellent but here is my quick and dirty step by step how to for scanners. For the purposes of this how to I will assume that your scanner is attached via USB to your workstation. (You can read the handbook about SCSI scanners) Step 1 Make sure your kernel contains the following (Generic Kernel will contain it!!!) device usb device uhci device ohci device uscanner Step 2 Edit /etc/devfs.conf with the permissions perm ugen* 0666 perm uscanner* 0666 This is of course huge security risk and there are much better ways to give access to sane-backhands and common users to device nodes. Step 3 Reboot the computer Step 4 Type $ scanimage -L as a common user to get a list of detected scanners. You should get something as [pedja@ /usr/home/Pedja]$ scanimage -L device `snapscan:/dev/uscanner0' is a EPSON EPSON Scanner flatbed scanner Step 5 Type $ scanimage -T as a common user to test the installation. You should get something like this if your scanner does not need binary blob. [pedja@ /usr/home/Pedja]$ scanimage -T scanimage: scanning image of size 2552x3507 pixels at 24 bits/pixel scanimage: acquiring RGB frame, 8 bits/sample scanimage: reading one scanline, 7656 bytes... PASS scanimage: reading one byte... PASS scanimage: stepped read, 2 bytes... PASS scanimage: stepped read, 4 bytes... PASS scanimage: stepped read, 8 bytes... PASS scanimage: stepped read, 16 bytes... PASS scanimage: stepped read, 32 bytes... PASS scanimage: stepped read, 64 bytes... PASS scanimage: stepped read, 128 bytes... PASS scanimage: stepped read, 256 bytes... PASS scanimage: stepped read, 512 bytes... PASS scanimage: stepped read, 1024 bytes... PASS scanimage: stepped read, 2048 bytes... PASS scanimage: stepped read, 4096 bytes... PASS scanimage: stepped read, 8192 bytes... PASS scanimage: stepped read, 8191 bytes... PASS scanimage: stepped read, 4095 bytes... PASS scanimage: stepped read, 2047 bytes... PASS scanimage: stepped read, 1023 bytes... PASS scanimage: stepped read, 511 bytes... PASS scanimage: stepped read, 255 bytes... PASS scanimage: stepped read, 127 bytes... PASS scanimage: stepped read, 63 bytes... PASS scanimage: stepped read, 31 bytes... PASS scanimage: stepped read, 15 bytes... PASS scanimage: stepped read, 7 bytes... PASS scanimage: stepped read, 3 bytes... PASS Note: All of the above is very well explained in man scanimage Step 6 Read carefully the output of scanimage -T because it is a key for the trouble shooting your scanner. Step 7 If you need firmware compile the port /usr/ports/archivers/cabextract Step 8 From the CD that came with your scanner and M$ .cub file extract ESFW30.BIN (This is firmware file for my scanner) Step 9 cp ESFW30.BIN /usr/local/share/sane/snapscan/your-firmwarefile.bin (Keep the file name your-firmwarefile.bin|| unless you want to edit one of sane configuration files:-) Step 10 Try again scanimage -T Step 11 Read carefully the output. Step 12 If it still does not work cd /usr/local/etc/sane.d as a supper user Step 13 # ls (And you should see something like ) [pedja@ /usr/local/etc/sane.d]$ ls abaton.conf genesys.conf ricoh.conf agfafocus.conf gt68xx.conf s9036.conf apple.conf hp.conf saned.conf artec.conf hp4200.conf sceptre.conf artec_eplus48u.conf hp5400.conf sharp.conf avision.conf ibm.conf sm3840.conf bh.conf leo.conf snapscan.conf canon.conf lexmark.conf sp15c.conf canon630u.conf ma1509.conf st400.conf coolscan.conf matsushita.conf stv680.conf coolscan2.conf microtek.conf tamarack.conf dc210.conf microtek2.conf teco1.conf dc240.conf mustek.conf teco2.conf dc25.conf mustek_usb.conf teco3.conf dist nec.conf test.conf dll.conf net.conf u12.conf dmc.conf pie.conf umax.conf epson.conf plustek.conf umax1220u.conf fujitsu.conf plustek_pp.conf umax_pp.conf Step 14 As my scanner is epson I will carefully inspect file epson.conf and make sure my scanner model is listed in the file. Note: It always helps to have up to date ports tree and the latest version of sane-backhands as the models are constantly updated. Step 15 Start Xsane (Kooka) as a common user (never as a root) and enjoy your scanning. If your scanner was listed on Sane website as completely supported or good supported (means some obscure feature is not supported) you will be able to scan documents with the same quality and easy of use as if you were using Windows. Note also that you might need to set preferences for Xsane. I for one use scanner mostly to scan the documents so I prefer to keep them as .pdf file. If you are using scanner to scan old photos or old negatives you probably want different format. You will see setting Xsane is an art in its own right and there are tons of options. Remark: It is possible to get more scanners working with Sane-frontends as it contains usually the latest not fully tested drivers. Also some of HP flat bad scanners working using the binaries from HPLIP. Best, Predrag P. S. I left out scanning over the network from this how to. That probably should be consider advanced topic in scanning.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?475A6CEA.8040500>