Discussion:
[sane-devel] Help. Any Ideas?
Peter Talbott
2017-02-12 04:41:12 UTC
Permalink
I'm hoping someone could help me with this.

My OS: kubuntu 14.04 amd64
My scanner is wired on my home network:
Canon MF230
IP 172.16.184.25/24 (set static IP)

Printing works fine. Scanner will not detect with sane.
here is the debug output:

***@UbuntuLaptop:/etc/sane.d# scanimage -L
[sanei_debug] Setting debug level of pixma to 4.
[pixma] pixma is compiled with pthread support.
[pixma] pixma version 0.17.34
[sanei_debug] Setting debug level of bjnp to 3.
[bjnp] sanei_bjnp_find_devices, pixma backend version: 0.17.34
[bjnp] sanei_bjnp_find_devices: No devices specified in configuration file.
[bjnp] sanei_bjnp_find_devices: Added all configured scanners, now do
auto detection...
[bjnp] prepare_socket: lo is not a valid IPv4 interface, skipping...
[bjnp] prepare_socket: wlan0 is IPv4 capable, sending broadcast, socket = 11
[bjnp] prepare_socket: lo is not a valid IPv6 interface, skipping...
[bjnp] prepare_socket: wlan0 is IPv6 capable, sending broadcast, socket = 12
[bjnp] sanei_bjnp_find_devices: Select returned, time left 0.397658....
[bjnp] get_scanner_name: Name for 172.16.184.25 not found : Temporary
failure in name resolution
[bjnp] bjnp_allocate_device(mfnp://172.16.184.25:8610/timeout=1000) 0
[bjnp] get_scanner_name: Name for 172.16.184.25 not found : Temporary
failure in name resolution
[bjnp] setup_udp_socket: Setting up a UDP socket, dest: 172.16.184.25
port 8610
[bjnp] bjnp_allocate_device: Scanner not yet in our list, added it:
172.16.184.25:8610
[bjnp] setup_udp_socket: Setting up a UDP socket, dest: 172.16.184.25
port 8610
[bjnp] get_scanner_id: Scanner identity string =
MFG:CANON;CMD:MFNP1,MultiPASS 2.1;MDL:Canon MF230
Series;CLS:IMG;DES:Canon MF230 Series; - length = 88
[bjnp] get_scanner_id: Scanner model = Canon MF230 Series
[bjnp] add_scanner: New scanner added:
mfnp://172.16.184.25:8610/timeout=1000, serial 172.16.184.25, mac
addres: 84ba3b91910e.
[bjnp] sanei_find_devices: scanner discovery finished...
[pixma] pixma_find_scanners() found 0 devices

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

***@UbuntuLaptop:/etc/sane.d# scanimage -V
scanimage (sane-backends) 1.0.26git; backend version 1.0.26
***@UbuntuLaptop:/etc/sane.d#
***@UbuntuLaptop:/etc/sane.d# more /proc/version
Linux version 3.13.0-105-generic (***@lgw01-59) (gcc version 4.8.4
(Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #152-Ubuntu SMP Fri Dec 2 15:37:11 UTC
2016

I've compiled and installed the git sane-backened, I've tried specifying
the device in pixma.conf with all different syntaxes of:
***@UbuntuLaptop:/etc/sane.d# more pixma.conf
# pixma.conf configuration for the sane pixma backend
#
# define URI's of scanners (one per line)
# This is only used for network scanners.
# normally scanners will be detected by sending a broadcast
# if this does not work under your OS, or if the scanners
# are on a different subnet, configure your scanners URI here
#
# method must be bjnp
# port number can normally be left out, port 8612 is used as default
# Example:
# bjnp://myscanner.my.domain:8612
# bjnp://printer-1.pheasant.org
#

#bjnp://172.16.184.25:8610

#bjnp://172.16.184.25

#mfnp://172.16.184.25

Now where it has the hash '#' I've added them back in because it didn't
do any good specifying them, it just took longer to run scanimage -L
It looks to me that [bjnp] automatically finds the scanner, identifies
the scanner and adds it but pixma_find_scanners() found 0 devices.

I am totally out of ideas, any help would be great!
Thank you
Pete
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Torfinn Ingolfsen
2017-02-13 14:05:15 UTC
Permalink
Hello,
Post by Peter Talbott
I'm hoping someone could help me with this.
My OS: kubuntu 14.04 amd64
Canon MF230
IP 172.16.184.25/24 (set static IP)
Printing works fine. Scanner will not detect with sane.
In general, scanimage isn't very good at detecting network-connected scanners.
However, you scanner might still work.
Things you can try (if you haven't already):
xsane
$ xsane <backend>:net:<ip address>
so something like
$ xsane pixma:net:172.16.184.25

should work.
HTH
--
Regards,
Torfinn Ingolfsen
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Peter Talbott
2017-02-14 02:33:15 UTC
Permalink
Thank You

I never did try that until tonight. however, it didn't work. I tried all
different syntaxes of your example to no avail. Here is the debug output:

***@UbuntuLaptop:/etc/sane.d$ xsane mfnp://172.16.184.25
[sanei_debug] Setting debug level of pixma to 11.
[pixma] pixma is compiled with pthread support.
[pixma] pixma version 0.17.34
[sanei_debug] Setting debug level of bjnp to 3.
[bjnp] sanei_bjnp_find_devices, pixma backend version: 0.17.34
[bjnp] sanei_bjnp_find_devices: No devices specified in configuration file.
[bjnp] sanei_bjnp_find_devices: Added all configured scanners, now do
auto detection...
[bjnp] prepare_socket: lo is not a valid IPv4 interface, skipping...
[bjnp] prepare_socket: wlan0 is IPv4 capable, sending broadcast, socket = 19
[bjnp] prepare_socket: lo is not a valid IPv6 interface, skipping...
[bjnp] prepare_socket: wlan0 is IPv6 capable, sending broadcast, socket = 20
[bjnp] sanei_bjnp_find_devices: Select returned, time left 0.499993....
[bjnp] get_scanner_name: Name for 172.16.184.25 not found : Temporary
failure in name resolution
[bjnp] bjnp_allocate_device(mfnp://172.16.184.25:8610/timeout=1000) 0
[bjnp] get_scanner_name: Name for 172.16.184.25 not found : Temporary
failure in name resolution
[bjnp] setup_udp_socket: Setting up a UDP socket, dest: 172.16.184.25
port 8610
[bjnp] bjnp_allocate_device: Scanner not yet in our list, added it:
172.16.184.25:8610
[bjnp] setup_udp_socket: Setting up a UDP socket, dest: 172.16.184.25
port 8610
[bjnp] get_scanner_id: Scanner identity string =
MFG:CANON;CMD:MFNP1,MultiPASS 2.1;MDL:Canon MF230
Series;CLS:IMG;DES:Canon MF230 Series; - length = 88
[bjnp] get_scanner_id: Scanner model = Canon MF230 Series
[bjnp] add_scanner: New scanner added:
mfnp://172.16.184.25:8610/timeout=1000, serial 172.16.184.25, mac
addres: 84ba3b91910e.
[bjnp] sanei_bjnp_find_devices: Select returned, time left 0.499985....
[bjnp] get_scanner_name: Name for 172.16.184.25 not found : Temporary
failure in name resolution
[bjnp] bjnp_allocate_device(mfnp://172.16.184.25:8610/timeout=1000) 1
[bjnp] get_scanner_name: Name for 172.16.184.25 not found : Temporary
failure in name resolution
[bjnp] setup_udp_socket: Setting up a UDP socket, dest: 172.16.184.25
port 8610
[bjnp] udp_command: ERROR - select failed: timed out
[bjnp] udp_command: ERROR - select failed: timed out
[bjnp] add_scanner: Scanner at mfnp://172.16.184.25:8610/timeout=1000
was added before, good!
[bjnp] sanei_find_devices: scanner discovery finished...
[pixma] pixma_find_scanners() found 0 devices
***@UbuntuLaptop:/etc/sane.d$

Now the scanner does work on a Windows 7 (wife's machine) with no
problems...
Post by Torfinn Ingolfsen
Hello,
Post by Peter Talbott
I'm hoping someone could help me with this.
My OS: kubuntu 14.04 amd64
Canon MF230
IP 172.16.184.25/24 (set static IP)
Printing works fine. Scanner will not detect with sane.
In general, scanimage isn't very good at detecting network-connected scanners.
However, you scanner might still work.
xsane
$ xsane <backend>:net:<ip address>
so something like
$ xsane pixma:net:172.16.184.25
should work.
HTH
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Torfinn Ingolfsen
2017-02-14 07:10:16 UTC
Permalink
The "Temporary failure in name resolution" messages in your debug
output seems to indicate that the pixma backend also wants / needs a
(DNS) name for your scanner's IP address.
You could try to add it to your local DNS server if you have one, or
to the hosts file on the machine you run SANE on, to see if it helps.

HTH
--
Regards,
Torfinn Ingolfsen
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Olaf Meeuwissen
2017-02-14 12:42:20 UTC
Permalink
Hi Torfinn,
Post by Torfinn Ingolfsen
The "Temporary failure in name resolution" messages in your debug
output seems to indicate that the pixma backend also wants / needs a
(DNS) name for your scanner's IP address.
You could try to add it to your local DNS server if you have one, or
to the hosts file on the machine you run SANE on, to see if it helps.
Just for the record, if the host name resolution fails the IP address is
used as is. Quoting from backend/pixma_bjnp.c (starting at line 833):

/* do reverse name lookup, if hostname can not be found return ip-address */

if( (error = getnameinfo( &(scanner_sa -> addr) , sa_size( scanner_sa),
host, BJNP_HOST_MAX , NULL, 0, NI_NAMEREQD) ) != 0 )
{
PDBG (bjnp_dbg(LOG_INFO, "get_scanner_name: Name for %s not found : %s\n",
ip_address, gai_strerror(error) ) );
strcpy(host, ip_address);
return level;
}

Adding it to your local DNS server isn't expected to help.

Hope this helps,
--
Olaf Meeuwissen, LPIC-2 FSF Associate Member since 2004-01-27
GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9
Support Free Software https://my.fsf.org/donate
Join the Free Software Foundation https://my.fsf.org/join
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Peter Talbott
2017-02-14 16:19:28 UTC
Permalink
Thanks Torfinn and Olaf,

I added an entry in my hosts file and it did run a lot faster (use
to take 30 - 45 seconds, now done in just a few seconds), but still the
last debug line doesn't add the scanner. here is the debug output after
adding a hosts entry:

***@UbuntuLaptop:/etc# scanimage -L
[sanei_debug] Setting debug level of pixma to 11.
[pixma] pixma is compiled with pthread support.
[pixma] pixma version 0.17.34
[sanei_debug] Setting debug level of bjnp to 3.
[bjnp] sanei_bjnp_find_devices, pixma backend version: 0.17.34
[bjnp] sanei_bjnp_find_devices: No devices specified in configuration file.
[bjnp] sanei_bjnp_find_devices: Added all configured scanners, now do
auto detection...
[bjnp] prepare_socket: lo is not a valid IPv4 interface, skipping...
[bjnp] prepare_socket: wlan0 is IPv4 capable, sending broadcast, socket = 11
[bjnp] prepare_socket: lo is not a valid IPv6 interface, skipping...
[bjnp] prepare_socket: wlan0 is IPv6 capable, sending broadcast, socket = 12
[bjnp] sanei_bjnp_find_devices: Select returned, time left 0.499984....
[bjnp] get_scanner_name: Forward lookup for mf230.local succeeded, using
as hostname
[bjnp] bjnp_allocate_device(mfnp://mf230.local:8610/timeout=1000) 0
[bjnp] get_scanner_name: Forward lookup for mf230.local succeeded, using
as hostname
[bjnp] setup_udp_socket: Setting up a UDP socket, dest: 172.16.184.25
port 8610
[bjnp] bjnp_allocate_device: Scanner not yet in our list, added it:
mf230.local:8610
[bjnp] setup_udp_socket: Setting up a UDP socket, dest: 172.16.184.25
port 8610
[bjnp] get_scanner_id: Scanner identity string =
MFG:CANON;CMD:MFNP1,MultiPASS 2.1;MDL:Canon MF230
Series;CLS:IMG;DES:Canon MF230 Series; - length = 88
[bjnp] get_scanner_id: Scanner model = Canon MF230 Series
[bjnp] add_scanner: New scanner added:
mfnp://mf230.local:8610/timeout=1000, serial mf230.local, mac addres:
84ba3b91910e.
[bjnp] sanei_bjnp_find_devices: Select returned, time left 0.499995....
[bjnp] get_scanner_name: Forward lookup for mf230.local succeeded, using
as hostname
[bjnp] bjnp_allocate_device(mfnp://mf230.local:8610/timeout=1000) 1
[bjnp] get_scanner_name: Forward lookup for mf230.local succeeded, using
as hostname
[bjnp] setup_udp_socket: Setting up a UDP socket, dest: 172.16.184.25
port 8610
[bjnp] add_scanner: Scanner at mfnp://mf230.local:8610/timeout=1000 was
added before, good!
[bjnp] sanei_find_devices: scanner discovery finished...
[pixma] pixma_find_scanners() found 0 devices

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
***@UbuntuLaptop:/etc#

I've also tried this on my desktop, ubuntu 16.04 amd64 (just to see if
it was something with my laptop) and the exact same debug messages. I've
also tried this as a regular user and as root, same debug messages. just
don't know why pixma_find_scanners() finds 0 devices when bjnp finds it
and adds it.

Thanks again,

Pete
Post by Olaf Meeuwissen
Hi Torfinn,
Post by Torfinn Ingolfsen
The "Temporary failure in name resolution" messages in your debug
output seems to indicate that the pixma backend also wants / needs a
(DNS) name for your scanner's IP address.
You could try to add it to your local DNS server if you have one, or
to the hosts file on the machine you run SANE on, to see if it helps.
Just for the record, if the host name resolution fails the IP address is
/* do reverse name lookup, if hostname can not be found return ip-address */
if( (error = getnameinfo( &(scanner_sa -> addr) , sa_size( scanner_sa),
host, BJNP_HOST_MAX , NULL, 0, NI_NAMEREQD) ) != 0 )
{
PDBG (bjnp_dbg(LOG_INFO, "get_scanner_name: Name for %s not found : %s\n",
ip_address, gai_strerror(error) ) );
strcpy(host, ip_address);
return level;
}
Adding it to your local DNS server isn't expected to help.
Hope this helps,
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Loading...