Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-15-2011, 03:29 PM
|
#1
|
Member
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 321
Rep:
|
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
|
|
|
02-15-2011, 03:54 PM
|
#2
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
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
|
|
|
02-16-2011, 07:17 AM
|
#3
|
Member
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 321
Original Poster
Rep:
|
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
|
|
|
02-16-2011, 11:48 AM
|
#4
|
Member
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 321
Original Poster
Rep:
|
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.
|
|
|
02-16-2011, 11:56 AM
|
#5
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
Yup, that's what you need!
---------- Post added 02-16-11 at 05:57 PM ----------
This is linux, it isn't easy as windows...
|
|
|
02-16-2011, 08:08 PM
|
#6
|
Moderator
Registered: Mar 2008
Posts: 22,177
|
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.
|
|
|
03-03-2011, 11:32 AM
|
#7
|
Member
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 321
Original Poster
Rep:
|
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.
|
|
|
03-03-2011, 11:40 AM
|
#8
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
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?
|
|
1 members found this post helpful.
|
03-04-2011, 07:25 AM
|
#9
|
Member
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 321
Original Poster
Rep:
|
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
|
|
|
03-04-2011, 09:59 AM
|
#10
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
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.
|
|
|
03-04-2011, 04:20 PM
|
#11
|
Member
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 321
Original Poster
Rep:
|
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.
|
|
|
03-04-2011, 06:03 PM
|
#12
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
Sweet, thanks man.
Josh
|
|
|
03-09-2011, 08:41 AM
|
#13
|
Member
Registered: Nov 2006
Location: Argentina
Distribution: Debian
Posts: 321
Original Poster
Rep:
|
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:18 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|