Difference between revisions of "SANE"

From SME Server
Jump to navigationJump to search
 
(34 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
{{Languages|SANE}}
 
{{Languages|SANE}}
{{Incomplete}}
 
  
 
==Information==
 
==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]
 
For more information on SANE have a look at the [http://www.sane-project.org/ SANE project website]
 +
 
===Supported scanners===
 
===Supported scanners===
 
For a list of supported scanners have a look at [http://www.sane-project.org/sane-supported-devices.html this page].
 
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==
 
==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.
 
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.
 +
 
===Installation===
 
===Installation===
====Installing required packages====
+
==== SME 8.X, 9.X====
To install SANE and required packages
+
 
 +
Install SANE and required packages
 +
 
 +
yum --enablerepo=smecontribs install  smeserver-sane
 +
 
 +
==== Finish the installation ====
 +
 
 +
then
 +
expand-template /etc/xinetd.conf
 +
expand-template /etc/services
 +
expand-template /etc/hosts.allow
 +
expand-template /etc/sane.d/saned.conf
 
   
 
   
(for now download sane-backends and smeserver-sane from the locations show in Talk)
+
service xinetd restart
 +
 
 +
or if you prefer to restart your server
  
  yum localinstall sane-backends smeserver-sane
+
  signal-event post-upgrade; signal-event reboot
  
 
====Testing the installation====
 
====Testing the installation====
Line 57: Line 77:
  
 
  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
 
  
 
=== Uninstall ===  
 
=== Uninstall ===  
 
You can remove SANE from your SME Server with the following command
 
You can remove SANE from your SME Server with the following command
  rpm -e sane-backends smeserver-sane libieee1284 xinetd
+
  rpm -e sane-backends sane-backends-libs smeserver-sane
 
 
 
 
===Updating of /etc/sane.d/saned.conf for sane===
 
 
 
Add the IP addresses of the computers which are authorized to use the scanner
 
 
 
  nano /etc/e-smith/templates/etc/sane.d/saned.conf/30local
 
   
 
  adress-ip_1
 
  adress_ip_2
 
 
 
  expand-template /etc/sane.d/saned.conf
 
  
 
==Client==
 
==Client==
Line 81: Line 88:
 
http://sanetwain.ozuzo.net/
 
http://sanetwain.ozuzo.net/
  
In download section, take the ZIPfile (sanetwain127.zip or Windowsinstaller (setup127.exe)  
+
In download section, take the ZIP file (sanetwain127.zip and Windowsinstaller (setup127.exe)  
 
 
make :
 
  setup127.exe
 
  
 
====Configuration====
 
====Configuration====
  
 
- index connection  
 
- index connection  
Hostname  => address ip server
+
:Hostname  => address ip server
Port => 6566  
+
:Port => 6566  
Username => user’s name  
+
:Username => user’s name  
  
 
I made : Get list of devices on startup
 
I made : Get list of devices on startup
  
 
- index printer  
 
- index printer  
I made : Show printer setup dialog before print  
+
:I made : Show printer setup dialog before print  
(I have several printers!)  
+
:(I have several printers!)  
  
 
- index Startup  
 
- index Startup  
I made : Acquire preview on program start  
+
:I made : Acquire preview on program start  
Use as interface language => fr  
+
:Use as interface language => fr  
 +
 
 +
====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.
 +
 
 +
===MacOS X===
 +
SANE can also be installed on MacOS X, for more information have a look at
 +
http://www.ellert.se/twain-sane/.
 +
 
 +
If you get things working on MacOS X please provide installation instructions here.
 +
 
 +
===Linux=== 
 +
To use SANE on your linux PC you need to install the xsane package.
 +
 
 +
====Configuration====
 +
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
 +
 
 +
  nano -w /etc/sane.d/net.conf
 +
   
 +
  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
  
====Testing====
+
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
  
Start a terminal on your server (with putty for example).  
+
Start a terminal on your server.  
make :
+
saned -d128  
  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 128: 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 146: 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.  
  
===MacOS X===
+
Enable saned when finished
SANE can also be installed on MacOS X, for more information have a look at
+
/etc/init.d/xinetd start
http://www.ellert.se/twain-sane/.  
+
or
 
+
config setprop saned status enabled
If you get things working on MacOS X please provide installation instructions here.
+
/sbin/e-smith/expand-template /etc/xinetd.conf
 
+
/etc/init.d/xinetd restart
===Linux===
+
=== Bugs ===
To use SANE on your linux PC you need to install the xsane package.  
+
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}}.
 
+
{{#bugzilla:columns=id,product,version,status,summary |sort=id |order=desc |component=smeserver-sane |noresultsmessage="No open bugs found."}}
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
 
 
 
You can use kooka or xsane or make the acquisition from other software for instance OpenOffice or GIMP.
 
 
----
 
----
 
[[Category:Contrib]]
 
[[Category:Contrib]]
 +
[[Category:Administration]]

Latest revision as of 12:57, 9 August 2017


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.)

Contrib 10:
Contrib 9:
smeserver-sane
The latest version of smeserver-sane is available in the SME repository, click on the version number(s) for more information.


For more information on SANE have a look at the SANE project website

Supported scanners

For a list of supported scanners have a look at this page.

Note the SME 8 rpm uses this page

Note the SME 9 rpm uses 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 section.

Installation

SME 8.X, 9.X

Install SANE and required packages

yum --enablerepo=smecontribs install  smeserver-sane

Finish the installation

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

signal-event post-upgrade; signal-event reboot

Testing the installation

Finding your scanner

After installation and reboot you should be able to find your scanner with the following command:

sane-find-scanner 

The output should look like this:

# No SCSI scanners found. If you expected something different, make sure that 
# you have loaded a SCSI driver for your SCSI adapter. 
# Also you need support for SCSI Generic (sg) in your operating system. 
# If using Linux, try "modprobe sg". 

found USB scanner (vendor=0x04b8 [EPSON], product=0x010f [EPSON Scanner 010F], chip=LM9832/3) at libusb:001:002 
# Your USB scanner was (probably) detected. It may or may not be supported by 
# SANE. Try scanimage -L and read the backend's manpage. 
 
# Not checking for parallel port scanners. 
 
# Most Scanners connected to the parallel port or other proprietary ports 
# can't be detected by this program. 
Determining assigned driver

To see which hardware location is assigned to the scanner issue the following command:

scanimage -L 

The output should look something like this:

device `plustek:libusb:001:002' is a Epson Perfection 1250/Photo USB flatbed scanner 
Aquisition

To make a test scan you can issue the following command specifying the driver you determined in Determining assigned driver.

scanimage -d drivername --format tiff -l 0 -t 0 -x 215 -y 297 > outfile.tiff 

Replace drivername with the driver determined in Determining assigned driver, e.g.:

scanimage -d plustek:libusb:001:002 --format tiff -l 0 -t 0 -x 215 -y 297 > outfile.tiff

Uninstall

You can remove SANE from your SME Server with the following command

rpm -e sane-backends sane-backends-libs  smeserver-sane

Client

Windows XP and Vista

http://sanetwain.ozuzo.net/

In download section, take the ZIP file (sanetwain127.zip and Windowsinstaller (setup127.exe)

Configuration

- index connection

Hostname => address ip server
Port => 6566
Username => user’s name

I made : Get list of devices on startup

- index printer

I made : Show printer setup dialog before print
(I have several printers!)

- index Startup

I made : Acquire preview on program start
Use as interface language => fr

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.

MacOS X

SANE can also be installed on MacOS X, for more information have a look at http://www.ellert.se/twain-sane/.

If you get things working on MacOS X please provide installation instructions here.

Linux

To use SANE on your linux PC you need to install the xsane package.

Configuration

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

 nano -w /etc/sane.d/net.conf 
   
 IP_address_of_your_server 

Usage

You can use kooka or xsane or make the acquisition from other software for instance OpenOffice or GIMP.

Client Troubleshooting

Incomplete.png Incomplete:
This article or section needs to be expanded. Please help to fill the gaps or discuss the issue on the talk page


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 

Start a terminal on your server.

saned -d128 

example

 # saned -d128 
 [saned] main: starting debug mode (level 128) 
 [saned] main: trying to get port for service `sane-port' (getaddrinfo)  
 [saned] main: [0] socket () using IPv4 
 [saned] main: [0] setsockopt () 
 [saned] main: [0] bind () to port 6566 
 [saned] main: [0] listen () 
 [saned] main: [1] socket () using IPv6 
 [saned] main: [1] socket failed: Address family not supported by protocol 
 [saned] main: waiting for control connection 

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.

On the first connection, it often takes a long time and a message like this can appear: Time out reading word from socket Close Scanimage... saned must close up under putty (else ctrl+C to close saned and to come back to the prompt)

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)

The first time, I didn’t succeed to use the scanner on my windows computer when using sanetwain

=> outdated delay of wait..

I resolved problem by changing the file /etc/sane.d/dll.conf

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
or
config setprop saned status enabled
/sbin/e-smith/expand-template /etc/xinetd.conf
/etc/init.d/xinetd restart

Bugs

Please raise bugs under the SME-Contribs section in bugzilla and select the smeserver-sane component or use this link .

IDProductVersionStatusSummary (2 tasks)
4866SME Contribs7.4CONFIRMEDsmeserver-sane problem with specific scanner driver
4278SME Contribs7.3CONFIRMEDscanner permissions