[#315812] Canon Pixma MG7150 on wifi - Simple Scan: Unable to connect to scanner

View Trackers | Bugs | Export CSV

2017-08-09 18:53
Submitted by:
Lucas Partridge (zinth-guest)
Assigned to:
Olaf Meeuwissen (olaf-guest)
backends (drivers)
Canon Pixma MG7150 on wifi - Simple Scan: Unable to connect to scanner

Detailed description
I use a Canon Pixma MG7150 on wifi. scangearmp can find the scanner and works fine. So does using the scanner from Windows 7 over wifi.

scanimage -L returns this:

device `pixma:MG7100_192.168.0.8' is a CANON Canon PIXMA MG7100 Series multi-function peripheral

But if I open Simple Scan and click Scan it says:
"Failed to scan - unable to connect to scanner"

But when I click on 'Change Scanner' it clearly shows it! See screenshot.

I'm on ubuntu 6.04.

$ uname -a
Linux zorro 4.4.0-89-generic #112-Ubuntu SMP Mon Jul 31 19:38:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Followups: Sort comments antichronologically

Date: 2017-08-18 08:23
Sender: Rolf Bensch

First, please check if your scanner is working with USB connected only, without wifi and ethernet connection.

Then follow the hints in the sane-pixma man page in the chapters NETWORKING SUPPORT and FIREWALLING FOR NETWORKED SCANNERS.
Date: 2017-08-18 17:37
Sender: Lucas Partridge

Thanks for looking at this.

I disabled networking on my PC and plugged the printer directly into it via USB. The SANE program recognised it and scanned a doc without any problems.

I'll check the man page when I get a chance and I'll let you know what I find...
Date: 2017-08-18 19:41
Sender: Lucas Partridge

OK, at it says:
"So in short: open the firewall for all traffic from your computer to port 8610 (for MFNP) or 8612 (for BJNP) AND to port 8612 (for both BJNP and MFNP) to your computer."

Does this mean I have to reserve a DHCP address for my ubuntu PC and then set up a port forwarding rule to 8612? Should I use TCP, UDP or both? I'm not a networking expert so I'm not sure what I'm trying to achieve here. Please advise.

I don't seem to have a firewall running in ubuntu so I presume I only need to configure my router to do this?
Date: 2017-08-18 19:50
Sender: Lucas Partridge

I'm not sure port forwarding is what I should be doing here as that appears to be a mechanism for devices outside my network to access a device within my network. In this case both the PC and the scanner are on the same network behind the firewall.
Date: 2017-08-23 17:12
Sender: Lucas Partridge

@Rolf Bensch: I need your advice if I'm to make any more progress on this please....

1) Is port forwarding the appropriate technique to be using here, even though both the PC and the scanner are on the same network behind a firewall?

2) If it is, then what port does the scanner use to respond to requests from the sane pixma backend? In other words, what value should I use as the 'start port' for forwarding responses to my PC? (Since this is an inkjet multifunctional device I assume it's using the BJNP protocol.)
Date: 2017-08-26 09:42
Sender: Rolf Bensch

@Olaf: The scanner is working on USB. Please have a look at the networking stuff.
Date: 2017-08-31 13:14
Sender: Jan Pokorný

Date: 2017-08-31 18:19
Sender: Lucas Partridge

Thanks for the bug reference. Funny Rolf Bensch didn't mention this since the workaround is to use his PPA! Anyway I can't test his ppa right now as, due to a hardware failure, I'm temporarily without an ubuntu system. I'll test it and post the results here once I've installed ubuntu again...
Date: 2017-08-31 18:55
Sender: Rolf Bensch

I just fixed a bug in the main branch of SANEs git repository, which also affects this scanner.

Please try the next version from my ppa, which will be updated tomorrow.
Date: 2017-09-03 16:44
Sender: Lucas Partridge

I've installed a clean image of ubuntu 16.04 on new hardware. The original scanner issue existed: Simple Scan 'Failed to scan'.

Then I tried this:
sudo add-apt-repository ppa:rolfbensch/sane-git
sudo apt-get update

but the software updater kept crashing and didn't seem to like this PPA. So I then removed the PPA (via Software Updater > Settings > Other software) and then tried the Simple Scan app again... and this time it worked! It recognised the Canon scanner over wifi and was able to scan an image.

I don't know what's going on here but at least it appears to work now.
Date: 2017-09-10 02:58
Sender: Olaf Meeuwissen

Sorry for the late follow-up. It seems that this issue has resolved itself, somehow, so I'll close with a Resolution of None (for lack of something more suitable).

@Lucas> Please check what version of libsane you have installed now. I suspect that the version of Rolf's PPA did get installed, despite the software updater crashing. You can check with

apt-cache policy libsane

As to the networking, port forwarding is not what your looking for. You would be looking at "poking holes" in your firewall, assuming you have one in the first place. You can check with

sudo iptables -nvL

and decipher the output with the help of the iptables manual page. If you have ALLOW policies on your INPUT and OUTPUT chains, you don't have a firewall, should be good to go and don't have to change anything.

As for what's on that manual page, a sloppy way to achieve that is with something like

for chain in INPUT OUTPUT; do
for port in 8610 8612; do
sudo iptables -A $chain -p tcp --dport $port -j ACCEPT
Date: 2017-09-13 19:00
Sender: Lucas Partridge

@Olaf: Thanks for the update. Sorry, I was away.

$ apt-cache policy libsane
Installed: 1.0.27+git20170902-xenial0
Candidate: 1.0.27+git20170902-xenial0
Version table:
*** 1.0.27+git20170902-xenial0 100
100 /var/lib/dpkg/status
1.0.25+git20150528-1ubuntu2.16.04.1 500
500 xenial-updates/main amd64 Packages
1.0.25+git20150528-1ubuntu2 500
500 xenial/main amd64 Packages

Hmm, is that Rolf's PPA??

Thanks for the networking tips. I don't think I have a firewall running as this was the output:

$ sudo iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

I've deleted all my DHCP reservations and port forwarding rules and Simple Scan still works (as long as the Canon device is fully awake and not gone to sleep; otherwise Simple Scan doesn't detect the scanner). So I'm happy it's working for now at least. Thanks for your help!

Attached Files:

Size Name Date By Download
68 KiBScreenshot from 2017-08-09 19-50-29.png2017-08-09 18:53zinth-guestScreenshot from 2017-08-09 19-50-29.png


Field Old Value Date By
status_idOpen2017-09-10 02:58olaf-guest
close_dateNone2017-09-10 02:58olaf-guest
assigned_toroben-guest2017-08-26 09:42roben-guest
CategoryNone2017-08-18 00:36olaf-guest
assigned_tonone2017-08-18 00:36olaf-guest
File Added7555: Screenshot from 2017-08-09 19-50-29.png2017-08-09 18:53zinth-guest
Powered By FusionForge