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

Scanner in a different subnet than SANE server #48

Closed JackPala closed 3 years ago

JackPala commented 3 years ago

Hello, I have the Scanner I am attempting to use scangearmp2 and SANE in a different subnet than the SANE application itself, so autodiscovery does not work with the application. I am wondering if there is a way to manually specify the IP to use scangearmp2 SANE for the SANE instance so when I run "scanimage -L" it makes the scanner appear.

pixma.conf allows for manually specification of BJNP connections, but of course my scanner does not support BJNP, hence the usage of scangearmp2 with SANE.

ThierryHFR commented 3 years ago

Hi @JackPala, Try this :

# edit canon_mfp2_net.ini
# This file is cache for canon network MFP scanner.
IPADDR_CACHE 2c-9e-fc-30-e0-1d 192.168.1.200 UNICAST

I'll do some tests in the week to see if I can directly specify an address. It is possible that the search is limited to the main network and ignores the subnetworks.

JackPala commented 3 years ago

editing the file inside of the folder /usr/lib/bjlib seems to yield no results, it is also creating a backend "out of memory" error after running "scanimage -L"

manual IP specification, would certainly be nice, since I have the printer in a different subnet without access to the outside internet for security reasons. printing via CUPs to the printer over network cross-subnet works, and scanning over USB inside of GNOME also works currently

ThierryHFR commented 3 years ago

@JackPala, Do you know how to build a binary and install a project from source?

ThierryHFR commented 3 years ago

Hi @JackPala , Okay, I've looked around a lot. I will add a configuration file in /etc/sane.d/canon_pixma.conf I'll have to add 2 infos per device: The IP and the mac address. I have no influence on the detection of the devices, but it is possible to specify it and in this case it works. There are 2 methods of detection depending on the age of the device. I could test on a recent device, it works. Leave me a few days.

ThierryHFR commented 3 years ago

Hi @JackPala , This branch add-conf-file solve your issue.

ThierryHFR commented 3 years ago

Hi @JackPala , Binary packages are available for Ubuntu : https://launchpad.net/~thierry-f/+archive/ubuntu/fork-michael-gruz and Debian : https://github.com/Ordissimo/libmfp2-canon/releases/tag/0.3%2Bsubnet Thank you for your feedback !

ThierryHFR commented 3 years ago

No feedback