Friday, July 18, 2014

MK802+ as a home server (Part 8) : Scan Server for windows (32bit /64bit) based computers

Whoa , part 8 . Yes i've not published some of other parts yet but since this is done i will publish it first :D.

For this post , i need to set my all in one old scanner for use over the network . I actually found a lot of people doing this , so i thought why not do it with my MK802 as well , specially that I've been using it for almost a year now. I have an HP All-in-one F2280 and this is the model that i will test with through this post.

Installing the Scanner
At first , I couldn't get the scanner to be detected by debian , so i ran
hp-setup -i and still , it couldn't detect the scanner by itself.
Anyway , I installed the HPLip , with apt-get install Hplip
I did a test to check that the scanner is detected,  i used the command
scanimage -L
The result came out as follows

which basically means the scanner is now detected.

Next , i go setup the printer using the command
hp-setup -i

and then follow the wizard.

Configuring Sane-Utils
Because we need to enable the scanner remotely the Sane-utils should be run as a daemon (background server) . To do this we need to run saned. I got the how to from this guide . Please note that i'm using nano (a text editor) instead of gedit to configure the saned daemon.
So i will use the command
nano /etc/default/saned
and edit the line RUN=no to become RUN=yes next is configuring the access list by
nano /etc/sane.d/saned.conf

we'll continue with this guide here . There are no special remarks here except that , just like the last paragraph in the guide , we may have to a modify permissions of saned user and set reading permission on the /dev path of the scanner. You'll also notice that i commented a modification to the guide, please read and apply it or it won't work.
sudo adduser saned lp
sudo adduser saned saned
Note:  To find the /dev path we'll go to the /dev using the cd command. Now unplug and replug the scanner's usb and run command dmesg. Mine turned to be usblp0 under usb/lp0  This is done by running the command (i got it from here)
chown root:saned /dev/usb/lp0 && chmod g+rw /dev/usb/lp0 
The Windows Front End I'm using windows 8.1 64 bit , the only solution that worked was software published on sourceforge Please download , install and run. Press acquire then you'll get the host configuration Provided that everything was setup correctly the next dialog will bring you the available devices ,and your scanner should be listed. The program finally provides an interface for doing the actual scanning. Happy Scanning over the network !!!

The Linux (Ubuntu) Front End was a bit tricky to say the least. The general process entitles installing xsane, sane-utils and libsane (and hplip if you have an HP). we should also be adding the IP of the saned server to the end of a file gedit /etc/sane.d/net.conf .
For my HP all in one, things were a bit different
1- I copied the printer URL from CUPS server on the saned server , the URL will look something like that hp:/usb/MODEL_NAME?serial=sn . MODEL_NAME is to be copied for the next step
2- I added the printer in CUPS to the client (add printer --> HPLIP)  in following format
replacing MODEL_NAME and SANED_SERVER_IP with their respective values
3- It may also be worth to mention to re-download hplip from
4- starting Xsane found the scanner

SaneOverNetwork : Debian Wiki