<div dir="ltr">Here's the original message again, removing the formatting from the original forum website version that didn't seem to work.  Lots of the original content went missing. Sorry for the double post if it did work for you originally.  I've also added my config file to the end of this message, so it's huge.<div>---</div><div><div>I've had a Canon MG8150 attached to my network for ages and decided to hook it up to my network box (Fedora 23), basically hoping to automatically save scans to my network drive when I press the scan button on the machine. </div><div><br></div><div>I followed various articles around the place to try and set this up but I seem to have failed.  Here's a summary of where I'm up to - would love some help troubleshooting the problem: </div><div><br></div><div>- Have installed sane-backends-devel via dnf, and scanbd 1.4.4 from source (using default configure / gmake approach, no options). </div><div>- Copied the /etc/sane.d/* files to /usr/local/etc/scanbd/sane.d/ </div><div>- added a symbolic link from /etc/scanbd to /usr/local/etc/scanbd just in case anything refers to that.  I prefer working in usr to etc directly. </div><div>- Changed /etc/sane.d/saned.conf to only allow localhost </div><div>- Changed /usr/local/etc/scanbd/sane.d/saned.conf to allow all local network clients </div><div>- Changed /etc/sane.d/net.conf to have 2 lines, connect_timeout = 3 and localhost </div><div>- Changed /etc/sane.d/dll.conf to have only net </div><div>- Changed /etc/local/etc/scanbd/sane.d/dll.conf to comment out net, and remove the unnecessary references (just kept pixma) </div><div>- Saved scanbd_dbus to /etc/dbus-1/system.d/scandb_dbus.conf </div><div>- Create systemd files /usr/lib/systemd/system/scanbd.service and scanbm.socket.  Only change is to add the revised sane.d config directory. </div><div><br></div><div>scanbd.service:</div><div> </div><div>[Unit]</div><div>Description=Scanner button polling Service</div><div><br></div><div>[Service]</div><div>Type=simple</div><div>ExecStart=/usr/local/sbin/scanbd -f -c /usr/local/etc/scanbd/scanbd.conf</div><div>#ExecReload=?</div><div>Environment=SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d</div><div>StandardInput=null</div><div>StandardOutput=syslog</div><div>StandardError=syslog</div><div>#NotifyAccess=?</div><div><br></div><div>[Install]</div><div>WantedBy=multi-user.target</div><div>Also=scanbm.socket</div><div>Alias=dbus-de.kmux.scanbd.server.service</div><div><br></div><div>My scanbd.conf file is default, with some minor amendments.  See the bottom of the message for full copy. </div><div><br></div><div><br></div><div>When the scanner is started either manually or via the service, it appears to work ok but never picks up a button press.  The log always seems to show a value of zero for the button polling response. </div><div><br></div><div>Outputs: </div><div>Test printer exists and is connected: </div><div>[matt@localhost scanbd]$ lsusb</div><div>Bus 002 Device 003: ID 04a9:174b Canon, Inc. </div><div><br></div><div>Test scanimage can find printer: </div><div>[matt@localhost scanbd]$ SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d scanimage -L</div><div>device `pixma:MG8100_192.168.1.49' is a CANON Canon PIXMA MG8100 multi-function peripheral</div><div><br></div><div>Scanimage can also send test greyscale.tiff to the network drive. </div><div><br></div><div>sane-find-scanner also finds the scanner, albeit only if signed in as root. </div><div>[matt@localhost scanbd]$ sudo sane-find-scanner</div><div>found USB scanner (vendor=0x04a9 [Canon], product=0x174b [MG8100 series]) at libusb:002:003</div><div><br></div><div>I've saved the log from scanbd to pastebin because it's huge.  <a href="http://pastebin.com/T6RHVsdV">http://pastebin.com/T6RHVsdV</a></div><div><br></div><div>I dont know if there's anything interesting in all that.  I couldn't find any errors. At the end of the log you can see that it just repeats a polling cycle, but the values for the buttons never change no matter how much I press them. </div><div><br></div><div>Has anyone got any thoughts on how I could get this working?</div></div><div><br></div><div>Finally, added conf files as requested by Wilhelm:</div><div>







<p class="gmail-p1"><span class="gmail-s1">[matt@localhost scanbd]$ cat /usr/local/etc/scanbd/scanbd.conf</span></p></div><div><div>/*</div><div> * $Id: scanbd.conf 213 2015-10-05 06:52:50Z wimalopaan $</div><div> *</div><div> *  scanbd - KMUX scanner button daemon</div><div> *</div><div> *  Copyright (C) 2008 - 2015  Wilhelm Meier (<a href="mailto:wilhelm.meier@fh-kl.de">wilhelm.meier@fh-kl.de</a>)</div><div> *</div><div> *  This program is free software; you can redistribute it and/or modify</div><div> *  it under the terms of the GNU General Public License as published by</div><div> *  the Free Software Foundation; either version 2 of the License, or</div><div> *  (at your option) any later version.</div><div> *</div><div> *  This program is distributed in the hope that it will be useful,</div><div> *  but WITHOUT ANY WARRANTY; without even the implied warranty of</div><div> *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</div><div> *  GNU General Public License for more details.</div><div> *</div><div> *  You should have received a copy of the GNU General Public License</div><div> *  along with this program; if not, write to the Free Software</div><div> *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</div><div> */</div><div><br></div><div><br></div><div># global settings</div><div>global {</div><div>        # turn on debugging</div><div>        </div><div>        # log to console</div><div>        debug   = true </div><div><br></div><div>        # debug logging</div><div>        # 1=error, 2=warn, 3=info, 4-7=debug</div><div>        debug-level = 4</div><div>        </div><div>        # drop priviliges to this user</div><div>        #=============================</div><div>        # Linux (most distributions use the saned user):</div><div>        # user    = saned</div><div>        # ArchLinux (ArchLinux doesn't have saned user)</div><div>        # user    = daemon</div><div>        # *BSD</div><div>        # user    = root</div><div>        user    = saned</div><div><br></div><div>        # Group to be used</div><div>        #=================</div><div>        # Linux (most distributions use the lp group to access scanners)</div><div>        # group   = lp</div><div>        # ArchLinux (ArchLinux uses the scanner group)</div><div>        # group = scanner</div><div>        #</div><div>        # *BSD (no group lp here, use daemon instead)</div><div>        # group   = daemon # root</div><div>        #</div><div>        group   = lp</div><div><br></div><div>        # the saned executable for manager-mode</div><div>        saned   = "/usr/local/sbin/saned"</div><div>        saned_opt  = {} # string-list</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">            </span>saned_env  = { "SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d" } # list of environment vars for saned</div><div><br></div><div>        # Scriptdir specifies where scanbd normally looks for scripts.</div><div>        # The scriptdir option can be defined as: </div><div>        #   - a path relative to the configuations (<path>/etc/scanbd) directory</div><div>        #   - an abosolute path</div><div>        # Examples:</div><div>        # scriptdir = scripts </div><div>        # sets scriptdir to <path>/etc/scanbd/scripts.</div><div>        # scriptdir = /some/path</div><div>        # sets scriptdir to the specified absolute path</div><div>        # Default scriptdir is <path>/etc/scanbd, this is normally appropriate</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>scriptdir = /etc/scanbd/scripts</div><div>        </div><div>        # Scripts to execute upon device insertion/removal.</div><div>        # It can be necessary to load firmware into the device when it is first</div><div>        # inserted. For example, scanbuttond backend does not know how to load </div><div>        # scanner firmware, and it can be rectified by making a custom script.</div><div>        # A simple command like "scanimage -L" in an example insert.script </div><div>        # invokes saned and it loads the appropriate firmware if necessary.</div><div>        # These scripts receive environmental variables named in the "environment" subsection:</div><div>        # SCANBD_DEVICE - device name (fixed string "dbus device" for dbus notification)</div><div>        # SCANBD_ACTION - "insert" or "remove", so one script can be used.</div><div>        # device_insert_script = "insert.script"</div><div>        # device_remove_script =</div><div><br></div><div>        # scanbuttond_backends_dir sets the path where scanbd looks for the scanbuttond backends </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">          </span># It can be defined as relative path, starting from the scanbd config directory or</div><div>        # as an absolute path</div><div>        # Default is <libdir>/scanbd/scanbutond/backends</div><div>        # Example</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span># scanbuttond_backends_dir = "/usr/local/lib/scanbd/scanbuttond/backends"</div><div><br></div><div>        # poll timeout in [ms]</div><div>        # (for polling the devices)</div><div>        timeout = 500 </div><div>        </div><div>        pidfile = "/var/run/scanbd.pid"</div><div>        </div><div>        # env-vars for the scripts</div><div>        environment {</div><div>                # pass the device label as below in this env-var</div><div>                device = "SCANBD_DEVICE"</div><div>                # pass the action label as below in this env-var</div><div>                action = "SCANBD_ACTION"</div><div>        }</div><div><br></div><div>        # function definitions</div><div>        # values of the options are simply passed via env-vars</div><div><br></div><div>        function function_knob {</div><div>                filter = "^message.*"</div><div>                desc   = "The value of the function knob / wheel / selector"</div><div>                env    = "SCANBD_FUNCTION" </div><div>        }</div><div>        function function_mode {</div><div>                filter = "^mode.*"</div><div>                desc   = "Color mode"</div><div>                env    = "SCANBD_FUNCTION_MODE" </div><div>        }</div><div><br></div><div>        multiple_actions = true # allow multiple actions per option (up to the total amount of options)</div><div><br></div><div>        # action definitions</div><div>        # if the filter matches and the value changes </div><div>        # from from-value to to-value,</div><div>        # <script> is executed</div><div>        # <script> is the full pathname (do not include any parameters)</div><div>        # if parameters are needed, write a script</div><div>        </div><div>        # since we can have only at most one action for each option, the action-script</div><div>        # can use the function definition (see above) to distinguish different tasks </div><div>        # (e.g. use the env-var SCANBD_FUNCTION defined above)</div><div>       </div><div>#       action scan-color {</div><div>#              filter = ".*button-1.*"</div><div>#              desc   = "Button-1"</div><div>#</div><div>#              # script must be an absolute pathname to the action script without arguments</div><div>#              script = "example.script"</div><div>#       }</div><div>#       action scan-bw {</div><div>#              filter = ".*button-2.*"</div><div>#              desc   = "Button-2"</div><div>#</div><div>#             # script must be an absolute pathname to the action script without arguments</div><div>#              script = "example.script"</div><div>#       }</div><div>        action scan {</div><div>                filter = "^scan.*"</div><div>                numerical-trigger {</div><div>                        from-value = 1</div><div>                        to-value   = 0</div><div>                }</div><div>                desc   = "Scan to file"</div><div>                # script must be an relative path starting from scriptdir (see above), </div><div>                # or an absolute pathname. </div><div>                # It must contain the path to the action script without arguments</div><div>                # Absolute path example: script = "/some/path/foo.script </div><div>                script = "test.script"</div><div>        }</div><div>        action email {</div><div>                filter = "^email$"</div><div>                string-trigger {</div><div>                        from-value  = ""        </div><div>                        to-value    = "^email.*"</div><div>                }</div><div>                desc   = "Scan to email"</div><div>                # script must be an relative path starting from scriptdir (see above), </div><div>                # or an absolute pathname. </div><div>                # It must contain the path to the action script without arguments</div><div>                # Absolute path example: script = "/some/path/foo.script </div><div>                script = "test.script"</div><div>        }</div><div>#        action copy {</div><div>#                filter = "^copy$"</div><div>#                string-trigger {</div><div>#                        from-value  = ""</div><div>#                        to-value    = "^copy.*"</div><div>#                }</div><div>#                desc   = "Copy to printer"</div><div>#                # script must be an relative path starting from scriptdir (see above), </div><div>#                # or an absolute pathname. </div><div>#                # It must contain the path to the action script without arguments</div><div>#                # Absolute path example: script = "/some/path/foo.script </div><div>#                script = "test.script"</div><div>#        }</div><div>#        action pdf {</div><div>#                filter = "^file$"</div><div>#                numerical-trigger {</div><div>#                        from-value = 1</div><div>#                        to-value   = 0</div><div>#                }</div><div>#                desc   = "Scan to PDF"</div><div>#                script = "test.script"</div><div>#        }</div><div>#        action preview {</div><div>#                filter = "^preview$"</div><div>#                numerical-trigger {</div><div>#                        from-value = 1</div><div>#                        to-value   = 0</div><div>#                }</div><div>#                desc   = "Preview"</div><div>#                # script must be an relative path starting from scriptdir (see above), </div><div>#                # or an absolute pathname. </div><div>#                # It must contain the path to the action script without arguments</div><div>#                # Absolute path example: script = "/some/path/foo.script </div><div>#                script = "test.script"</div><div>#        }</div><div>        action globaltest {</div><div>                filter = "^button-1.*"</div><div>                desc   = "Test (print all env vars)"</div><div>                # script must be an relative path starting from scriptdir (see above), </div><div>                # or an absolute pathname. </div><div>                # It must contain the path to the action script without arguments</div><div>                # Absolute path example: script = "/some/path/foo.script </div><div>                script = "test.script"</div><div>        }</div><div>}</div><div><br></div><div># include</div><div># include another file at this point. This may only occur outside general and devices blocks.</div><div># an include statement may be relative to the direcory where scanbd.conf is located or absolute</div><div># include("scanner.d/myscanner.conf")</div><div># include("/my/long/path/myscanner.conf")</div><div><br></div><div># devices </div><div># each device can have actions and functions, you can disable not relevant devices</div><div>#include(scanner.d/avision.conf)</div><div>#include(scanner.d/fujitsu.conf)</div><div>#include(scanner.d/hp.conf)</div><div>include(scanner.d/pixma.conf)</div><div>#include(scanner.d/snapscan.conf)</div><div>#include(scanner.d/canon.conf)</div></div></div>