Ubuntu – Scanner part of USB multifunction printer/scanner not found

canondriverssanescannerusb

I wrote this a year ago. Still not solved, so I have re-written it to reflect the current state.

System:
Ubuntu 16.04 LTS, and a Canon Pixma MG5751 multifunction printer/scanner on USB.

Problem:
Printer works perfectly. Scanner is the same USB device but not recognized by sane, but works fine with Canon's scangearmp2. The scanner has worked perfectly with Ubuntu earlier, even using Simple Scan; I have no idea what changed.

Please:
How can I get the scanner working under sane again?

Steps so far:

  1. I have removed and re-added the printer several times.
  2. I have also purged and reinstalled the Canon cnijprinter and scangearmp2 packages in between.
  3. Reading around other very similar questions, I've found that my computer does recognize the device.
    • lsusb|grep Canon provides:
      Bus 001 Device 003: ID 04a9:178e Canon, Inc.
    • sane-find-scanner finds nothing but complains about insufficient permissions.
    • sudo sane-find-scanner|grep Canon finds the device:
      found USB scanner (vendor=0x04a9 [Canon], product=0x178e [MG5700 series]) at libusb:001:003
    • sudo scanimage -L does not find the scanner, and neither does Simple Scan:
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).

I'm out of ideas. Please help! Thank you.


Update based on comments: I've installed the sane-git package and tested: no success. Scangearmp2 works but Simple Scan still doesn't see the scanner. The sane-git page also linked to the latest release version sane-release which I also installed, and that caused a lot of promising lines like Installing new version of config file /etc/sane.d/canon_dr.conf ... – but the result was the same; Scangearmp2 works but Simple Scan still doesn't see the scanner.


Update 20190122:
After an hour of working with apt-get I have now made some progress, but only partially.

  • scanimage -L now finds the scanner, even without sudo:
device `pixma:MG5700_192.168.1.81' is a CANON Canon PIXMA MG5700 Series multi-function peripheral
device `pixma:04A9178E_733AA7' is a CANON Canon PIXMA MG5700 Series multi-function peripheral
  • When I start Simple-Scan, it does not immediately complain about no scanner found. This is good.
  • When I start a scan, it complains: Failed to scan: Error communicating with scanner.
  • In Simple-Scan > Document > Preferences, I see that there are two scanners listed, and the first one is selected. I selected the second choice and tried again = SUCCESS! I guess it doesn't like the network scanner but USB works. I'm happy!

Best Answer

The sane-pixma library implements a SANE (Scanner Access Now Easy) backend that provides access to Canon PIXMA / i-SENSYS / imageCLASS / imageRUNNER multi-function devices (All-in-one printers) and the Canon CanoScan Flatbed/TPU scanners. The backend implements both the USB interface and network interface (using Canon's BJNP and MFNP proto cols). The network interface supports scanners over IPv4 as well as IPv6 (MFNP over IPv6 is untested).

This backend is required in order to get your scanner to work under sane

While I do not have your scanner and cannot test, it appears that you are missing the libsane-pixma.so library that supports the Canon Pixma MG5700 series for sane. The package that contains it is libsane-dev, is in the repositories and can be installed with the command sudo apt install libsane-dev

You can confirm that you have the file with the command find /usr -name *.so | grep pixma

Sources:

http://www.sane-project.org/man/sane-pixma.5.html

https://packages.ubuntu.com/xenial/libsane-dev

Related Question