Scanner
13. Februar 2009 - 10:15

Scanner Canoscan N650U

 

looking for the scanner:

root@Openwrt: lsusb
Bus 004 Device 001: ID 0000:0000
Bus 004 Device 002: ID 04a9:2206 Canon, Inc. CanoScan N650U/N656U <- Jippy, the Scanner
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 002: ID 0781:6100 SanDisk Corp.

install sane-backends, frontends and xinitd:

root@Openwrt: opkg install sane-backends sane-frontends xinitd 

 

sane-backends - 1.0.19-2 - SANE (Scanner Access Now Easy) is a universal scanner interface. the kernel modul kmod-usb-scanner ist not needed, all work is done by libusb

Network access:

Test:

root@Openwrt: saned -d128 
[saned] main: starting debug mode (level 128)
[saned] main: trying to get port for service `sane' (getservbyname) 
[saned] main: could not find `sane' service (Input/output error) 
[saned] main: using default port 6566 [saned] main: socket () 
[saned] main: setsockopt () 
[saned] main: bind () 
[saned] main: listen () 
[saned] main: waiting for control connection 

if access denied for IP xxx.xxx.xxx.xxx look into the /etc/hosts and add an alias

/etc/hosts 
<IP-Adresse> meinhost.meinedomain.org aliasname 
127.0.0.1    localhost 
192.168.1.1    computername    OpenWrt

Now, I edited the /etc/sane.d/saned.conf file so that any machine in my subnet (using CIDR notation) could access the SANE server:

... 192.168.1.0/24 ... 

I created the file /etc/services with the following contents:

sane-port     6566/tcp  

I created the file /etc/xinetd.d/sane with the following contents:

service sane-port {
   socket_type = stream
   server = /usr/sbin/saned
   protocol = tcp
   user = root
   group = root
   wait = no
   disable = no 
}  

start the xinitd service by: /etc/initd/xinitd start Add /etc/rc.d the link to xinitd by the following comand: ln -s ../init.d/xinitd S98xinitd to start the service automaticly.

windows access:

http://sanetwain.ozuzo.net/

Crosscompilation of the scanbuttond:

Get the sources from http://scanbuttond.sourceforge.net/

First we need the Library libusb in the OpenWRT build. I just added the libisb packages from the package repository (https://dev.openwrt.org/browser/packages/libs/libusb) to the OpenWrt packages on my hdd, than I added it on the make menuconfig, compiled it. Now my cross compiler has the libusb.

To compile the scanbuttond locate the bin directory of the mipsel-linux toolchain, normaly

<OpenWrt Dir>/staging_dir/toolchain-mipsel_gcc<Version=3.4.6>/bin

and add this path to the PATH variable:

export PATH=$PATH:<OpenWRT Dir>/staging_dir/toolchain-mipsel_gcc<Version=3.4.6>/bin

 Now you can configure scanbuttond:

CFLAGS="-I<OpenWRT Dir>/staging_dir/target-mipsel_uClibc-0.9.29/usr/include"
LDFLAGS="-L<OpenWRT Dir>/staging_dir/target-mipsel_uClibc-0.9.29/usr/lib"
./configure --host=mipsel-linux --sysconfdir=/etc

TODO:

to react on the scanner button, use the scannerbuttond tool

Scanner CanoScan LIDE70

Work started for the sane-backends:

http://www.juergen-ernst.de/info_sane.html

 [back]