I tried to configure scanbd for an EPSON Perfection 1670 on a Raspbian Jessie system. First I installed scanbd form the Raspbian package repository, but this version seems to be compiled for sane backends support only, which don't recognise button pressed events on my scanner. Then I compiled scanbd from <a href="http://downloads.sourceforge.net/project/scanbd/releases/scanbd-1.4.2.tgz" target="_top" rel="nofollow" link="external">source</a> with the old scanbutton backends support. That's working, but there are two issues:

<h3>1) only two buttons invoke script execution</h3>
The scanner has four buttons, but currently scripts are only executed for button 2 (copy) and button 3
(email). I would like to use at least the scan button (= button 4) as well. Within the syslog I can see
that also for button 1 and button 4 there is a reaction, just no script will be executed. In scanbd.conf
I noticed two kind of checks for button pressed event handling, one, where a string change is evaluated, the other, where an integer value changes.<br><br>Might this be misconfigured?<br>How can I check, which string has been send from the scanbuttond backend?
<br><br>Remark: the button numbering seems to be in reverse order, for button 3 is labeled with a printer icon, button 2 with a letter icon.
   
<h3>2) scanimage reports 'no scan device'</h3>
    When I execute
<pre>    scanimage -L             or
    sudo scanimage -L   or
    SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d scanimage -L
</pre>
I always get the information that no scan device was found. I would have expected something like
<pre>    device `net:localhost:snapscan:libusb:001:004' is a EPSON …</pre>
which was the output, when scanbd was installed from the Raspbian package repository. I thought, scanimage would request a scan via sane port 6566, observed by scanbm, which would then forward the request to the 'real' saned.
<br>
Am I wrong with this assumption?
<br><br>
I attached my configuration and a part of the syslog file.
<br><br>
Thanks in advance for any kind of assistance,
which might help to solve the above mentined issues.
<br><br>
Cheers, Rainer.
<br><br>
-------------------------------------------------------
<br>
<h3>configuration files</h3>

<h3>/usr/local/etc/scanbd/scanbd.conf (only changes from default):</h3>
<pre>     saned_env = { ”SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d” }
        
        scriptdir = /usr/local/etc/scanbd
        device_insert_script = ”insert.script”
        
        #include(scanner.d/avision.conf)
        #include(scanner.d/fujitsu.conf)
        #include(scanner.d/hp.conf)
        #include(scanner.d/pixma.conf)
        include(scanner.d/snapscan.conf)
        #include(scanner.d/canon.conf)

</pre><h3>sudo cp scanbd_dbus.conf /etc/dbus-1/system.d/</h3>
        this file is copied "as is" from the integration folder

<h3>sudo nano /lib/systemd/system/scanbd.service (only changes from default):</h3>
<pre>     [Service]
        ExecStart=/usr/local/sbin/scanbd –f –c /usr/local/etc/scanbd/scanbd.conf
        Environment=SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d
</pre>
<h3>syslog (excerpt):</h3>
<pre>...
Mar 29 16:33:50 PING scanbd: /usr/local/sbin/scanbd: Iteration on dbus call
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: polling thread for Perfection 1670 cancellation point
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: polling device Perfection 1670
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: ################ button 4 pressed ################
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: option: 1
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name (1)
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name, backend: Snapscan USB
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: checking option scan number 1 (0) for device Perfection 1670
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: option: 3
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name (3)
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name, backend: Snapscan USB
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: checking option email number 3 (1) for device Perfection 1670
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: option: 2
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name (2)
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name, backend: Snapscan USB
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: checking option copy number 2 (2) for device Perfection 1670
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: polling thread for Perfection 1670 cancellation point
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: polling device Perfection 1670
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: button 0
Mar 29 16:33:51 PING scanbd: /usr/local/sbin/scanbd: option: 1
...
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: option: 3
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name (3)
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name, backend: Snapscan USB
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: checking option email number 3 (1) for device Perfection 1670
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: option: 2
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name (2)
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name, backend: Snapscan USB
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: checking option copy number 2 (2) for device Perfection 1670
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: polling thread for Perfection 1670 cancellation point
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: polling device Perfection 1670
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: ################ button 3 pressed ################
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: option: 1
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name (1)
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name, backend: Snapscan USB
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: checking option scan number 1 (0) for device Perfection 1670
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: option: 3
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name (3)
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: scanbtnd_button_name, backend: Snapscan USB
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: checking option email number 3 (1) for device Perfection 1670
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: button 3 has been pressed.
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: value trigger: numerical
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: trigger action for device Perfection 1670 with script test.script
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: setting env: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: No PWD, setting env: PWD=/
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: No USER, setting env: USER=saned
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: No HOME, setting env: HOME=/var/lib/saned
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: setting env: SCANBD_DEVICE=snapscan:libusb:001:004
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: setting env: SCANBD_ACTION=email
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: append string Perfection 1670 to signal scan_begin
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: now sending signal scan_begin
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: Iteration on dbus call
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: append string PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin to signal trigger
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: append string PWD=/ to signal trigger
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: append string USER=saned to signal trigger
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: append string HOME=/var/lib/saned to signal trigger
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: append string SCANBD_DEVICE=snapscan:libusb:001:004 to signal trigger
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: append string SCANBD_ACTION=email to signal trigger
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: now sending signal trigger
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: now flushing the dbus
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: unref the signal
Mar 29 16:33:54 PING scanbd: /usr/local/sbin/scanbd: using relative script path: test.script, expanded to: /usr/local/etc/scanbd/test.script
Mar 29 16:33:54 PING scanbd[354]: /usr/local/sbin/scanbd: scanbtnd_button_name, backend: Snapscan USB
Mar 29 16:33:54 PING scanbd[354]: /usr/local/sbin/scanbd: checking option scan number 1 (0) for device Perfection 1670
Mar 29 16:33:54 PING scanbd[354]: /usr/local/sbin/scanbd: button 1 has been pressed.
Mar 29 16:33:54 PING scanbd[354]: /usr/local/sbin/scanbd: option: 3
Mar 29 16:33:54 PING scanbd[354]: /usr/local/sbin/scanbd: scanbtnd_button_name (3)
Mar 29 16:33:54 PING scanbd[354]: /usr/local/sbin/scanbd: scanbtnd_button_name, backend: Snapscan USB
...</pre>

        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://sane.10972.n7.nabble.com/Raspbian-Jessie-scanbd-scripting-issue-tp19611.html">Raspbian Jessie - scanbd scripting issue</a><br/>
Sent from the <a href="http://sane.10972.n7.nabble.com/SANE-Dev-f3.html">SANE - Dev mailing list archive</a> at Nabble.com.<br/>