Linux - SoftwareThis 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.
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.
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731
Rep:
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.
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731
Original Poster
Rep:
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.
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".
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731
Original Poster
Rep:
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
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.
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731
Original Poster
Rep:
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.
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731
Original Poster
Rep:
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.
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.
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731
Original Poster
Rep:
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.
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731
Original Poster
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.