LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 07-22-2011, 03:56 AM   #1
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
sane device information for network scanner


hi,

OS: CentOS 5.6

yesterday i bought a new HP network printer/scanner (OfficeJet Pro 8500). It installed correctly using hplip drivers. I can print and scan without any problem, very nice and fast device.

I did some research where the information where the device port is stored in sane, but cannot find anything. I tried to remove my old network device port for my Brother scanner, but did not find the config file where this information is stored. Neither /etc/sane.d/* nor ~/.sane/xsane/* contains this information.

Can someone point me to the right direction.

Thanks.
 
Old 07-23-2011, 12:05 AM   #2
jtarin
Member
 
Registered: May 2010
Location: Vladivostok, Russia
Distribution: LinuxMint 17
Posts: 104

Rep: Reputation: 23
You could use an Nmap command.
 
Old 07-23-2011, 04:02 AM   #3
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Original Poster
Rep: Reputation: 137Reputation: 137
I am not talking about a TCP Port, lpd uses 515, jet direct port is 9100. These two where used for the communication to the printer.

I am talking about the device port specification in format like
Code:
#> scanimage -L

device `brother2:net1;dev0' is a Brother MFC-5440CN MFC5440CN
device `hpaio:/net/Officejet_Pro_8500_A910?ip=192.168.0.116' is a HP Officejet Pro 8500 A910
used by sane frontends to specify the device like /dev/scanner in local configuration.

It seems i am unable to find the appropriate config file.
 
Old 07-23-2011, 04:45 AM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hello mesiol,

maybe you're looking for
Code:
sane-find-scanner
the command has some options, you could read the manpage for sane-find-scanner, porbably it will provide the information your searching for.

Markus
 
Old 07-24-2011, 09:28 PM   #5
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Original Poster
Rep: Reputation: 137Reputation: 137
Sorry, i already checked the man page for "sane-find-scanner", but it only supports local USB and SCSI devices
 
Old 07-25-2011, 02:15 AM   #6
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,173

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Did you try hp-setup?
https://help.ubuntu.com/community/Sc...owTo#LAN-based scanners
 
Old 07-25-2011, 02:50 AM   #7
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Well, when I'm correct you'll only find a device port if the printer/scanner is locally installed (for example via USB).

On my laptop the only configurationfile for a network-scanner is /etc/sane.d/net.conf
Code:
markus@samsung:~$ cat /etc/sane.d/net.conf
# This is the net backend config file.

## net backend options
# Timeout for the initial connection to saned. This will prevent the backend
# from blocking for several minutes trying to connect to an unresponsive
# saned host (network outage, host down, ...). Value in seconds.
# connect_timeout = 60

## saned hosts
# Each line names a host to attach to.
# If you list "localhost" then your backends can be accessed either
# directly or through the net backend.  Going through the net backend
# may be necessary to access devices that need special privileges.
localhost
192.168.178.10
and if you want to know which device port the printer/scanner would use if it was locally installed, you'll have to connect it via USB and check with the above commands, "scanimage -L" or "sane-find-scanner".

Markus
 
Old 07-25-2011, 04:37 AM   #8
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Original Poster
Rep: Reputation: 137Reputation: 137
thanks for your comments. I am not having any problem with both scanners. They both work very well. The HP scanner was successfully installed via hp-setup from hplip, the brother scanner via brscansanesetup provided by Brother.

I am looking for the config file holding the information about the device port name of the scanner used by sane. To remove my old Brother scanner (which does no long er exist) from the configuration. I checked all files in /etc/sane.d in ~/.sane/xsane. But there are no entries in.

Not sure if my question was not clearly explained, I am only looking for the place/file where the information about the configured sane devices has been stored:

Code:
device `brother2:net1;dev0' is a Brother MFC-5440CN MFC5440CN
or
device `hpaio:/net/Officejet_Pro_8500_A910?ip=192.168.0.116' is a Hewlett-Packard Officejet_Pro_8500_A910 all-in-one
Thanks in advance.
 
Old 07-26-2011, 03:19 AM   #9
jtarin
Member
 
Registered: May 2010
Location: Vladivostok, Russia
Distribution: LinuxMint 17
Posts: 104

Rep: Reputation: 23
Well one thing that comes to mind is using Grep. It can search for a line of text within files. Of course it would be up to you to enter the correct string.
 
Old 07-26-2011, 04:23 AM   #10
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Original Poster
Rep: Reputation: 137Reputation: 137
i tried find/grep already, but

Code:
for i in `find /etc -type f`;do grep -i officejet $i; done
for i in `find /etc -type f`;do grep -i brother $i; done
does not print any result except the configuration for the printer in CUPS.

Thats the reason why i feel a little bit lost. I wonder why there is not real information in sane man pages where device port configuration is stored for statically use.
 
Old 07-26-2011, 07:47 AM   #11
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Original Poster
Rep: Reputation: 137Reputation: 137
so i am on the way to understand how it works.

the scanimage man page provides some extra information, which is not completly clear to me:

Code:
 The -L or --list-devices option requests a (partial) list of devices that are available.  The list is
       not complete since some devices may be available, but are not listed  in  any  of  the  configuration
       files  (which  are  typically  stored  in directory /etc/sane.d).  This is particularly the case when
       accessing scanners through the network.  If a device is not listed in a configuration file, the  only
       way  to  access  it is by its full device name.  You may need to consult your system administrator to
       find out the names of such devices.
If i understand right, network scanners are not part of the config files in /etc/sane.d, so i will search a little more how sane identifies the scanner without having any kind of entry in a config file

From hplip troubleshooting page i found the information, that device auto discovery requires the cups queue created in the format:
hpaio:/net/$MODEL?=$IP_ADDRESS for auto discovery in xsane to work.

Now im stuck in understanding how xsane uses cups queue name to discover devices.

Thanks for all response, i'll keep you informed about my research progress.

Last edited by mesiol; 07-26-2011 at 07:57 AM.
 
Old 07-26-2011, 07:59 AM   #12
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Well, as I wrote in post #7 the configuration for Networkscanners is done in /etc/sane.d/net.conf, additionally you'll have to configure /etc/sane.d/dll.conf for network-scanners.
I've once written this http://www.linuxquestions.org/linux/...r_over_network tutorial and I'm using such a setup (multifunction-device connected via USB to a server) since a few years, I don't think that there is any further configuraton for network-scanner.

Markus
 
Old 07-26-2011, 01:50 PM   #13
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Original Poster
Rep: Reputation: 137Reputation: 137
That's the funny thing. net.conf file does not contain any IP address, and this make me wonder how the printer is accessed and where the port information is stored, so sane can find it.

As stated the hplip troubleshooting section mentions, that the port in CUPS has to be created to get xsane to access the scanner.

At the moment all looks some kind of funny
 
Old 07-27-2011, 12:29 AM   #14
jtarin
Member
 
Registered: May 2010
Location: Vladivostok, Russia
Distribution: LinuxMint 17
Posts: 104

Rep: Reputation: 23
If I'm not wrong this is what your looking for.
 
Old 07-28-2011, 02:17 AM   #15
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Original Poster
Rep: Reputation: 137Reputation: 137
i've read the man page, but net.conf does not contain any entry, but scanning works well. And that's the reason for my question, where is this information stored if not in net.conf

As mentioned, the scanner works and at the moment i find all this very funny. I try to contact hplip team to clear this.
 
  


Reply

Tags
sane device scanner port



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] HP CM 2320 fxi scanner and sane - sudden no device detected thecarpy Linux - Hardware 3 03-23-2011 01:46 PM
usb scanner premissions issue when running sane-find-scanner vlsd Linux - Hardware 4 08-20-2009 02:20 PM
sane /dev/scanner? jeru Linux - Hardware 3 10-22-2004 09:28 PM
sane over network - can't find scanner Smerk Linux - Networking 1 07-18-2004 03:56 AM
Help with SANE, parallel scanner sb73542 Linux - Software 0 07-31-2003 09:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration