Line 1: |
Line 1: |
| {{Languages|SANE}} | | {{Languages|SANE}} |
| | | |
− | Thank you to jaysee (IXUS) for his patience and help to the SANE's configuration
| + | ==Information== |
| + | SANE stands for "Scanner Access Now Easy" and is an application programming interface (API) that provides standardized access to any raster image scanner hardware (flatbed scanner, hand-held scanner, video- and still-cameras, frame-grabbers, etc.) |
| + | {{#smeversion:smeserver-sane}} |
| + | For more information on SANE have a look at the [http://www.sane-project.org/ SANE project website] |
| + | |
| + | ===Supported scanners=== |
| + | For a list of supported scanners have a look at [http://www.sane-project.org/sane-supported-devices.html this page]. |
| + | |
| + | Note the SME 8 rpm uses [http://www.sane-project.org/sane-backends-1.0.18.html this page] |
| + | |
| + | Note the SME 9 rpm uses [http://www.sane-project.org/sane-backends-1.0.21.html this page] |
| + | |
| + | ==Server== |
| + | This is the installation of the server part, you will also need to install drivers on your clients as described in the [[#Client|Client]] section. |
| | | |
− | Before installation, go to http://www.sane-project.org/sane-supported-devices.html to see if your scanner is supported.
| + | ===Installation=== |
| + | ==== SME 8.X, 9.X==== |
| | | |
− | On sme 7.3 the SANE's version is 1.0.14. (I compiled sane-1.0.17 for sme 7.3. There are many more drivers available. It will soon have a link here.)
| + | Install SANE and required packages |
| | | |
− | {{Incomplete}}
| + | yum --enablerepo=smecontribs install smeserver-sane |
− | ===Information=== | + | |
− | For more information on SANE have a look at the [http://www.sane-project.org/ SANE project website]
| + | ==== Finish the installation ==== |
− | ====Supported scanners====
| + | |
− | For a list of supported scanners have a look at [http://www.sane-project.org/sane-supported-devices.html this page].
| + | then |
| + | expand-template /etc/xinetd.conf |
| + | expand-template /etc/services |
| + | expand-template /etc/hosts.allow |
| + | expand-template /etc/sane.d/saned.conf |
| + | |
| + | service xinetd restart |
| + | |
| + | or if you prefer to restart your server |
| | | |
− | === Installation===
| + | signal-event post-upgrade; signal-event reboot |
− | To install SANE login to the SME Server shell as root and issue the following command:
| |
− | yum install sane-backends
| |
− | After succesfull installation issue the following commands:
| |
− | signal-event post-upgrade | |
− | signal-event reboot
| |
| | | |
− | ----------------------
| + | ====Testing the installation==== |
− | ==== Finding your scanner ==== | + | =====Finding your scanner===== |
| After installation and reboot you should be able to find your scanner with the following command: | | After installation and reboot you should be able to find your scanner with the following command: |
| | | |
− | sane-find-scanner
| + | sane-find-scanner |
| | | |
| The output should look like this: | | The output should look like this: |
Line 42: |
Line 59: |
| # can't be detected by this program. | | # can't be detected by this program. |
| | | |
− | ==== Determining assigned driver ==== | + | =====Determining assigned driver===== |
| To see which hardware location is assigned to the scanner issue the following command: | | To see which hardware location is assigned to the scanner issue the following command: |
| | | |
− | scanimage -L
| + | scanimage -L |
| | | |
| The output should look something like this: | | The output should look something like this: |
Line 51: |
Line 68: |
| device `plustek:libusb:001:002' is a Epson Perfection 1250/Photo USB flatbed scanner | | device `plustek:libusb:001:002' is a Epson Perfection 1250/Photo USB flatbed scanner |
| | | |
− | If a driver is found, you can continue the configuration, otherwise make following order to remove the rpm : sane-backends
| + | =====Aquisition===== |
| | | |
− | yum remove sane-backends
| + | To make a test scan you can issue the following command specifying the driver you determined in [[#Determining assigned driver|Determining assigned driver]]. |
− | | |
− | === (First) aquisition ===
| |
− | | |
− | To make a test scan you can issue the following command specifying the driver you determined in [SANE#Determining assigned driver]. | |
| | | |
| scanimage -d drivername --format tiff -l 0 -t 0 -x 215 -y 297 > outfile.tiff | | scanimage -d drivername --format tiff -l 0 -t 0 -x 215 -y 297 > outfile.tiff |
| | | |
− | Replace drivername with the driver determined in [SANE#Determining assigned driver], e.g.: | + | Replace drivername with the driver determined in [[#Determining assigned driver|Determining assigned driver]], e.g.: |
| | | |
| scanimage -d plustek:libusb:001:002 --format tiff -l 0 -t 0 -x 215 -y 297 > outfile.tiff | | scanimage -d plustek:libusb:001:002 --format tiff -l 0 -t 0 -x 215 -y 297 > outfile.tiff |
| | | |
− | === you can see the resolution of your scanner with this command === | + | === Uninstall === |
| + | You can remove SANE from your SME Server with the following command |
| + | rpm -e sane-backends sane-backends-libs smeserver-sane |
| | | |
− | /usr/bin/scanimage --help | grep -m 1 resolution
| + | ==Client== |
| | | |
− | For more informations on sane-backends possibilities:
| + | ===Windows XP and Vista=== |
| | | |
− | man sane
| + | http://sanetwain.ozuzo.net/ |
| | | |
− | ----------------------
| + | In download section, take the ZIP file (sanetwain127.zip and Windowsinstaller (setup127.exe) |
| | | |
− | === Adding your scanner to the network === | + | ====Configuration==== |
| | | |
− | saned is the SANE daemon. It gives an access to the image acquisition device available on the local host to remote clients.
| + | - index connection |
| + | :Hostname => address ip server |
| + | :Port => 6566 |
| + | :Username => user’s name |
| | | |
− | ----------------------
| + | I made : Get list of devices on startup |
| | | |
− | ====Updating of /etc/hosts.allow for sane====
| + | - index printer |
| + | :I made : Show printer setup dialog before print |
| + | :(I have several printers!) |
| | | |
− | Make in /etc/ hosts.allow a line with template-custom
| + | - index Startup |
| + | :I made : Acquire preview on program start |
| + | :Use as interface language => fr |
| | | |
− | mkdir /etc/e-smith/templates-custom/etc
| + | ====Usage==== |
− | mkdir /etc/e-smith/templates-custom/etc/hosts.allow/
| + | SANE TWAIN drivers have many possibilities. SANE TWAIN drivers can be used alone or called from another application (photoshop, acrobat, ...) like a classical usb scanner. |
− | | |
− | nano /etc/e-smith/templates-custom/etc/hosts.allow/saned
| |
− | =>
| |
− | saned: 127.0.0.1 10.97.1.0/255.255.255.0
| |
− | | |
− | (10.97.1.0 => your ip)
| |
− | | |
− | /sbin/e-smith/expand-template /etc/hosts.allow
| |
− | | |
− | ----------------------
| |
− | | |
− | ====Updating of /etc/services for sane==== | |
− | | |
− | Make in /etc/services a line with template-custom
| |
− | | |
− | mkdir /etc/e-smith/templates-custom/etc/services/
| |
− | | |
− | nano /etc/e-smith/templates-custom/etc/services/saned
| |
− | =>
| |
− | sane 6566/tcp # SANE network scanner daemon
| |
− | | |
− | /sbin/e-smith/expand-template /etc/services
| |
− | | |
− | ------------------------
| |
− | | |
− | ====Add the IP addresses of the computers which are authorized to use the scanner====
| |
− | | |
− | nano /etc/sane.d/saned.conf
| |
− | =>
| |
− | localhost
| |
− | adress-ip_customer1
| |
− | adress_ip_customer2
| |
− | | |
− | | |
− | ---------------------
| |
− | | |
− | ===Installation and configuration of SANE TWAIN drivers on windows platforms===
| |
− | | |
− | ====Installation of SANE TWAIN drivers====
| |
− | | |
− | http://sanetwain.ozuzo.net/
| |
| | | |
− | In download section, take the ZIPfile (sanetwain127.zip or Windowsinstaller (setup127.exe)
| + | ===MacOS X=== |
| + | SANE can also be installed on MacOS X, for more information have a look at |
| + | http://www.ellert.se/twain-sane/. |
| | | |
− | make :
| + | If you get things working on MacOS X please provide installation instructions here. |
− | setup127.exe
| |
− | | |
− | ====CONFIGURATION====
| |
− | | |
− | - index connection
| |
− | Hostname => address ip server
| |
− | Port => 6566
| |
− | Username => user’s name
| |
| | | |
− | I made : Get list of devices on startup
| + | ===Linux=== |
| + | To use SANE on your linux PC you need to install the xsane package. |
| | | |
− | - index printer
| + | ====Configuration==== |
− | I made : Show printer setup dialog before print
| + | Then configure xsane so that it knows where to find the server with the scanner attached, add a line with the IP address of your server to /etc/sane.d/net.conf on your client PC |
− | (I have several printers!)
| |
| | | |
− | - index Startup | + | nano -w /etc/sane.d/net.conf |
− | I made : Acquire preview on program start
| + | |
− | Use as interface language => fr
| + | IP_address_of_your_server |
| | | |
| ====Usage==== | | ====Usage==== |
| | | |
− | SANE TWAIN drivers have many possibilities. SANE TWAIN drivers can be used alone or called from another application (photoshop, acrobat, ...) like a classical usb scanner.
| + | You can use kooka or xsane or make the acquisition from other software for instance OpenOffice or GIMP. |
| | | |
| + | ===Client Troubleshooting=== |
| + | {{Incomplete}} |
| + | Only needed if your client can't find the scanner |
| | | |
− | ----------------------- | + | Disable saned |
| + | /etc/init.d/xinetd stop |
| + | or |
| + | config setprop saned status disabled |
| + | /sbin/e-smith/expand-template /etc/xinetd.conf |
| + | /etc/init.d/xinetd restart |
| | | |
− | ===First test on network===
| + | Start a terminal on your server. |
− | | + | saned -d128 |
− | Start a terminal on your server (with putty for example). | |
− | make :
| |
− | saned -d128
| |
| | | |
| example | | example |
| # saned -d128 | | # saned -d128 |
| [saned] main: starting debug mode (level 128) | | [saned] main: starting debug mode (level 128) |
− | [saned] main: trying to get port for service `sane-port' (getaddrinfo) | + | [saned] main: trying to get port for service `sane-port' (getaddrinfo) |
− | [saned] main: "sane-port" service unknown on your host; you should add
| |
− | [saned] main: sane-port 6566/tcp saned # SANE network scanner daemon
| |
− | [saned] main: to your /etc/services file (or equivalent). Proceeding anyway.
| |
| [saned] main: [0] socket () using IPv4 | | [saned] main: [0] socket () using IPv4 |
| [saned] main: [0] setsockopt () | | [saned] main: [0] setsockopt () |
Line 179: |
Line 156: |
| [saned] main: waiting for control connection | | [saned] main: waiting for control connection |
| | | |
− | If you have “waiting for control connection “, all sounds good. Now on your windows computer, open Scanimage (name of gui software for sanetwain) | + | If you have “waiting for control connection “, all sounds good. Now on your scanning software, eg Scanimage (name of gui software for sanetwain) |
| | | |
− | The scanner should start and lines should appear in the terminal (putty) | + | The scanner should start and lines should appear in the terminal. |
| | | |
| On the first connection, it often takes a long time and a message like this can appear: Time out reading word from socket | | On the first connection, it often takes a long time and a message like this can appear: Time out reading word from socket |
Line 188: |
Line 165: |
| Restart ' saned - d128 ' on the terminal and open Scanimage one more time, it should scan! | | Restart ' saned - d128 ' on the terminal and open Scanimage one more time, it should scan! |
| Lines are displayed on the terminal with putty. (type -d for debug mode) | | Lines are displayed on the terminal with putty. (type -d for debug mode) |
− |
| |
− | -----------------------
| |
− |
| |
− | ===Now automatize the saned startup===
| |
− |
| |
− | If xinetd is not installed :
| |
− |
| |
− | yum install xinetd
| |
− |
| |
− | Updating of /etc/xinetd.conf for sane
| |
− |
| |
− | Make in /etc/xinetd.conf a block with template-custom
| |
− |
| |
− | mkdir /etc/e-smith/templates-custom/etc/xinetd.conf/
| |
− |
| |
− | Create a users group where users are going to use the scanner
| |
− | I add a group, saned, with server-manager.
| |
− |
| |
− | nano /etc/e-smith/templates-custom/etc/xinetd.conf/20sane-port
| |
− | =>
| |
− | {
| |
− |
| |
− | $OUT = <<HERE;
| |
− |
| |
− | service sane
| |
− | {
| |
− | port = 6566
| |
− | socket_type = stream
| |
− | protocol = tcp
| |
− | user = root
| |
− | group = saned
| |
− | wait = no
| |
− | server = /usr/sbin/saned
| |
− | }
| |
− | HERE
| |
− | }
| |
− |
| |
− | /sbin/e-smith/expand-template /etc/xinetd.conf
| |
− |
| |
− | Make a link to allow xinetd to start during the server startup
| |
− | ln -s /etc/init.d/xinetd /etc/rc.d/rc7.d/S50xinetd
| |
− |
| |
− | /etc/init.d/xinetd restart
| |
− |
| |
− |
| |
− | -----------------------
| |
| | | |
| The first time, I didn’t succeed to use the scanner on my windows computer when using sanetwain | | The first time, I didn’t succeed to use the scanner on my windows computer when using sanetwain |
Line 243: |
Line 174: |
| I put in comment (# in front of the line) all lines which did not correspond to my driver. | | I put in comment (# in front of the line) all lines which did not correspond to my driver. |
| | | |
− | -----------------------
| + | Enable saned when finished |
− | | + | /etc/init.d/xinetd start |
− | ===With MacOS X plateform===
| + | or |
− | | + | config setprop saned status enabled |
− | There would also be the possibility to use sane.
| + | /sbin/e-smith/expand-template /etc/xinetd.conf |
− | | + | /etc/init.d/xinetd restart |
− | It has links on the sanetwain site => http://www.ellert.se/twain-sane/
| + | === Bugs === |
− | | + | Please raise bugs under the SME-Contribs section in {{BugzillaFileBug|product=|component=|title=bugzilla}}and select the smeserver-sane component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-sane|title=this link}}. |
− | To test...
| + | {{#bugzilla:columns=id,product,version,status,summary |sort=id |order=desc |component=smeserver-sane |noresultsmessage="No open bugs found."}} |
− | | + | ---- |
− | I doesn’t have a mac
| + | [[Category:Contrib]] |
− | | + | [[Category:Administration]] |
− | -----------------------
| |
− | | |
− | ===With linux platform=== | |
− | | |
− | It’s necessary to install xsane (already installed on my pc).
| |
− | | |
− | It’s enough to configure xsane so that it achieves the scanner on the server.
| |
− | | |
− | nano /etc/sane.d/net.conf (sur le pc client)
| |
− | =>
| |
− | address-ip_server
| |
− | | |
− | You can use xsane or make the acquisition from a software (openoffice, gimp, ...)
| |