LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Any idea for a "headless" scan server (https://www.linuxquestions.org/questions/linux-software-2/any-idea-for-a-headless-scan-server-862892/)

matiasar 02-15-2011 02:29 PM

Any idea for a "headless" scan server
 
I'm setting up a print server (samba+cups) for a small office.
Printer is an HP F380 All-in-one. Linux acts as print server and give service to both windows and Linux workstations. This Box ("server") is gui-less, just CLI and ssh.

I configured also sane and hplip driver in order to the scanner works. Scanner is recognized and I can scan image throgh the tool:

Code:

scanimage > imagen.pnm
What I'd really like to achieve is a headless box, so any person could just press the button "Scan" onto the HP printer and a new file would be available in a directory shared, through samba.

Does anybody know if such solution is possible?
Or there's no other way than installing a wm and rest of gui for scanning?

Thanks in advance, regards,
Matías

corp769 02-15-2011 02:54 PM

If anything, can't you use a bash script to automate moving the scanned image? As far as just scanning without any physical input to the system, check this following link out. I can't view it from work; I think it has to do with what you are talking about.

gregable.com/2010/12/network-aware-sheetfed-scanner.html

matiasar 02-16-2011 06:17 AM

thanks!
 
Thanks for your reply and link.
Really the project from the link you provided seems a similar one. Actually I don't plan to use some kind of shetfeed in order to scan a bunch of documentes automaticaly. That would be just great...

Well, today in the morning (everything seems clearer at morning...) I found this this article: http://www.linux.com/archive/feature/59138?theme=print that drived me to http://scanbuttond.sourceforge.net/

Scanbutton seems to be exactly what I was looking for. I'll take a look ant test it.

Regards,
Matías

matiasar 02-16-2011 10:48 AM

Unfortunately, both scanbuttond and KScannerbuttons doesn't seem to support the device I'm using (HP Deskjet F380 all-in-one).

I think I'd rather keep on doing some research to see if is there any other way to get if a scanner button was pressed.

corp769 02-16-2011 10:56 AM

Yup, that's what you need!

---------- Post added 02-16-11 at 05:57 PM ----------

This is linux, it isn't easy as windows...

jefro 02-16-2011 07:08 PM

We use a business class HP product that allows one to send scans to a ftp server. You may need to up your scanner if you want features like you posted. I pondered this question and have no other solution.

matiasar 03-03-2011 10:32 AM

Well I finally found a workaroung for this issue by building an external button, and connecting to RING signal of an rs-232 port.
Wrote a little program to read the status of that pin, and when it goes high (button pressed) the program trigger the scan script.

Thanks for your help and ideas fellows.

corp769 03-03-2011 10:40 AM

Oh nice, glad to hear you got it working man. It's been a while since I worked with any rs-232 communications; does RING have to be grounded to get signal, or am I thinking of another pin?

matiasar 03-04-2011 06:25 AM

Hello Corp,

For me it was a long time no using rs-232 port too.
So, I chose to use RNG or DCD bits as long as they are "inputs", from modems for example. As far as I know for serial rs-232 signal levels: -12V means Low state and +12V is High state. So I only set RNG bit high when I want to trigger some action, in this case scanning a document.

So the little program I wrote is very simple, it opens a serial port defined by user, and keeps in a loop reading RING bit. When it detects that RNG went to high state it executes the script to do the scan.
My main guide researching on this topic was this book: http://www.easysw.com/~mike/serial/serial.html

If you are interested I could publish the little program (C lang.) somewhere in my blog.

Regards,
Matías

corp769 03-04-2011 08:59 AM

That would be awesome if you could, I have a few old computers laying around with serial ports, I would actually like to do something with them.

matiasar 03-04-2011 03:20 PM

Sure, I'll publish the little code next week, cos' we have a long weekend (Carnival) here and left the code at work. But as soon as it' published I'll let you know.

corp769 03-04-2011 05:03 PM

Sweet, thanks man.

Josh

matiasar 03-09-2011 07:41 AM

Notes and code
 
Hi Josh,

Finally I published the little code and notes here in LQ's blog space:

http://www.linuxquestions.org/questi...232-port-3639/

Hope could be usefull for some applications. And sorry for the languages, both my english and C aren't "pristines".

Regards,
Matías


All times are GMT -5. The time now is 10:58 PM.