ThierryHFR / scangearmp2

This project is a sane backend for the canon's scanner, based on the source code of scangearmp2.
Other
80 stars 17 forks source link

[REQUEST] Addition of Pixma G2000 #1

Closed droidzone closed 7 years ago

droidzone commented 7 years ago

I see that this repo has support for Canon G3000. Kindly add support for G2000 too. Any kind I can to find out configuration parameters for this, I am willing to help.

ThierryHFR commented 7 years ago

Hi,
Our project is based on the scanner supported by Canon. Unfortunately the G2000 is not. Let's try something:
sudo apt-get install devscripts debhelper libglib2.0-dev libgtk2.0-dev libusb-1.0-0-dev libtool-bin libjpeg-dev
mkdir ~/tmp
cd ~/tmp
wget https://github.com/Ordissimo/scangearmp2/archive/master.zip
unzip master.zip
Add line <<ATTR{idVendor}=="04a9", ATTR{idProduct}=="1795", MODE="666">>
after line <<ATTR{idVendor}=="04a9", ATTR{idProduct}=="1794", MODE="666">>
in scangearmp2-master/scangearmp2/etc/80-canon_mfp2.rules
cp -a scangearmp2-master scangearmp2-3.40
rm -rf scangearmp2-3.40/.git scangearmp2-3.40/debian/
tar cJvf scangearmp2_3.40.orig.tar.xz scangearmp2-3.40
cd scangearmp2-master
debuild -tc
sudo dpkg -i ../scangearmp2_3.40-1_amd64.deb
sudo echo "canon_pixma" >> /etc/sane.d/dll.conf # for activate the backend in sane
Restart OS

droidzone commented 7 years ago

Thank you for your response. I've tried the step-by-step instructions you kindly provided. There was a key signing message while doing debuild which I suppressed with the -uc -us switches. Installed the .deb, added the line for canon_pixma and restarted. The scanning function is still not detected by scangearmp2 or sane's scanimage -L. Can I try anything else? If you need any logs or debug info, just tell me what to get. I've been also working with the sane email list, but unable to get the printer to scan.

With a sane-find-scanner, it shows:

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

could not fetch string descriptor: Pipe error
could not fetch string descriptor: Pipe error
found USB scanner (vendor=0x04a9 [Canon], product=0x1795 [G2000 series]) at libusb:001:008
could not fetch string descriptor: Pipe error
could not fetch string descriptor: Pipe error
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.
droidzone commented 7 years ago

There's been perhaps a little progress on the sane list. I added the following lines suggested in the mailing list to /usr/lib/bjlib/canon_mfp2.conf

[G2000 series] 0x1795 0x0131 [G2000 series] 0x1795 0x0153 [G2000 series] 0x1795 0x0151 [G2000 series] 0x1795 0x0133 [G2000 series] 0x1795 0x0137

Then did: echo "#G2000 series" >> /usr/lib/bjlib/canon_mfp.conf echo "usb 0x4a9 0x1795" >> /usr/lib/bjlib/canon_mfp.conf

Now, On launching scangearmp2 (which is the version I compiled as per your instructions ), it now showed Canon G2000 series (libusb:001:008)., But after selecting that, and testing the scan, it shows dialog for save folder and then does nothing.

syslog shows:


Aug 18 21:15:21 hp systemd[1]: systemd-journald.service: Got notification message from PID 268 (WATCHDOG=1)
Aug 18 21:15:23 hp systemd[1]: systemd-logind.service: Got notification message from PID 985 (WATCHDOG=1)
Aug 18 21:15:23 hp systemd[1]: systemd-timesyncd.service: Got notification message from PID 764 (WATCHDOG=1)
Aug 18 21:15:59 hp kernel: [ 1131.827689] usb 1-1.3: usbfs: interface 1 claimed by usblp while 'scangearmp2' sets config #1
Aug 18 21:16:23 hp systemd[1]: systemd-udevd.service: Got notification message from PID 308 (WATCHDOG=1)
Aug 18 21:17:01 hp systemd[1]: systemd-journald.service: Got notification message from PID 268 (WATCHDOG=1)
Aug 18 21:17:01 hp CRON[3562]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Aug 18 21:17:23 hp systemd[1]: systemd-logind.service: Got notification message from PID 985 (WATCHDOG=1)
Aug 18 21:17:23 hp systemd[1]: systemd-timesyncd.service: Got notification message from PID 764 (WATCHDOG=1)
Aug 18 21:17:47 hp /usr/lib/snapd/snapd[1016]: snapmgr.go:504: DEBUG: Next refresh scheduled for 2017-08-19 02:29:59.526004404 +0530 IST.
Aug 18 21:18:04 hp kernel: [ 1257.317162] usb 1-1.3: usbfs: interface 1 claimed by usblp while 'scangearmp2' sets config #1
Aug 18 21:18:07 hp kernel: [ 1260.042438] usb 1-1.3: usbfs: interface 1 claimed by usblp while 'scangearmp2' sets config #1
Aug 18 21:18:23 hp systemd[1]: systemd-journald.service: Got notification message from PID 268 (WATCHDOG=1)
ThierryHFR commented 7 years ago

Solutioned here: https://github.com/Ordissimo/scangearmp/commit/e60d2ee4b5e96c70bac1327422bd498f473d6492