Port-sandpoint archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: QNAP TS 101 as sane- server -problem



Hi,

I want to describe my setup for a scanner server.

First of all you need to build a NetBSD kernel without "uscanner" (and maybe "usscanner") driver. The USB-Scanner will work with libusb later (libusb will be installed as dependency from sane-backends)

Than make sure ugen* and usb* are available with correct settings in /dev. All devices should have read and write for user root and group wheel:

arnie# ls -l /dev | grep ugen0
crw-rw----  1 root  wheel      42,       0 Nov 29  2012 ugen0.00
crw-rw----  1 root  wheel      42,       1 Nov 29  2012 ugen0.01
...
...

arnie# ls -l /dev | grep usb
crw-rw----  1 root  wheel      39,     255 Nov 29  2012 usb
crw-rw----  1 root  wheel      39,       0 Nov 29  2012 usb0
crw-rw----  1 root  wheel      39,       1 Nov 29  2012 usb1
...
...

Now attach the scanner and have a look with "tail -f /var/log/messages". You should get something like this:

Mar  4 20:43:19 arnie /netbsd: ugen0 at uhub0 port 2
Mar 4 20:43:19 arnie /netbsd: ugen0: EPSON EPSON Scanner, rev 1.10/1.00, addr 2

Ok. Scanner is attached as ugen0 and libusb should be able to work with it.

Now install "sane-backends" package from pkgsrc (or maybe binary package).

You should get something like that (as root or member of group "wheel"):

arnie# sane-find-scanner -q
found USB scanner (vendor=0x04b8 [EPSON], product=0x011d [EPSON Scanner], chip=LM9832/3) at libusb:/dev/usb0:/dev/ugen0


You have to edit the following files (as described in "man saned"):

1. /etc/inetd.conf
add the line:

sane-port stream tcp nowait saned.saned /usr/pkg/sbin/saned    saned

Attention!
--> add user "saned" and add group "saned" to your system
---> add user "saned" to "wheel"- group (because wheel should have read and write access to /dev/ugen*)



2. /etc/services
the line:

 sane-port 6566/tcp # SANE network scanner daemon

should be there; otherwise add it


3. /usr/pkg/etc/sane/saned.conf

add a line to specify the computer(s) or a network from which saned should be used (e.g.):

192.168.10.0/24    # all computers in that network


now reboot or reread inetd.conf (e.g. kill -HUP `cat /var/run/inetd.pid`)


You can test to connect to sane-service with telnet:

arnie# telnet localhost 6566
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Ctrl-C quits the telnet test

You can test it remote with telnet, too:

no-panic-hihihi$ telnet 192.168.10.241 6566
Trying 192.168.10.241...
Connected to 192.168.10.241.
Escape character is '^]'.

Ok. Server is ready so far. Maybe there is a better setup for security reasons but this should be ok in trusted networks.




Now setup your client. You have to install the "sane-frontend" package or a tool you want to use (e.g. XSane, Kooka..)

In /usr/pkg/etc/sane you have to look after two files:

1. dll.conf    #here are listed all backends
the line

    net

should be there; otherwise add it

2. net.conf

add a line with address or name of the scanner server (e.g.):

192.168.10.241

Ok. Client setup is ready and you can start you application (e.g. xsane). After some moments the scanner should be found and you can scan.


I hope I didn't forget something :-)

Have fun!

Greetings,
Helge



Home | Main Index | Thread Index | Old Index