Re: [sane-devel] HP5590 and scanbd button recognition

2018-03-13 Thread Wilhelm Meier
Hi together,

if this is a patch for scanbd and the old scanbuttond backends included
there, please send the patch to this list. I'll be happy to integrate it
into scanbd.

Thanks,
 Wilhelm

Am 13.03.2018 um 19:29 schrieb Cesello:
> Hi Ilia and Jared
> I'm just registered to this ML to propose my patch to this back end
> driver made in the past weekend.
> And I see someone have my same problem :)
> I've used hp5590 scanner with scanbuttond for years. Some week ago I've
> upgraded my system to debian 9 and
> discovered that scanbd does not works anymore with my scanner. I really
> need this functionality so I've made
> modifications to hp5590.c code to export the options .
> Is a first attempt and the backend called by scanbd threads makes
> buttons quite  responsive
> without using a self polling thread.
> I've made a patch file for debian 9  stable version package (yes but the
> real patch is for hp5590.c only)
> If you are interested I can send it (or tell me if I have to release
> into the repo directly I'm new user here :))
> 
> Damiano
> 
> On 07/03/2018 14:01, hostcc at gmail.com (Ilia Sotnikov) wrote:
>> Hi,
>> backend author here - it shouldn't be too much of effort to expose
>> button status so scanbd can use it. Though haven't gone thru its
>> documentation to understand requirements. As a technical insight -
>> there is hp5590_read_buttons() function in hp5590_cmds.c that reads
>> button status.
>> However, I'll seek for a volunteer to test a change as I don't have
>> access to HW currently.
>>
>> On Wed, Mar 7, 2018 at 12:40 AM, Wilhelm Meier
>>  wrote:
>>> Please try the old scanbuttond-backend for this type of scanner - it
>>> should work. The HP sane backend sadly doesn't support the buttons on
>>> this scanner.
>>>
>>> Am 06.03.2018 um 15:46 schrieb Jared Hedegaard:
>>>>> Main question: does the HP 5590 support button presses or am I just 
>>>>> setting this up incorrectly?
>>>>>
>>>>> I'm been successful using scanbd with SANE backends to get scanning 
>>>>> working over my network and locally on the host machine, but I can't seem 
>>>>> to get it to recognize button presses, either running scanbd in 
>>>>> foreground or background.
>>>>>
>>>>> For past testing, it seems that actions defined in scanbd.conf are used 
>>>>> to tie to the backend options? From searching /var/log/syslog, I expected 
>>>>> to track button presses or get some sort of trigger feedback, and I 
>>>>> didn't think I needed an action set up for it.
>>>>>
>>>>> Any help on this one would be much appreciated. Thanks.
>>>>>
>>>>> Jared H
>>>>>
>>>> After a bit more research, it looks like doing this with the SANE backend 
>>>> for HP 5590 is not possible. scanbd is used to tie custom actions to the 
>>>> options available on the scanner. In this case, none of the 10 options 
>>>> seem to return values. They all look to be ones that I designate from some 
>>>> client software.
>>>>
>>>> scanbd: found active option[1] tl-x (type: 2) for device 
>>>> hp5590:libusb:001:008
>>>> scanbd: found active option[2] tl-y (type: 2) for device 
>>>> hp5590:libusb:001:008
>>>> scanbd: found active option[3] br-x (type: 2) for device 
>>>> hp5590:libusb:001:008
>>>> scanbd: found active option[4] br-y (type: 2) for device 
>>>> hp5590:libusb:001:008
>>>> scanbd: found active option[5] mode (type: 3) for device 
>>>> hp5590:libusb:001:008
>>>> scanbd: found active option[6] source (type: 3) for device 
>>>> hp5590:libusb:001:008
>>>> scanbd: found active option[7] resolution (type: 1) for device 
>>>> hp5590:libusb:001:008 scanbd: found active option[8] extend-lamp-timeout 
>>>> (type: 0) for device hp5590:libusb:001:008
>>>> scanbd: found active option[9] wait-for-button (type: 0) for device 
>>>> hp5590:libusb:001:008
>>>> scanbd: found active option[10] preview (type: 0) for device 
>>>> hp5590:libusb:001:008
>>>>
>>>> In this case, it looks like I will have to try the old scanbuttond 
>>>> backends for this, or see if there are optional enhancements for the SANE 
>>>> hp5590 backend.
>>>>
>>>> Jared
>>>>
>>>
>>> --
>>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>>> Unsubscribe: Send mail with subject "unsubscribe your_password"
>>>  to sane-devel-request at lists.alioth.debian.org
>>
>>
> 
> 


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] HP5590 and scanbd button recognition

2018-03-06 Thread Wilhelm Meier
Please try the old scanbuttond-backend for this type of scanner - it
should work. The HP sane backend sadly doesn't support the buttons on
this scanner.

Am 06.03.2018 um 15:46 schrieb Jared Hedegaard:
>>
>> Main question: does the HP 5590 support button presses or am I just setting 
>> this up incorrectly?
>>
>> I'm been successful using scanbd with SANE backends to get scanning working 
>> over my network and locally on the host machine, but I can't seem to get it 
>> to recognize button presses, either running scanbd in foreground or 
>> background.
>>
>> For past testing, it seems that actions defined in scanbd.conf are used to 
>> tie to the backend options? From searching /var/log/syslog, I expected to 
>> track button presses or get some sort of trigger feedback, and I didn't 
>> think I needed an action set up for it.
>>
>> Any help on this one would be much appreciated. Thanks.
>>
>> Jared H
>>
> 
> After a bit more research, it looks like doing this with the SANE backend for 
> HP 5590 is not possible. scanbd is used to tie custom actions to the options 
> available on the scanner. In this case, none of the 10 options seem to return 
> values. They all look to be ones that I designate from some client software.
> 
> scanbd: found active option[1] tl-x (type: 2) for device 
> hp5590:libusb:001:008 
> scanbd: found active option[2] tl-y (type: 2) for device 
> hp5590:libusb:001:008 
> scanbd: found active option[3] br-x (type: 2) for device 
> hp5590:libusb:001:008 
> scanbd: found active option[4] br-y (type: 2) for device 
> hp5590:libusb:001:008 
> scanbd: found active option[5] mode (type: 3) for device 
> hp5590:libusb:001:008 
> scanbd: found active option[6] source (type: 3) for device 
> hp5590:libusb:001:008 
> scanbd: found active option[7] resolution (type: 1) for device 
> hp5590:libusb:001:008 scanbd: found active option[8] extend-lamp-timeout 
> (type: 0) for device hp5590:libusb:001:008 
> scanbd: found active option[9] wait-for-button (type: 0) for device 
> hp5590:libusb:001:008 
> scanbd: found active option[10] preview (type: 0) for device 
> hp5590:libusb:001:008
> 
> In this case, it looks like I will have to try the old scanbuttond backends 
> for this, or see if there are optional enhancements for the SANE hp5590 
> backend.
> 
> Jared
> 


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] SANE automation setup?

2017-11-05 Thread Wilhelm Meier
Please provide the log of scanbd from the beginning on - until the point
where it starts repeating the same messages.

Am 05.11.2017 um 13:07 schrieb Adam Lloyd:
> Here are some of the log files below:
> 
> pi@raspberrypi:~ $ tail -f /var/log/messages
> Nov  3 10:39:44 raspberrypi kernel: [   12.884962] Bluetooth: RFCOMM
> socket layer initialized
> Nov  3 10:39:44 raspberrypi kernel: [   12.884981] Bluetooth: RFCOMM ver
> 1.11
> Nov  3 10:39:45 raspberrypi lightdm[552]: Error getting user list from
> org.freedesktop.Accounts:
> GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
> org.freedesktop.Accounts was not provided by any .service files
> Nov  3 10:39:48 raspberrypi kernel: [   17.721642] fuse init (API
> version 7.26)
> Nov  3 10:39:53 raspberrypi kernel: [   21.889090] EXT4-fs (mmcblk0p5):
> mounted filesystem with ordered data mode. Opts: (null)
> Nov  5 11:59:29 raspberrypi kernel: [  176.512360] warning: process
> `scanbd' used the deprecated sysctl system call with 
> Nov  5 11:59:29 raspberrypi kernel: [  176.512370] 8.
> Nov  5 11:59:29 raspberrypi kernel: [  176.512373] 1.
> Nov  5 11:59:29 raspberrypi kernel: [  176.512375] 2.
> Nov  5 11:59:29 raspberrypi kernel: [  176.512376] 
> 
> 
> pi@raspberrypi:~ $ tail -f /var/log/syslog
> Nov  5 11:59:34 raspberrypi scanbd: scanbd: option[10] enhancement for
> device rts8891:libusb:001:004 not of type BOOL|INT|FIXED|STRING|BUTTON.
> Skipping
> Nov  5 11:59:34 raspberrypi scanbd: scanbd: option[20] sensors for
> device rts8891:libusb:001:004 not of type BOOL|INT|FIXED|STRING|BUTTON.
> Skipping
> Nov  5 11:59:34 raspberrypi scanbd: scanbd: option[1] standard for
> device rts8891:libusb:001:004 not of type BOOL|INT|FIXED|STRING|BUTTON.
> Skipping
> Nov  5 11:59:34 raspberrypi scanbd: scanbd: option[5] geometry for
> device rts8891:libusb:001:004 not of type BOOL|INT|FIXED|STRING|BUTTON.
> Skipping
> Nov  5 11:59:34 raspberrypi scanbd: scanbd: option[10] enhancement for
> device rts8891:libusb:001:004 not of type BOOL|INT|FIXED|STRING|BUTTON.
> Skipping
> Nov  5 11:59:34 raspberrypi scanbd: scanbd: option[20] sensors for
> device rts8891:libusb:001:004 not of type BOOL|INT|FIXED|STRING|BUTTON.
> Skipping
> Nov  5 11:59:34 raspberrypi scanbd: scanbd: option[1] standard for
> device rts8891:libusb:001:004 not of type BOOL|INT|FIXED|STRING|BUTTON.
> Skipping
> Nov  5 11:59:34 raspberrypi scanbd: scanbd: option[5] geometry for
> device rts8891:libusb:001:004 not of type BOOL|INT|FIXED|STRING|BUTTON.
> Skipping
> Nov  5 11:59:34 raspberrypi scanbd: scanbd: option[10] enhancement for
> device rts8891:libusb:001:004 not of type BOOL|INT|FIXED|STRING|BUTTON.
> Skipping
> Nov  5 11:59:34 raspberrypi scanbd: scanbd: option[20] sensors for
> device rts8891:libusb:001:004 not of type BOOL|INT|FIXED|STRING|BUTTON.
> Skipping
> 
> pi@raspberrypi:~ $ lsusb
> Bus 001 Device 006: ID 045e:074f Microsoft Corp. 
> Bus 001 Device 005: ID 0603:00f2 Novatek Microelectronics Corp. Keyboard
> (Labtec Ultra Flat Keyboard)
> Bus 001 Device 004: ID 03f0:0805 Hewlett-Packard HP4470C
> Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
> SMSC9512/9514 Fast Ethernet Adapter
> Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> would the dmesg logs provide additional info?
> 
> 
> 
> 
> 
> 
> On Fri, Nov 3, 2017 at 6:21 AM, Wilhelm Meier
> <wilhelm.wm.me...@googlemail.com
> <mailto:wilhelm.wm.me...@googlemail.com>> wrote:
> 
> Please post the full log, so that one can see the names of all options.
> If the scanner supports a button (option) we will see the name of the
> option in the log. Then one can adapt the config file to match the
> option name and call a scan-script.
> 
> Am 02.11.2017 um 21:49 schrieb Adam Lloyd:
> > Sorry about that. 
> >
> > pi@raspberrypi:~ $ export SANE_CONFIG_DIR=/etc/scanbd
> > pi@raspberrypi:~ $ scanbd -f
> > scanbd: Can't set the effective gid to 116
> > scanbd: Can't set the effective uid to 111
> > scanbd: dbus match
> type='signal',interface='org.freedesktop.Hal.Manager'
> > scanbd: Not Primary Owner (-1)
> > scanbd: Name Error (Connection ":1.18" is not allowed to own the
> service
> > "de.kmux.scanbd.server" due to security policies in the
> configuration file)
> > scanbd: option[1] standard for device rts8891:libusb:001:006 not
> of type
> > BOOL|INT|FIXED|STRING|BUTTON. Skipping
> > scanbd: option[5] geometry for device rts8891:libusb:001:006 not
> of type
> > BO

Re: [sane-devel] SANE automation setup?

2017-11-03 Thread Wilhelm Meier
Please post the full log, so that one can see the names of all options.
If the scanner supports a button (option) we will see the name of the
option in the log. Then one can adapt the config file to match the
option name and call a scan-script.

Am 02.11.2017 um 21:49 schrieb Adam Lloyd:
> Sorry about that. 
> 
> pi@raspberrypi:~ $ export SANE_CONFIG_DIR=/etc/scanbd
> pi@raspberrypi:~ $ scanbd -f
> scanbd: Can't set the effective gid to 116
> scanbd: Can't set the effective uid to 111
> scanbd: dbus match type='signal',interface='org.freedesktop.Hal.Manager'
> scanbd: Not Primary Owner (-1)
> scanbd: Name Error (Connection ":1.18" is not allowed to own the service
> "de.kmux.scanbd.server" due to security policies in the configuration file)
> scanbd: option[1] standard for device rts8891:libusb:001:006 not of type
> BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[5] geometry for device rts8891:libusb:001:006 not of type
> BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[10] enhancement for device rts8891:libusb:001:006 not of
> type BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[20] sensors for device rts8891:libusb:001:006 not of type
> BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[1] standard for device rts8891:libusb:001:006 not of type
> BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[5] geometry for device rts8891:libusb:001:006 not of type
> BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[10] enhancement for device rts8891:libusb:001:006 not of
> type BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[20] sensors for device rts8891:libusb:001:006 not of type
> BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[1] standard for device rts8891:libusb:001:006 not of type
> BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[5] geometry for device rts8891:libusb:001:006 not of type
> BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[10] enhancement for device rts8891:libusb:001:006 not of
> type BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[20] sensors for device rts8891:libusb:001:006 not of type
> BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[1] standard for device rts8891:libusb:001:006 not of type
> BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[5] geometry for device rts8891:libusb:001:006 not of type
> BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[10] enhancement for device rts8891:libusb:001:006 not of
> type BOOL|INT|FIXED|STRING|BUTTON. Skipping
> scanbd: option[20] sensors for device rts8891:libusb:001:006 not of type
> BOOL|INT|FIXED|STRING|BUTTON. Skipping
> 
> pi@raspberrypi:~ $ scanimage --list-devices
> device `rts8891:libusb:001:006' is a Hewlett-Packard 4470c flatbed scanner
> 
> here is the script that scandb is running -- (under the action section
> of the scanbd.conf file)
> 
> #!/bin/bash
> 
> OUT_DIR=~/scans/Today
> TMP_DIR=`mktemp -d`
> FILE_NAME=scan_`date +%Y-%m-%d-%H%M%S`
> LANGUAGE="eng"                 # the tesseract language - ensure you
> installed it
> 
> echo 'scanning...'
> scanimage --resolution 300 \
>           --batch="$TMP_DIR/scan_%03d.pnm" \
>           --format=pnm \
>           --mode Gray \
>           --source 'ADF Front'
> echo "Output saved in $TMP_DIR/scan*.pnm"
> 
> cd $TMP_DIR
> 
> for i in scan_*.pnm; do
>     echo "${i}"
>     convert "${i}" "${i}.tif"
> done
> 
> # do OCR
> echo 'doing OCR...'
> for i in scan_*.tif; do
>     echo "${i}"
>     tesseract "$i" "$i" -l $LANGUAGE hocr
>     hocr2pdf -i "$i" -s -o "$i.pdf" < "$i.hocr"
> done
> 
> # create PDF
> echo 'creating PDF...'
> pdftk *.tif.pdf cat output "compiled.pdf"
> 
> gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook
> -dNOPAUSE -dQUIET -dBATCH -sOutputFile="$FILE_NAME.pdf" compiled.pdf
> 
> cp $FILE_NAME.pdf $OUT_DIR/
> 
> rm -rf $TMP_DIR
> 
> 
> On Thu, Nov 2, 2017 at 4:49 PM, Wilhelm Meier
> <wilhelm.wm.me...@googlemail.com
> <mailto:wilhelm.wm.me...@googlemail.com>> wrote:
> 
> Please post the log as text, not as image ...
> 
> 
> Am 02.11.2017 um 17:21 schrieb Adam Lloyd:
> > Thanks Wilhelm. 
> >
> > Here is the issue with my scandb setup.
> >
> > [IMG]http://i67.tinypic.com/2hqq7op.jpg[/IMG]
> <http://i67.tinypic.com/2hqq7op.jpg[/IMG]>
> >
> >
> > On Thu, Nov 2, 2017 at 12:06 PM, Wilhelm Meier
> > <wilhelm.wm.me...@googlemail.com 
> <mailto:wilhelm.wm.me...@googlemail.com>

Re: [sane-devel] SANE automation setup?

2017-11-02 Thread Wilhelm Meier
Please post the log as text, not as image ...


Am 02.11.2017 um 17:21 schrieb Adam Lloyd:
> Thanks Wilhelm. 
> 
> Here is the issue with my scandb setup.
> 
> [IMG]http://i67.tinypic.com/2hqq7op.jpg[/IMG]
> 
> 
> On Thu, Nov 2, 2017 at 12:06 PM, Wilhelm Meier
> <wilhelm.wm.me...@googlemail.com
> <mailto:wilhelm.wm.me...@googlemail.com>> wrote:
> 
> You should have a look at scanbd:
> 
> https://sourceforge.net/projects/scanbd/
> <https://sourceforge.net/projects/scanbd/>
> 
> 
> 
> Am 02.11.2017 um 16:19 schrieb Adam Lloyd:
> > Hello,
> >
> > I recently moved an old scanner to a raspberry pi to see if I
> could get
> > it to work on alternative platform. A google search revealed that SANE
> > has "good" support for my particular scanner. After a few attempts I
> > managed to get Xsane working on a raspberry pi 3 running with
> stretch. I
> > was able to successfully scan a document! I would like to setup a dumb
> > terminal station, where the scanner sits in a corner and is idle.
> > Whenever some needs to scan a document they would hit the scan button
> > and the document would get moved to our home NAS. I have attempted to
> > get this setup working but without much luck. 
> >
> > Thanks,
> > Adam. 
> >
> >
> 
> 


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] SANE automation setup?

2017-11-02 Thread Wilhelm Meier
You should have a look at scanbd:

https://sourceforge.net/projects/scanbd/



Am 02.11.2017 um 16:19 schrieb Adam Lloyd:
> Hello,
> 
> I recently moved an old scanner to a raspberry pi to see if I could get
> it to work on alternative platform. A google search revealed that SANE
> has "good" support for my particular scanner. After a few attempts I
> managed to get Xsane working on a raspberry pi 3 running with stretch. I
> was able to successfully scan a document! I would like to setup a dumb
> terminal station, where the scanner sits in a corner and is idle.
> Whenever some needs to scan a document they would hit the scan button
> and the document would get moved to our home NAS. I have attempted to
> get this setup working but without much luck. 
> 
> Thanks,
> Adam. 
> 
> 


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Sane_debug not available and front buttons for i1220 not shown in scanimage -A

2017-08-22 Thread Wilhelm
Hi Fan,

if you can perform normal scanning with sane, then the scanner seems to
be supported by the sane-backend you are using. The next question is, if
the backend is capable of reading the option values corresponding to the
buttons. If can't see any value change if you press one of the buttons
its likely that the backend does not support this operation.

Am 22.08.2017 um 04:46 schrieb fm8758ye:
> Hi Wilhelm,
> 
> Thank you for your prompt reply. I have tried holding onto buttons,
> every one of them, and none of the values change. I have tried compiling
> with "scanbuttond =yes" with the same results. When installing the kodak
> official driver, it does provide a kds_i1000.conf which lists the usb
> and ID's of various models, just like the other backends in the sane.d
> folder.
> 
> Have I understood incorrectly if the scanner really support sane?
> 
> Fan
> 
> 
> 
> 在2017年08月18 13时59分, "Wilhelm"<wilhelm.me...@fh-kl.de>写道:
> 
> 
> Hello,
> 
> scanbd depends on sane to detect button presses. For rare cases there is
> the old scanbuttond backend included into the sources of scanbd. In this
> case, you have to manually compile and install scanbd.
> 
> In the log-file you will find all options (including the buttons id they
> are detected by sane) of the scanner. While looking at the log-output of
> scanbd you can identify the button related options if you press a button
> for more than say 0,5s. If the button can be monitored by scanbd you
> must see a value-change for this specific option. Try all buttons.
> 
> If you don't see a value change of any option, than the sane driver is
> not supporting this device.
> 
> But be aware, that the names of the options are sometimes not obviously
> related to their function ...
> 
> Hth,
> Wilhelm
> 
> Am 18.08.2017 um 06:14 schrieb fm8758ye:
> > I am trying to implement scanbd with the scanner as a scan station.
> > However, I got stopped at the first step as scanimage -A only
> shows scan
> > options (such as mode and profiles) and does not show any sensor or
> > button. Holding down the front buttons and doing scanimage -A shows no
> > value different.  I have looked at previous mail lists and saw that
> > sane_debug_? shows more options for scanner. However, the command
> is not
> > available.
> >
> > Q: What do I have to do to get sane_debug_? command? What do I enter
> > after debug_?
> >
> > Anyways, I went on installing scanbd following the readme and
> scanbd is
> > able to poll the scanner but not detecting any button press, as
> > expected. Scanbd -d7 -f shows around 20 options and none of them are
> > related to a button press. With the default scanbd.conf, it kept
> > checking for the change of [preview] value, which does not react to
> > button press.
> >
> > Q: Am I out of luck as the backend does not support buttons?
> >
> > I have tried to capture usb traffic using wireshark but no button
> > presses are recorded.
> >
> > Q: Does capturing a scan packet using scan GUI and analysing it help?
> >
> > Thank you in advance.
> >
> > Ubuntu 14.04 fresh install
>     > Sane 1.0.0.23 does not provide scanner backend for this model so
> > external (official) driver is used instead (kds_i1200).
> > sudo sane-find-scanner, scanimage -L and all other scanimage commands
> > works fine
> >
> >
> >
> >
> >
> >  
> >
> >
> >
> 
> 
> -- 
> Wilhelm
> 
> 
> 
>  
> 
> 
> 


-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Sane_debug not available and front buttons for i1220 not shown in scanimage -A

2017-08-18 Thread Wilhelm
Hello,

scanbd depends on sane to detect button presses. For rare cases there is
the old scanbuttond backend included into the sources of scanbd. In this
case, you have to manually compile and install scanbd.

In the log-file you will find all options (including the buttons id they
are detected by sane) of the scanner. While looking at the log-output of
scanbd you can identify the button related options if you press a button
for more than say 0,5s. If the button can be monitored by scanbd you
must see a value-change for this specific option. Try all buttons.

If you don't see a value change of any option, than the sane driver is
not supporting this device.

But be aware, that the names of the options are sometimes not obviously
related to their function ...

Hth,
 Wilhelm

Am 18.08.2017 um 06:14 schrieb fm8758ye:
> I am trying to implement scanbd with the scanner as a scan station.
> However, I got stopped at the first step as scanimage -A only shows scan
> options (such as mode and profiles) and does not show any sensor or
> button. Holding down the front buttons and doing scanimage -A shows no
> value different.  I have looked at previous mail lists and saw that
> sane_debug_? shows more options for scanner. However, the command is not
> available.
> 
> Q: What do I have to do to get sane_debug_? command? What do I enter
> after debug_?
> 
> Anyways, I went on installing scanbd following the readme and scanbd is
> able to poll the scanner but not detecting any button press, as
> expected. Scanbd -d7 -f shows around 20 options and none of them are
> related to a button press. With the default scanbd.conf, it kept
> checking for the change of [preview] value, which does not react to
> button press.
> 
> Q: Am I out of luck as the backend does not support buttons?
> 
> I have tried to capture usb traffic using wireshark but no button
> presses are recorded.
> 
> Q: Does capturing a scan packet using scan GUI and analysing it help?
> 
> Thank you in advance.
> 
> Ubuntu 14.04 fresh install
> Sane 1.0.0.23 does not provide scanner backend for this model so
> external (official) driver is used instead (kds_i1200).
> sudo sane-find-scanner, scanimage -L and all other scanimage commands
> works fine
> 
> 
> 
> 
> 
>  
> 
> 
> 


-- 
Wilhelm


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] scanbd on ubuntu

2017-06-01 Thread Wilhelm Meier
Well ... what did you test?
Did you follow some setup guide?
Did you inspect the log files?
Did you read the docu of scanbd?


Am 01.06.2017 um 21:49 schrieb Herr Oswald:
> I'm using an old 
> 
> HP 7400c USB scanner on 
> ubuntu 16.10, 
> scanbd 1.4.4-1build1,
> sane-utils 1.0.27+git20170530-yakkety0
> 
> everything as it came - and now I'm a little helpless... ):
> 
> W
> 
> 
> Am Donnerstag, den 01.06.2017, 09:35 +0200 schrieb Wilhelm Meier:
>> Hi Wolf,
>>
>> please provide us with a little bit more information, e.g. what
>> scanner
>> type, the contents of your config-files, log-files.
>>
>> Despite from that: you can follow the ArchLinux setup guide.
>>
>> --
>>  Wilhelm
>>
>> Am 01.06.2017 um 09:14 schrieb Herr Oswald:
>>> Hello,
>>>
>>> I installed the scanbd package on my ubuntu 16.10 - but could not
>>> find
>>> a fairly recent set of instructions for the setup.
>>>
>>> There is a very comprehensive one for ArchLinux from 2013, there is
>>> a
>>> one for ubuntu, but for scanbuttond, which may be outdated as well
>>> -
>>> and the /etc/scanbd/scanbd.conf does not really speak to me... 
>>>
>>> Does anybody here happen to have a hint? - All I want is the
>>> scanner to
>>> make a scan when some button at it is pressed.
>>>
>>> Cheers,
>>> Wolf 
>>>
>>
>>
>>
> 


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] scanbd on ubuntu

2017-06-01 Thread Wilhelm Meier
Hi Wolf,

please provide us with a little bit more information, e.g. what scanner
type, the contents of your config-files, log-files.

Despite from that: you can follow the ArchLinux setup guide.

--
 Wilhelm

Am 01.06.2017 um 09:14 schrieb Herr Oswald:
> Hello,
> 
> I installed the scanbd package on my ubuntu 16.10 - but could not find
> a fairly recent set of instructions for the setup.
> 
> There is a very comprehensive one for ArchLinux from 2013, there is a
> one for ubuntu, but for scanbuttond, which may be outdated as well -
> and the /etc/scanbd/scanbd.conf does not really speak to me... 
> 
> Does anybody here happen to have a hint? - All I want is the scanner to
> make a scan when some button at it is pressed.
> 
> Cheers,
> Wolf 
> 



-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Scanbd, Sane and Samsung SCX-3200

2017-05-26 Thread Wilhelm Meier
Hi Janne,

Am 26.05.2017 um 14:03 schrieb Janne Paalijarvi:
> Hello,
> 
> I am developing support for scan button for my Samsung SCX-3200 series.
> In fact, I actually already wrote some code at:
> 
> https://github.com/usvi/random/tree/master/c/scanbuttond/samsung
> 
> Funnily, I have had not time before these few days to actually try to
> set everything to work for testing.
> 
> Now, when I installed scanbd for my test Ubuntu from Ubuntu
> repositories, I realized that it uses extensively Sane backends. So, my
> question is: Should I actually try to write a backend extension for the
> Sane backend I am using (xerox_mfp)? Is it the way of the future that
> Scanbd actually polls/queries devices via Sane?

I wrote scanbd in order to use the sane-backend, because at the time of
starting with scanbd, scanbuttond seems quite dead. I incorporated
scanbuttond-backends "as-is" to support scanners that didn't had
querying support in sane-backends.

So - in short - up to my view it would be best to make the snae-backend
for your scanner working ...

HTH,
 Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] sane-backends release 1.0.26 schedule

2017-05-06 Thread Wilhelm
Am 06.05.2017 um 14:27 schrieb m. allan noah:
> On Sat, May 6, 2017 at 5:52 AM, Louis Lagendijk <lo...@fazant.net> wrote:
>> On Fri, 2017-04-28 at 08:04 -0400, m. allan noah wrote:
>>> Ok folks, it's time to get another sane-backends release out the
>>> door.
>>>
>>> Olaf has done a good job of cleaning up our contributors list and
>>> curating the bug tracker. However, there are a handful of patches in
>>> the bug tracker that could still be applied, once they are reviewed.
>>> Also, quite a number of backends that are now unmaintained. So, this
>>> is a good time to get involved with sane. If you benefit from this
>>> project, and have some programming experience, we could use the help.
>>>
>>> Schedule:
>>>
>>> May 7: Feature freeze (only fix bugs and update docs after this date)
>>> May 14: Code freeze (only update docs after this date)
>>> May 21: Release
>>>
>>
>> Hi,
>> Yesterday when I had a look at our bug tracker for any issues in my
>> code I found https://alioth.debian.org/tracker/?func=detail_id=30
>> 186=315004=410366
>> This is an issue for scanbd integration that requires more flexibility
>> for configuration of dll-loading: when scanbd is used users need to use
>>  the net backend only, but scanbd/saned need to be fed with the
>> "normal" list of backends.
>> I made a patch to dll.c where
>> - It used the dll.conf with the name pointed out by env. var
>> SANE_CONFIG_FILE if defined, if not
>> - it tries to load a dll2.conf if it exists. This is meant to be a file
>> dropped in thre sane config dir by scanbd. If that does not exist
>> - it follows the existing code path.
>>
>> I added a #include statement in the config file so dll2.conf can
>> include dll.conf if so required.
>>
>> I am in the process of testing and cleaningup. but my question is:
>> should I commit this change so close to the freeze date? Documentation
>> is still to be done, but I would still have 2 weeks for that.
>> Alan, what do you think?
>>
> 
> I don't now recall the entire discussion around the guts of scanbd's
> implementation, but you description sounds a little odd to me.
> 
> 1. If dll2.conf is created by scanbd, and scanbd is not running, and
> the user uses scanimage or another frontend, he will unknowingly load
> dll2.conf first. Even if dll2.conf #includes dll.conf, it is still a
> behavior change.
> 2. Do you not also need changes to saned to make this work? That
> seemed to be the case in the earlier discussion.
> 3. I think I would prefer a more clear name than dll2.conf, but I
> cannot think of one :)

>From a scanbd point of view it would be suffcient to have either:

1) an env-var e.g. SANE_CONFIG_FILE which is normally unset and all
sane-applications use the compile-time setting. scanbd can set this to
an alternative (e.g. scanbd-dll.conf) file before starting saned.

2) give saned a -c  option

I would prefer 1)

Thanks for investigating on this ;.)

--
 Wilhelm


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] sane_init()/sane_exit() crashes on debian systems / not on e.g. arch linux

2017-05-06 Thread Wilhelm Meier
Hi Olaf,

Am 06.05.2017 um 07:58 schrieb Olaf Meeuwissen:
> Hi again,
> 
> Olaf Meeuwissen writes:
> 
>> Hi Wilhelm,
>>
>> Wilhelm writes:
>>
>>> Hi all,
>>>
>>> the following small program regularly crashes on debian based system
>>> when inserting / removing a device. This does not happen on e.g. arch
>>> linux or gentoo systems.
>>
>> A bit late perhaps, but I've been trying to reproduce this without any
>> success.
> 
> I seem to be having more luck now.
> 
>> I'm using Debian stretch (9.0 to be), last updated 2017-05-01 with a
>> default SANE configuration.  I don't have scanbd installed and don't
>> have saned set up.  I have an EPSON PM-A750 attached which is supported
>> by the epson2 backend.
>>
>> I saved your program to debian-crash.c and compiled with:
>>
>>   gcc -lsane -o debian-crash debian-crash.c
>>
>> Running ./debian-crash (I'm a member of the scanner group so no sudo is
>> required) did not produce the problem you describe.  At least not in the
>> 5 or 6 cycles I let it run for before killing it with Ctrl-C.
> 
> After 10 cycles the pixma backend started printing warnings but no
> crash.  I had to enable localhost in the net backend to get things
> to crash.  That also happened at the 10th cycle (on my system).
> 
>   sane version 1.0
>   [bjnp] create_broadcast_socket: ERROR - can not open socket - Too many open 
> files[bjnp] create_broadcast_socket: ERROR - can not open socket - Too many 
> open files[bjnp] create_broadcast_socket: ERROR - can not open socket - Too 
> many open filesdebian-crash: thread-watch.c:171: avahi_threaded_poll_lock: 
> Assertion `p' failed.
>   Aborted
> 
> I used f3f8afb0 with the debian/rules for 1.0.25-4 to configure and
> build libraries.  Running the same test with the libsane.so that
> produces no longer triggered the above.
> I let it run for 100 cycles but that did not trigger any crash.
> 
>> [snip]
>>> Any reasons or plans to fix that?
> 
> Looks like it has been fixed in the latest code in git (although I don't
> know what commit(s) were responsible for that).  

thank you for dealing with this issue.

This seems very reasonable to me since ArchLinux the package uses the
most recent sources whereas debian / ubuntu is a bit behind.

Well, I had to put a workaround into scanbd ...

Thanks again!

> If you still see this
> problem on your end with the latest version in git, please let us know
> what is needed to reproduce and include more details on the symptoms you
> see.
> 
> Hope this helps,
> --
> Olaf Meeuwissen, LPIC-2FSF Associate Member since 2004-01-27
>  GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
>  Support Free Softwarehttps://my.fsf.org/donate
>  Join the Free Software Foundation  https://my.fsf.org/join
> 


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] scanbd ... next steps / questions ...

2017-05-03 Thread Wilhelm Meier
Am 03.05.2017 um 19:50 schrieb Dr.-Ing. Dieter Jurzitza:
> Hi Axel,
> thank you very much for your feedback - I hope to have more spare time next 
> weekend to dive again into this issue.
> 
> But in general: I had had thought that there is a "generic" dll.conf having 
> only the net - backend enabled that sits in /etc/saned (after configuration 
> of 
> scanbd). This I took from the README.txt:
> 
> ***
> 6) sane config
> 
> All desktop applications should only get access to the scanners via the net
> backend, so edit /etc/sane.d/dll.conf to only contain the net-backend on the 
> desktop machines. 
> 
> example dll.conf:
> ---
> net
> ---
> ***
> 
> but somewhere there is a need to tell sane which physical device to use, so I 
> thought - maybe erratically - that scanbd "hides" other entries / a different 
> dll.conf in /etc/saned from sane and tells sane itself which scanner to use 
> but depicts to the "outer world" that there is nothing but a network scanner. 
> As readily said, this may be totally wrong. If I read your comments it sounds 
> as if the sane - configuration ought to remain "as is", but this is not what 
> the above mentioned entry in README.txt from scanbd tells me.

Please read the ReadMe.txt carefully ;-)

All local scan-applications like xsane e.g. have to use the net-backend.
This is the only way to intercept a scan-request by scanbd. scanbd in
turn has to start saned to perform the real scan. saned itself use the
normal way for configuration: it normally would use the
/etc/sane/dll.conf, but this would be wrong since it leads to an
infinity recursion via the net backend. Therefore scanbd uses the
SANE_CONFIG_DIR to point saned to another location to find an
alternative dll.conf - and this dll.conf should only contain the local
attached scanners (or remote on other machines).

Sounds a bit complicated, but this is the way it is ...

HTH,
 Wilhelm

> 
> Regards,
> thanks for all the work
> 
> 
> 
> 
> Dieter Jurzitza
> 
> 
> 
> Am Donnerstag, 27. April 2017, 15:29:09 schrieb Axel Schöner:
>> Am Samstag, 22. April 2017, 19:02:57 CEST schrieb Dr.-Ing. Dieter Jurzitza:
>>> Dear listmembers,
>>> probably these questions have readily been asked over and over again, then
>>> my apologies:
>>>
>>> 1.) /etc/scanbd/scripts
>>> which scripts does this refer to? There are some scripts in /etc/scanbd,
>>> those like "scanadf.script" and "test.script" (I am using a spec - file
>>> for
>>> opensuse some other person had had generated)? If I look into
>>> /etc/scanbd/scanbd.conf they ought to reside within /etc/scanbd/scripts,
>>> is
>>> that correct? Is there a configure - option that would print out all
>>> directories in use (or, even better, put this summarizing into config.log
>>> like several other packages do / emacs is a nice example in this regard
>>> ...)?
>>
>> The scripts which are executed while device insertion/removal and by pushing
>> buttons should be located in ${prefix}/etc/scanbd/scripts. We will fix the
>> makefiles... to correct this (in the next days).
>>
>>> 2.) /usr/lib64/scanbd/scanbuttond/backends, is this the directory I should
>>> copy /etc/saned/dll.conf to as well as all the other files from /etc/saned
>>> that are uncommented within *this* dll.conf (except net.conf) in contrast
>>> to /etc/saned/dll.conf that ought to contain no reference but "net"? Is
>>> this what is menat with "backends"?
>>
>> I think these files should be in ${prefix}/etc/saned/. Where do you have
>> this information from?
>>
>>> 3.) SCANBD_DEVICE could be /dev/scanner (if I have such a device?)
>>
>> In most cases there is no such devicenode.
>> It could be something like plustek:libusb:001:003.
>> When you plug in your device it should be detected if there is a supported
>> driver configured. Look at the end of ${prefix}/etc/saned/scanbd.conf
>>
>>> 4.) SCANBD_ACTION - I do not really understand what is about this.
>>
>> This is a variable which represents the actual event (insert, remove, scan,
>> copy, ...) the definitions are in scanbd.conf.
>> It is possible to trigger different scripts based on these events (if you
>> have more then one detected button on your scanner).
>>
>> You can launch scanbd in debug mode to see the values of SCANBD_DEVICE and
>> SCANBD_ACTION: ${prefix}/sbin/scanbd -d7 -f -c
>> ${prefix}/etc/scanbd/scanbd.conf .
>>
>>> From

[sane-devel] Scanner Button Daemon [scanbd]: New release 1.5.1

2017-04-19 Thread Wilhelm Meier
Hi all,

I like to announce the new version 1.5.1 of scanbd, the scanner button
daemon.

This release fixes some autoconf problems and naming problems.

Feel free to get it via

http://sourceforge.net/projects/scanbd/files/releases/scanbd-1.5.1.tgz/download

or

svn co https://scanbd.svn.sourceforge.net/svnroot/scanbd/releases/1.5.1

[
scanbd is a scanner button daemon. It polls the scanner buttons looking
for buttons pressed or function knob changes or other scanner events  as
paper inserts / removals and at the same time (!) allows
also scan-applications to access the scanners, locally or remote via
network. If buttons are pressed or other scanner events take place,
various actions can be submitted (scan, copy, email, ...) via action
scripts. The function knob values are passed to the action-scripts as
well. Scan actions are also signaled via dbus. This can be useful for
foreign applications. Scans can also be triggered via dbus or signals
from foreign applications.
On platforms which support signaling of dynamic device insertion /
removal (using e.g. libudev, dbus, hal) scanbd supports this as well.
scanbd can use all sane-backends or some special backends from the (old)
scanbuttond project.
Supported platforms: Linux (x86/ARM), FreeBSD, NetBSD, OpenBSD
]

-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] scanbd and Canon LiDE 60: buttons not recognized ?

2017-04-16 Thread Wilhelm Meier
Am 16.04.2017 um 16:15 schrieb Florian Gagel:
> Hi Wilhelm,
> 
> thanks for your patch, works like a charm - I just had to made a small
> modification since
> the backend name inside the wrapper actually is "Genesys USB" (see below).

Thank you, Florian, for checking this once again. Just pushed this into
trunk!

> A minor hint for those who tinker around like me: Do no forget to turn
> debugging off in
> scanbd.conf when finished, otherwise syslog will overflow :-)
> 
> Regards,
> 
>   Florian
> 
> === cut here 
> --- /usr/local/src/tmp/1.5.0/src/scanbd/scanbuttond_wrapper.c   
> 2017-04-05 05:46:59.0 +
> +++ scanbuttond_wrapper.c2017-04-16 13:41:07.140209953 +
> @@ -1062,11 +1062,35 @@
>  assert(backend_name);
>  slog(SLOG_INFO, "scanbtnd_button_name, backend: %s", backend_name);
>  
> -if (strcmp("snapscan", backend_name)) {
> -assert(button <= 5);
> +if (strncmp("Genesys", backend_name,7) == 0) {
>  switch(button) {
>  case 0:
> -return NULL;
> +return "zero";
> +break;
> +case 1:
> +return "copy";
> +break;
> +case 2:
> +return "scan";
> +break;
> +case 3:
> +return "pdf";
> +break;
> +case 4:
> +return "email";
> +break;
> +case 5:
> +return "stop";
> +break;
> +default:
> +return "default";
> +break;
> +}
> +}
> +else {
> +switch(button) {
> +case 0:
> +return "zero";
>  break;
>  case 1:
>  return "scan"; // "web";
> @@ -1084,9 +1108,10 @@
>  return "stop";
>  break;
>  default:
> -return NULL;
> +return "default";
>  break;
>  }
> +   
>  }
>  return NULL;
>  }
> 
> 
> Am 16.04.2017 um 11:59 schrieb Wilhelm:
>> Am 15.04.2017 um 20:38 schrieb Florian Gagel:
>>> Hi Wilhelm,
>>>
>>> thanks, your modification made all four buttons work !
>> Great!
>>
>>> This seems somewhat surprising to me at first glance, should  the
>>> backend not be strcmp'ed using "==0", providing
>>> an own section for each backend :-) ? Anyway, it works, even if the
>>> buttons are somewhat scrambled:
>> Please backout the last patch I sent and now apply the attached one.
>> This should mark your buttons with the right labels.
>>
>> If thats ok for you, I'll check this into trunk.
>>
>> Please report if teh patch is ok, or make your own modifications and
>> send the patch back to me to be inserted into trunk.
>>
>> Thanks for using scanbd.
>>
>> -- Wilhelm
>>
>>>  (Button press at scanner)  -> (Action)
>>> 
>>> Email  -> PDF
>>> PDF -> Email
>>> Scan   -> Copy
>>> Copy   -> Scan.
>>>
>>> I also used string-triggers only. The buttons may have to be pressed for
>>> a short period exceeding the polling interval.
>>> Some minor possible pitfalls using the installations defaults of
>>> scanbd-1.5.0 under Ubuntu 16.04:
>>> - I removed the default package and configured the newer scanbd 1.5.0 as
>>> described in the previous mail. I also used xinetd instead of the ubuntu
>>> default
>>>bsd-inetd for network scanner access although this should be of no
>>> relevance.
>>> - Wilhelms patch has to be applied to scanbuttond_wrapper.c (removed
>>> assertion, return strings on any value of "button").
>>> - In scanbd.conf: Group should be "saned". Make sure all paths refer to
>>> /usr/local/etc/scanbd, scriptdir = /usr/local/etc/scanbd/scripts, ...
>>> - The new path also enters into /lib/systemd/system/scanbd.service,
>>> after changing that do "systemctl daemon-reload" and restart scanbd.
>>>
>>> Now I am happy because of the four programmable buttons for my Odroid-U2
>>> SoC which has no monitor attached to it :-)
>>>
>>> Thanks again Wilhelm and Happy Easter !
>>>
>>>   Florian
>>>
>>> Am 15.04.2017 um 17:32 schrieb Wilhelm:
>>>> Am 15.04.2017 um 16:13 schrieb Florian Gag

Re: [sane-devel] scanbd and Canon LiDE 60: buttons not recognized ?

2017-04-16 Thread Wilhelm
Am 15.04.2017 um 20:38 schrieb Florian Gagel:
> Hi Wilhelm,
> 
> thanks, your modification made all four buttons work !

Great!

> This seems somewhat surprising to me at first glance, should  the
> backend not be strcmp'ed using "==0", providing
> an own section for each backend :-) ? Anyway, it works, even if the
> buttons are somewhat scrambled:

Please backout the last patch I sent and now apply the attached one.
This should mark your buttons with the right labels.

If thats ok for you, I'll check this into trunk.

Please report if teh patch is ok, or make your own modifications and
send the patch back to me to be inserted into trunk.

Thanks for using scanbd.

-- Wilhelm

>  (Button press at scanner)  -> (Action)
> 
> Email  -> PDF
> PDF -> Email
> Scan   -> Copy
> Copy   -> Scan.
> 
> I also used string-triggers only. The buttons may have to be pressed for
> a short period exceeding the polling interval.
> Some minor possible pitfalls using the installations defaults of
> scanbd-1.5.0 under Ubuntu 16.04:
> - I removed the default package and configured the newer scanbd 1.5.0 as
> described in the previous mail. I also used xinetd instead of the ubuntu
> default
>bsd-inetd for network scanner access although this should be of no
> relevance.
> - Wilhelms patch has to be applied to scanbuttond_wrapper.c (removed
> assertion, return strings on any value of "button").
> - In scanbd.conf: Group should be "saned". Make sure all paths refer to
> /usr/local/etc/scanbd, scriptdir = /usr/local/etc/scanbd/scripts, ...
> - The new path also enters into /lib/systemd/system/scanbd.service,
> after changing that do "systemctl daemon-reload" and restart scanbd.
> 
> Now I am happy because of the four programmable buttons for my Odroid-U2
> SoC which has no monitor attached to it :-)
> 
> Thanks again Wilhelm and Happy Easter !
> 
>   Florian
> 
> Am 15.04.2017 um 17:32 schrieb Wilhelm:
>> Am 15.04.2017 um 16:13 schrieb Florian Gagel:
>>> Hi Wilhelm,
>>>
>>> thanks for your reply -  I made some progress in this issue however
>>> still did not fully succeed.
>>>
>>> - First step as you told me: make clean, configure --enable-scanbuttond,
>>> make, make install, copy manually the
>>> old backends to /usr/local/lib/scanbd/scanbuttond as described in the
>>> README (this all with the 1.5.0 version of scanbd).
>>> - Starting scanbd -f -d7, I first got a "scanbd: Can't get the scbtn
>>> device list" error.
>>> - I edited /usr/local/lib/scanbd/scanbuttond/backends/meta.conf, making
>>> it contain the single line "genesys" which was missing before.
>> Yes, per default this was not included - I added it to trunk.
>>
>>> - Then the LiDE-60 was recognized by the old backend, together with its
>>> four buttons !
>>> - However, scanbd finally stumbled on an assertion:/
>> Looks like you were the first one with an appropriate scanner to test
>> this ;-)
>>
>> You can safely remove the mentioned assertion if you return non-null
>> string-literals in all switch cases including the default case:
>>
>> --- scanbuttond_wrapper.c   (Revision 236)
>>
>> +++ scanbuttond_wrapper.c   (Arbeitskopie)
>>
>> @@ -1063,10 +1063,9 @@
>>
>>   slog(SLOG_INFO, "scanbtnd_button_name, backend: %s", backend_name);
>>
>>
>>
>>   if (strcmp("snapscan", backend_name)) {
>> -assert(button <= 5);
>>   switch(button) {
>>   case 0:
>> -return NULL;
>> +return "zero";
>>   break;
>>   case 1:
>>   return "scan"; // "web";
>> @@ -1084,7 +1083,7 @@
>>   return "stop";
>>   break;
>>   default:
>> -return NULL;
>> +return "default";
>>   break;
>>   }
>>   }
>>
>>
>> If you don't mind please test this modification. I you succeed with it
>> I'll put it into trunk.
>>
>>> root@gandroid:/usr/local/etc/scanbd# scanbd -f -d7
>>> scanbd: reading config file /usr/local/etc/scanbd/scanbd.conf
>>> scanbd: debug on: level: 7
>>> scanbd: dropping privs to uid saned
>>> scanbd: dropping privs to gid scanner
>>> scanbd: group scanner has member:
>>> scanbd: saned
>>> scanbd: drop privileges to gid: 121
>>> scanbd: Running as effective gid 121
>>

Re: [sane-devel] SCSI-scanner & scanbuttond ...

2017-04-16 Thread Wilhelm Meier
Am 16.04.2017 um 09:27 schrieb Dr.-Ing. Dieter Jurzitza:
> Dear listmembers,
> prior to actually start playing around: can scanbuttond work with a SCSI - 
> scanner? I know, it is oldfashioned, but I like it this way :-)
> I am using an HP ScanJet 6300 C via its SCSI-interface. It has 5 buttons at 
> the front side.

Looking into the list of supported devices of libsane, you'll find that
the HP 6300C has complete support.

Looking into the sources of scanbuttond I don't see any support.

So, scanbd with libsane will do the trick if querying the button-options
is implemented in the backend for the HP6300C ...

Just make a test ...

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] scanbd and Canon LiDE 60: buttons not recognized ?

2017-04-15 Thread Wilhelm
Am 15.04.2017 um 16:13 schrieb Florian Gagel:
> Hi Wilhelm,
> 
> thanks for your reply -  I made some progress in this issue however
> still did not fully succeed.
> 
> - First step as you told me: make clean, configure --enable-scanbuttond,
> make, make install, copy manually the
> old backends to /usr/local/lib/scanbd/scanbuttond as described in the
> README (this all with the 1.5.0 version of scanbd).
> - Starting scanbd -f -d7, I first got a "scanbd: Can't get the scbtn
> device list" error.
> - I edited /usr/local/lib/scanbd/scanbuttond/backends/meta.conf, making
> it contain the single line "genesys" which was missing before.

Yes, per default this was not included - I added it to trunk.

> - Then the LiDE-60 was recognized by the old backend, together with its
> four buttons !
> - However, scanbd finally stumbled on an assertion:/

Looks like you were the first one with an appropriate scanner to test
this ;-)

You can safely remove the mentioned assertion if you return non-null
string-literals in all switch cases including the default case:

--- scanbuttond_wrapper.c   (Revision 236)

+++ scanbuttond_wrapper.c   (Arbeitskopie)

@@ -1063,10 +1063,9 @@

 slog(SLOG_INFO, "scanbtnd_button_name, backend: %s", backend_name);



 if (strcmp("snapscan", backend_name)) {
-assert(button <= 5);
 switch(button) {
 case 0:
-return NULL;
+return "zero";
 break;
 case 1:
 return "scan"; // "web";
@@ -1084,7 +1083,7 @@
 return "stop";
 break;
 default:
-return NULL;
+return "default";
 break;
 }
 }


If you don't mind please test this modification. I you succeed with it
I'll put it into trunk.

> root@gandroid:/usr/local/etc/scanbd# scanbd -f -d7
> scanbd: reading config file /usr/local/etc/scanbd/scanbd.conf
> scanbd: debug on: level: 7
> scanbd: dropping privs to uid saned
> scanbd: dropping privs to gid scanner
> scanbd: group scanner has member:
> scanbd: saned
> scanbd: drop privileges to gid: 121
> scanbd: Running as effective gid 121
> scanbd: drop privileges to uid: 120
> scanbd: Running as effective uid 120
> scanbd: dbus_init
> scanbd: dbus match type='signal',interface='org.freedesktop.Hal.Manager'
> scanbd: Loading /usr/local/lib/scanbd/scanbuttond/backends/meta.so
> scanbd: Loading /usr/local/lib/scanbd/scanbuttond/backends/genesys.so
> scanbd: Scanning for local-only devices
> scanbd: found device: CanoScan LiDE 60 Canon genesys:libusb:001:016
> scanbd: start_scbtn_threads
> scanbd: start the threads (1)
> scanbd: Starting poll thread for CanoScan LiDE 60
> scanbd: Thread started for device CanoScan LiDE 60
> scanbd: start dbus thread
> scanbd: scbtn_poll
> scanbd: udev init
> scanbd: get udev monitor
> scanbd: udev fd is non-blocking, now setting to blocking mode
> scanbd: start udev thread
> scanbd: udev thread started
> scanbd: timeout: 500 ms
> scanbd: Iteration on dbus call
> scanbd: found 15 options for device CanoScan LiDE 60
> scanbd: sane_find_matching_options
> scanbd: found 3 actions in section (null)
> scanbd: checking action scan with filter: ^scan.*
> scanbd: scanbtnd_button_name (1)
> scanbd: scanbtnd_button_name, backend: Genesys USB
> scanbd: found active option[0] scan for device CanoScan LiDE 60
> scanbd: installing action scan (0) for CanoScan LiDE 60, option[0]: scan
> as: test.script
> scanbd: multiple actions allowed
> scanbd: scanbtnd_button_name (2)
> scanbd: scanbtnd_button_name, backend: Genesys USB
> scanbd: found active option[1] copy for device CanoScan LiDE 60
> scanbd: scanbtnd_button_name (3)
> scanbd: scanbtnd_button_name, backend: Genesys USB
> scanbd: found active option[2] email for device CanoScan LiDE 60
> scanbd: scanbtnd_button_name (4)
> scanbd: scanbtnd_button_name, backend: Genesys USB
> scanbd: found active option[3] pdf for device CanoScan LiDE 60
> scanbd: scanbtnd_button_name (5)
> scanbd: scanbtnd_button_name, backend: Genesys USB
> scanbd: found active option[4] stop for device CanoScan LiDE 60
> scanbd: scanbtnd_button_name (6)
> scanbd: scanbtnd_button_name, backend: Genesys USB
> scanbd: scanbuttond_wrapper.c:1066: scanbtnd_button_name: Assertion
> `button <= 5' failed.
> Aborted
> 
> Of course there are only 4 buttons physically, plus one hidden reset
> button. Now i am unsure whether simply to edit the source code in order to
> remove the assertion. My feeling is it might work then.
> 
> Regards,
>  
>   Florian/
> 
> /Am 15.04.2017 um 12:26 schrieb Wilhelm Meier:
>> Hi Florian,
>>
>> scanbd totally relies on lib

Re: [sane-devel] scanbd and Canon LiDE 60: buttons not recognized ?

2017-04-15 Thread Wilhelm Meier
; scanbd: found active option[25] contrast (type: 1) for device
> genesys:libusb:001:016
> scanbd: found active option[27] lamp-off-time (type: 1) for device
> genesys:libusb:001:016
> scanbd: found active option[28] lamp-off-scan (type: 0) for device
> genesys:libusb:001:016
> scanbd: found active option[29] threshold (type: 2) for device
> genesys:libusb:001:016
> scanbd: found active option[30] threshold-curve (type: 1) for device
> genesys:libusb:001:016
> scanbd: found active option[31] disable-dynamic-lineart (type: 0) for
> device genesys:libusb:001:016
> scanbd: found active option[32] disable-interpolation (type: 0) for
> device genesys:libusb:001:016
> scanbd: found active option[33] color-filter (type: 3) for device
> genesys:libusb:001:016
> scanbd: found active option[34] calibration-file (type: 3) for device
> genesys:libusb:001:016
> scanbd: found active option[35] expiration-time (type: 1) for device
> genesys:libusb:001:016
> scanbd: found active option[48] clear-calibration (type: 4) for device
> genesys:libusb:001:016
> scanbd: sane_find_matching_functions
> scanbd: no matching functions in section canon
> scanbd: timeout: 500 ms
> scanbd: Start the polling for device genesys:libusb:001:016
> scanbd: polling thread for genesys:libusb:001:016, before cancellation point
> scanbd: polling thread for genesys:libusb:001:016, after cancellation point
> scanbd: polling device genesys:libusb:001:016
> scanbd: get_sane_option_value
> scanbd: checking option preview number 4 (0) for device
> genesys:libusb:001:016: value: 0
> scanbd: polling thread for genesys:libusb:001:016, before cancellation point
> scanbd: polling thread for genesys:libusb:001:016, after cancellation point
> scanbd: polling device genesys:libusb:001:016
> scanbd: get_sane_option_value
> scanbd: checking option preview number 4 (0) for device
> genesys:libusb:001:016: value: 0
> scanbd: Iteration on dbus call
> scanbd: polling thread for genesys:libusb:001:016, before cancellation point
> scanbd: polling thread for genesys:libusb:001:016, after cancellation point
> scanbd: polling device genesys:libusb:001:016
> scanbd: get_sane_option_value
> scanbd: checking option preview number 4 (0) for device
> genesys:libusb:001:016: value: 0
> scanbd: polling thread for genesys:libusb:001:016, before cancellation point
> scanbd: polling thread for genesys:libusb:001:016, after cancellation point
> scanbd: polling device genesys:libusb:001:016
> scanbd: get_sane_option_value
> scanbd: checking option preview number 4 (0) for device
> genesys:libusb:001:016: value: 0
> scanbd: Iteration on dbus call
> scanbd: polling thread for genesys:libusb:001:016, before cancellation point
> scanbd: polling thread for genesys:libusb:001:016, after cancellation point
> scanbd: polling device genesys:libusb:001:016
> scanbd: get_sane_option_value
> scanbd: checking option preview number 4 (0) for device
> genesys:libusb:001:016: value: 0
> scanbd: polling thread for genesys:libusb:001:016, before cancellation point
> scanbd: polling thread for genesys:libusb:001:016, after cancellation point
> scanbd: polling device genesys:libusb:001:016
> scanbd: get_sane_option_value
> scanbd: checking option preview number 4 (0) for device
> genesys:libusb:001:016: value: 0
> scanbd: Iteration on dbus call
> scanbd: polling thread for genesys:libusb:001:016, before cancellation point
> scanbd: polling thread for genesys:libusb:001:016, after cancellation point
> scanbd: polling device genesys:libusb:001:016
> scanbd: get_sane_option_value
> 
> 
> My scanbd.conf:
> 
> /*
>  * $Id: scanbd.conf 237 2017-04-05 05:46:59Z wimalopaan $
>  *
>  *  scanbd - KMUX scanner button daemon
>  *
>  *  Copyright (C) 2008 - 2016 Wilhelm Meier (wilhelm.me...@fh-kl.de)
>  *
>  *  This program is free software; you can redistribute it and/or modify
>  *  it under the terms of the GNU General Public License as published by
>  *  the Free Software Foundation; either version 2 of the License, or
>  *  (at your option) any later version.
>  *
>  *  This program is distributed in the hope that it will be useful,
>  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
>  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>  *  GNU General Public License for more details.
>  *
>  *  You should have received a copy of the GNU General Public License
>  *  along with this program; if not, write to the Free Software
>  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301, USA.
>  */
> 
> 
> # global settings
> global {
> # turn on debugging
>
> # log to console
> debug   = true
> 
> # debug logging
> 

Re: [sane-devel] scanbd crashes when turning on all-in-one

2017-04-11 Thread Wilhelm
Am 11.04.2017 um 16:49 schrieb Manuel Reiter:
> I'm using scanbd with a Pixma MP610 all-in-one on a Raspberry Pi 3 running an 
> up-to-date Rasbian Jessie.
> This works pretty well (with some setup help from this list). However, when I 
> turn on the device, scanbd
> seems to crash:

This is a known bug on debian-based systems. The root cause is due to a
bug in libsane.

However, since scanbd-1.5.0 (or trunk) there is a workaround in scanbd
that should fix the problem.

What is your version?

> 
> Apr 11 07:32:40 hive kernel: [134163.203415] usb 1-1.2: new high-speed USB 
> device number 8 using dwc_otg
> Apr 11 07:32:40 hive kernel: [134163.304688] usb 1-1.2: New USB device found, 
> idVendor=04a9, idProduct=1725
> Apr 11 07:32:40 hive kernel: [134163.304711] usb 1-1.2: New USB device 
> strings: Mfr=1, Product=2, SerialNumber=3
> Apr 11 07:32:40 hive kernel: [134163.304724] usb 1-1.2: Product: MP610 series
> Apr 11 07:32:40 hive kernel: [134163.304736] usb 1-1.2: Manufacturer: Canon
> Apr 11 07:32:40 hive kernel: [134163.304748] usb 1-1.2: SerialNumber: 414EE7
> Apr 11 07:32:40 hive kernel: [134163.310051] usblp 1-1.2:1.1: usblp0: USB 
> Bidirectional printer dev 8 if 1 alt 0 proto 2 vid 0x04A9 pid 0x1725
> Apr 11 07:32:40 hive kernel: [134163.310535] usb-storage 1-1.2:1.2: USB Mass 
> Storage device detected
> Apr 11 07:32:40 hive kernel: [134163.311524] scsi host3: usb-storage 1-1.2:1.2
> Apr 11 07:32:40 hive systemd[1]: Starting Printer.
> Apr 11 07:32:40 hive systemd[1]: Reached target Printer.
> Apr 11 07:32:40 hive systemd[1]: scanbd.service: main process exited, 
> code=killed, status=11/SEGV
> 
> Is this known behaviour? I guess I can get around it by adding a Restart 
> option to the systemd unit file,
> but I'd like to know whether something's possibly wrong first.
> 
> Thanks in advance for your help!
> 
> All the best,
> 
>   Manuel
> 


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] scanbd crashes when turning on all-in-one

2017-04-11 Thread Wilhelm
Am 11.04.2017 um 16:49 schrieb Manuel Reiter:
> I'm using scanbd with a Pixma MP610 all-in-one on a Raspberry Pi 3 running an 
> up-to-date Rasbian Jessie.
> This works pretty well (with some setup help from this list). However, when I 
> turn on the device, scanbd
> seems to crash:

This is a known bug on debian-based systems. The root cause is due to a
bug in libsane.

However, since scanbd-1.5.0 (or trunk) there is a workaround in scanbd
that should fix the problem.

What is your version?

> 
> Apr 11 07:32:40 hive kernel: [134163.203415] usb 1-1.2: new high-speed USB 
> device number 8 using dwc_otg
> Apr 11 07:32:40 hive kernel: [134163.304688] usb 1-1.2: New USB device found, 
> idVendor=04a9, idProduct=1725
> Apr 11 07:32:40 hive kernel: [134163.304711] usb 1-1.2: New USB device 
> strings: Mfr=1, Product=2, SerialNumber=3
> Apr 11 07:32:40 hive kernel: [134163.304724] usb 1-1.2: Product: MP610 series
> Apr 11 07:32:40 hive kernel: [134163.304736] usb 1-1.2: Manufacturer: Canon
> Apr 11 07:32:40 hive kernel: [134163.304748] usb 1-1.2: SerialNumber: 414EE7
> Apr 11 07:32:40 hive kernel: [134163.310051] usblp 1-1.2:1.1: usblp0: USB 
> Bidirectional printer dev 8 if 1 alt 0 proto 2 vid 0x04A9 pid 0x1725
> Apr 11 07:32:40 hive kernel: [134163.310535] usb-storage 1-1.2:1.2: USB Mass 
> Storage device detected
> Apr 11 07:32:40 hive kernel: [134163.311524] scsi host3: usb-storage 1-1.2:1.2
> Apr 11 07:32:40 hive systemd[1]: Starting Printer.
> Apr 11 07:32:40 hive systemd[1]: Reached target Printer.
> Apr 11 07:32:40 hive systemd[1]: scanbd.service: main process exited, 
> code=killed, status=11/SEGV
> 
> Is this known behaviour? I guess I can get around it by adding a Restart 
> option to the systemd unit file,
> but I'd like to know whether something's possibly wrong first.
> 
> Thanks in advance for your help!
> 
> All the best,
> 
>   Manuel
> 


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] scanbd on Raspbian: scanner only sporadically detected

2017-04-09 Thread Wilhelm Meier
Am 09.04.2017 um 12:23 schrieb Manuel Reiter:
> Hi everybody,
> 
> I'm currently trying to set up saned with a Canon Pixma MP610 on a Raspberry 
> Pi 3 running the latest Raspbian Jessie. Scanning works well, however I have 
> some trouble gettings scanbd to work reliably. Scanbd will only detect the 
> scanner on startup every once in a while. Log from the last successful start 
> is at
> 
>   http://paste.debian.net/926687
> 
> This was a foreground run, unfortunately only on debug level 4. After I 
> terminated this run, I started scanbd via systemd. This did not detect my 
> scanner. All subsequent tries were unsuccessfull as well. Log from one such 
> try at debug level 7 is at
> 
>   http://paste.debian.net/926688

Please check the SANE_CONFIG_DIR env-variable for your foreground runs.


> 
> My config files are
> 
> /etc/scanbd/scanbd.conf:  http://paste.debian.net/926677
> /etc/scanbd/sane.d/saned.conf:http://paste.debian.net/926680
> /etc/scanbd/sane.d/dll.conf:  http://paste.debian.net/926683
> /etc/saned/saned.conf:http://paste.debian.net/926684
> /etc/saned/dll.conf:  http://paste.debian.net/926685
> 
> What seems weird to me is that scanimage -L detects the scanner reliably 
> every time, both local and remote, so scanbm doesn't seem to share the 
> problem.
> 
> Any hints on how to debug this are highly welcome, thanks in advance! If you 
> need any more info, please ask!
> 
> Cheers,
> 
>  Manuel
> 


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] sane_init()/sane_exit() crashes on debian systems / not on e.g. arch linux

2017-04-05 Thread Wilhelm
Hi all,

the following small program regularly crashes on debian based system
when inserting / removing a device. This does not happen on e.g. arch
linux or gentoo systems.

Investigating the problem further reveals that on debian based systems
every iteration starts a new thread ending up with tons of threads:
thats obviously the problem here.

On ArchLinux the sane_exit() call termintates the thread started in
sane_init() abd therefore no crash happens here.

Any reasons or plans to fix that?

#include 
#include 
#include 
#include 
#include 

int main () {
   while (true) {
   SANE_Int sane_version = 0;
   if (sane_init(_version, 0) != SANE_STATUS_GOOD) {
   printf("Can't init sane\n");
   exit(EXIT_FAILURE);
   }
   printf("sane version %d.%d\n", SANE_VERSION_MAJOR(sane_version),
SANE_VERSION_MINOR(sane_version));

   const SANE_Device** device_list = NULL;
   if (sane_get_devices(_list, SANE_TRUE) == SANE_STATUS_GOOD) {
   const SANE_Device** dev = device_list;
   while (*dev) {
   printf("dev name: %s\n", (*dev)->name);
   dev++;
   }
   } else {
   printf("Can't get dev list\n");
   exit(EXIT_FAILURE);
   }
   sleep (1);
   printf("sane_exit\n");
   sane_exit();
   sleep (1);
   }
   exit(EXIT_SUCCESS);
}

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] Scanner Button Daemon [scanbd]: New release 1.5.0

2017-04-04 Thread Wilhelm Meier
Hi all,

I like to announce the new version 1.5.0 of scanbd, the scanner button
daemon.

This release fixes an error when inserting/removing devices (on debian
based systems).

Feel free to get it via

http://sourceforge.net/projects/scanbd/files/releases/scanbd-1.5.0.tgz/download

or

svn co https://scanbd.svn.sourceforge.net/svnroot/scanbd/releases/1.5.0

[
scanbd is a scanner button daemon. It polls the scanner buttons looking
for buttons pressed or function knob changes or other scanner events  as
paper inserts / removals and at the same time (!) allows
also scan-applications to access the scanners, locally or remote via
network. If buttons are pressed or other scanner events take place,
various actions can be submitted (scan, copy, email, ...) via action
scripts. The function knob values are passed to the action-scripts as
well. Scan actions are also signaled via dbus. This can be useful for
foreign applications. Scans can also be triggered via dbus or signals
from foreign applications.
On platforms which support signaling of dynamic device insertion /
removal (using e.g. libudev, dbus, hal) scanbd supports this as well.
scanbd can use all sane-backends or some special backends from the (old)
scanbuttond project.
Supported platforms: Linux (x86/ARM), FreeBSD, NetBSD, OpenBSD
]


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] Scanner Button Daemon [scanbd]: New release 1.4.6

2017-03-31 Thread Wilhelm
Hi all,

I like to announce the new version 1.4.6 of scanbd, the scanner button
daemon.

This release (hopefully) fixes two long standing bugs:

- occasional SEGV when inserting/removing USB devices
- wrong uid/gid for scan-scripts

Feel free to get it via

https://sourceforge.net/projects/scanbd/files/releases/scanbd-1.4.6.tgz/download

or

svn co https://scanbd.svn.sourceforge.net/svnroot/scanbd/releases/1.4.6

[
scanbd is a scanner button daemon. It polls the scanner buttons looking
for buttons pressed or function knob changes or other scanner events  as
paper inserts / removals and at the same time (!) allows
also scan-applications to access the scanners, locally or remote via
network. If buttons are pressed or other scanner events take place,
various actions can be submitted (scan, copy, email, ...) via action
scripts. The function knob values are passed to the action-scripts as
well. Scan actions are also signaled via dbus. This can be useful for
foreign applications. Scans can also be triggered via dbus or signals
from foreign applications.
On platforms which support signaling of dynamic device insertion /
removal (using e.g. libudev, dbus, hal) scanbd supports this as well.
scanbd can use all sane-backends or some special backends from the (old)
scanbuttond project.
Supported platforms: Linux (x86/ARM), FreeBSD, NetBSD, OpenBSD
]


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] [Scanbd] Set up for Canon PIXMA multifunction scanner - no button response

2016-10-13 Thread Wilhelm
Oh, mixed the values ...

 action btest {
 filter = "^button.*"
 numerical-trigger {
 from-value = 0
 to-value   = 1
 }
 desc   = "Scan to file"
 script = "test.script"
 }


Am 13.10.2016 um 11:16 schrieb Wilhelm:
> Matt, you need something like this in your config:
> 
> action btest {
> filter = "^button.*"
> numerical-trigger {
> from-value = 1
> to-value   = 0
> }
> desc   = "Scan to file"
> script = "test.script"
>     }
> 
> --
>  Wilhelm
> 
> Am 13.10.2016 um 09:09 schrieb matt clark:
>> Thanks Wilhelm.  I had changed that while trying to debug the problem,
>> not sure why this would be a problem.  Have reverted to the
>> scanbd.conf from source, with modifications to sane.d directory and
>> comment out the unnecessary manufacturer scanner.d profiles.  revised
>> config is attached - apologies for the length of code.
>>
>> ---
>>
>> /*
>>  * $Id: scanbd.conf 213 2015-10-05 06:52:50Z wimalopaan $
>>  *
>>  *  scanbd - KMUX scanner button daemon
>>  *
>>  *  Copyright (C) 2008 - 2015  Wilhelm Meier (wilhelm.me...@fh-kl.de)
>>  *
>>  *  This program is free software; you can redistribute it and/or modify
>>  *  it under the terms of the GNU General Public License as published by
>>  *  the Free Software Foundation; either version 2 of the License, or
>>  *  (at your option) any later version.
>>  *
>>  *  This program is distributed in the hope that it will be useful,
>>  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
>>  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>>  *  GNU General Public License for more details.
>>  *
>>  *  You should have received a copy of the GNU General Public License
>>  *  along with this program; if not, write to the Free Software
>>  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
>> 02110-1301, USA.
>>  */
>>
>>
>> # global settings
>> global {
>> # turn on debugging
>>
>> # log to console
>> debug   = true
>>
>> # debug logging
>> # 1=error, 2=warn, 3=info, 4-7=debug
>> debug-level = 7
>>
>> # drop priviliges to this user
>> #=
>> # Linux (most distributions use the saned user):
>> # user= saned
>> # ArchLinux (ArchLinux doesn't have saned user)
>> # user= daemon
>> # *BSD
>> # user= root
>> user= saned
>>
>> # Group to be used
>> #=
>> # Linux (most distributions use the lp group to access scanners)
>> # group   = lp
>> # ArchLinux (ArchLinux uses the scanner group)
>> # group = scanner
>> #
>> # *BSD (no group lp here, use daemon instead)
>> # group   = daemon # root
>> #
>> group   = lp
>>
>> # the saned executable for manager-mode
>> saned   = "/usr/sbin/saned"
>> saned_opt  = {} # string-list
>> saned_env  = { "SANE_CONFIG_DIR=/etc/scanbd/sane.d" } # list of
>> environment vars for saned
>>
>> # Scriptdir specifies where scanbd normally looks for scripts.
>> # The scriptdir option can be defined as:
>> #   - a path relative to the configuations (/etc/scanbd) 
>> directory
>> #   - an abosolute path
>> # Examples:
>> # scriptdir = scripts
>> # sets scriptdir to /etc/scanbd/scripts.
>> # scriptdir = /some/path
>> # sets scriptdir to the specified absolute path
>> # Default scriptdir is /etc/scanbd, this is normally 
>> appropriate
>> scriptdir = /etc/scanbd/scripts
>>
>> # Scripts to execute upon device insertion/removal.
>> # It can be necessary to load firmware into the device when it is 
>> first
>> # inserted. For example, scanbuttond backend does not know how to 
>> load
>> # scanner firmware, and it can be rectified by making a custom 
>> script.
>> # A simple command like "scanimage -L" in an example insert.script
>> # invok

Re: [sane-devel] [Scanbd] Set up for Canon PIXMA multifunction scanner - no button response

2016-10-13 Thread Wilhelm
Matt, you need something like this in your config:

action btest {
filter = "^button.*"
numerical-trigger {
from-value = 1
to-value   = 0
}
desc   = "Scan to file"
script = "test.script"
}

--
 Wilhelm

Am 13.10.2016 um 09:09 schrieb matt clark:
> Thanks Wilhelm.  I had changed that while trying to debug the problem,
> not sure why this would be a problem.  Have reverted to the
> scanbd.conf from source, with modifications to sane.d directory and
> comment out the unnecessary manufacturer scanner.d profiles.  revised
> config is attached - apologies for the length of code.
> 
> ---
> 
> /*
>  * $Id: scanbd.conf 213 2015-10-05 06:52:50Z wimalopaan $
>  *
>  *  scanbd - KMUX scanner button daemon
>  *
>  *  Copyright (C) 2008 - 2015  Wilhelm Meier (wilhelm.me...@fh-kl.de)
>  *
>  *  This program is free software; you can redistribute it and/or modify
>  *  it under the terms of the GNU General Public License as published by
>  *  the Free Software Foundation; either version 2 of the License, or
>  *  (at your option) any later version.
>  *
>  *  This program is distributed in the hope that it will be useful,
>  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
>  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>  *  GNU General Public License for more details.
>  *
>  *  You should have received a copy of the GNU General Public License
>  *  along with this program; if not, write to the Free Software
>  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301, USA.
>  */
> 
> 
> # global settings
> global {
> # turn on debugging
> 
> # log to console
> debug   = true
> 
> # debug logging
> # 1=error, 2=warn, 3=info, 4-7=debug
> debug-level = 7
> 
> # drop priviliges to this user
> #=
> # Linux (most distributions use the saned user):
> # user= saned
> # ArchLinux (ArchLinux doesn't have saned user)
> # user= daemon
> # *BSD
> # user= root
> user= saned
> 
> # Group to be used
> #=
> # Linux (most distributions use the lp group to access scanners)
> # group   = lp
> # ArchLinux (ArchLinux uses the scanner group)
> # group = scanner
> #
> # *BSD (no group lp here, use daemon instead)
> # group   = daemon # root
> #
> group   = lp
> 
> # the saned executable for manager-mode
> saned   = "/usr/sbin/saned"
> saned_opt  = {} # string-list
> saned_env  = { "SANE_CONFIG_DIR=/etc/scanbd/sane.d" } # list of
> environment vars for saned
> 
> # Scriptdir specifies where scanbd normally looks for scripts.
> # The scriptdir option can be defined as:
> #   - a path relative to the configuations (/etc/scanbd) 
> directory
> #   - an abosolute path
> # Examples:
> # scriptdir = scripts
> # sets scriptdir to /etc/scanbd/scripts.
> # scriptdir = /some/path
> # sets scriptdir to the specified absolute path
> # Default scriptdir is /etc/scanbd, this is normally appropriate
> scriptdir = /etc/scanbd/scripts
> 
> # Scripts to execute upon device insertion/removal.
> # It can be necessary to load firmware into the device when it is 
> first
> # inserted. For example, scanbuttond backend does not know how to load
> # scanner firmware, and it can be rectified by making a custom script.
> # A simple command like "scanimage -L" in an example insert.script
> # invokes saned and it loads the appropriate firmware if necessary.
> # These scripts receive environmental variables named in the
> "environment" subsection:
> # SCANBD_DEVICE - device name (fixed string "dbus device" for
> dbus notification)
> # SCANBD_ACTION - "insert" or "remove", so one script can be used.
> # device_insert_script = "insert.script"
> # device_remove_script =
> 
> # scanbuttond_backends_dir sets the path where scanbd looks
> for the scanbuttond backends
> # It can be defined as relative path, starting from the scanbd config
> directory or
> # as an absolute path
> # Default is /scanbd/scanbutond/backends
> # Example
> # scanbuttond_backends_dir

Re: [sane-devel] [Scanbd] Set up for Canon PIXMA multifunction scanner - no button response

2016-10-12 Thread Wilhelm
Please post your config-file!


Am 12.10.2016 um 14:13 schrieb Matt:
> 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.
> 
> 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:
> 
> - Have installed sane-backends-devel via dnf, and scanbd 1.4.4 from source
> (using default configure / gmake approach, no options).
> - Copied the /etc/sane.d/* files to /usr/local/etc/scanbd/sane.d/
> - 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.
> - Changed /etc/sane.d/saned.conf to only allow localhost
> - Changed /usr/local/etc/scanbd/sane.d/saned.conf to allow all local network
> clients
> - Changed /etc/sane.d/net.conf to have 2 lines, connect_timeout = 3 and
> localhost
> - Changed /etc/sane.d/dll.conf to have only net
> - Changed /etc/local/etc/scanbd/sane.d/dll.conf to comment out net, and
> remove the unnecessary references (just kept pixma)
> - Saved scanbd_dbus to /etc/dbus-1/system.d/scandb_dbus.conf
> - Create systemd files /usr/lib/systemd/system/scanbd.service and
> scanbm.socket.  Only change is to add the revised sane.d config directory.
> 
> scanbd.service:
> 
> 
> My scanbd.conf file is default, with some minor amendments:
> - changed the location of the sane.d configs:
> 
> - commented out unused scanner.d device references at the end apart from the
> pixma one.
> - changed the globaltest to refer to button-1 for testing purposes, but it
> didn't seem to do anything:
> 
> - I also changed a few other actions (mostly commenting them out) but didn't
> make any difference to the output.
> 
> 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.
> 
> Outputs:
> Test printer exists and is connected:
> 
> 
> Test scanimage can find printer:
> 
> 
> Scanimage can also send test greyscale.tiff to the network drive.
> 
> sane-find-scanner also finds the scanner, albeit only if signed in as root.
> 
> 
> I've saved the log from scanbd to pastebin because it's huge. 
> http://pastebin.com/T6RHVsdV
> 
> 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.
> 
> Has anyone got any thoughts on how I could get this working?
> 
> 
> 
> --
> View this message in context: 
> http://sane.10972.n7.nabble.com/Scanbd-Set-up-for-Canon-PIXMA-multifunction-scanner-no-button-response-tp20701.html
> Sent from the SANE - Dev mailing list archive at Nabble.com.
> 


-- 
Wilhelm


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] [scanbd] using scanbd and saned over network at the same time

2016-02-19 Thread Wilhelm
Hi Rolf,

your description looks reasonable.

Please ensure that scanbd (or systemd) really listens on port 6566:

[lmeier:/home/lmeier] $ sudo netstat -ltnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address
State   PID/Program name
tcp0  0 0.0.0.0:79  0.0.0.0:*
LISTEN  1/init
tcp0  0 0.0.0.0:80  0.0.0.0:*
LISTEN  1119/httpd
tcp0  0 0.0.0.0:22  0.0.0.0:*
LISTEN  1120/sshd
tcp0  0 0.0.0.0:631 0.0.0.0:*
LISTEN  472/cupsd
tcp0  0 0.0.0.0:65660.0.0.0:*
LISTEN  1/init
tcp0  0 0.0.0.0:90000.0.0.0:*
LISTEN  1139/nginx: master

If thats ok check your scanimage:

[lmeier:/home/lmeier] $ strace scanimage -L 2>&1 | grep dll.conf
open("./dll.conf", O_RDONLY)= -1 ENOENT (No such file or
directory)
open("/usr/local/etc/sane.d/dll.conf", O_RDONLY) = 4

Also you should check if the port is reachable or if some portfilter
sits there in between:

[lmeier:/home/lmeier] $ telnet localhost 6566
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Please report your results.

Am 19.02.2016 um 17:29 schrieb Rolf Leggewie:
> Hello Wilhelm,
> 
> thank you for the quick response.
> 
> On 19.02.2016 22:52, Wilhelm wrote:
>> Am 19.02.2016 um 14:38 schrieb Rolf Leggewie:
>>> Hello,
>>>
>>> I'd like to know if it is possible to have a computer that does
>>> button-triggered scanning via scanbd but also exports the scanner over
>>> the network to be accesible via the common. How would one do that?
>>
>> Well, absolutely: thats the whole story of scanbd (see the readme.txt of
>> scanbd).
> 
> Well, I am aware of the general idea how saned and scanbd are supposed
> to interact.  It can be pretty complicated to configure this error-free.
>  Going from one machine back to a real network adds yet another layer of
> complexity (and I was bitching when getting saned over network to run
> for the first and a couple subsequent times).
> 
> As you probably know, I added a couple of checks for common
> configuration errors to the Debian scanbd startup script.  Anything
> detected by
> http://anonscm.debian.org/cgit/collab-maint/scanbd.git/tree/debian/scanbd.init
> is OK on my scanbd server machine.  Button presses are detected fine by
> scanbd.  But with this configuration, the scanner will only be detected
> by sane-find-scanner and not be "scanimage -L".
> 
> $ sane-find-scanner | grep ^found
> found USB scanner (vendor=0x04a9 [Canon], product=0x2213 [CanoScan]) at
> libusb:001:035
> 
> Should this really be libusb?
> 
> Only if I add the genesys backend to /etc/sane.d/dll.conf, shut down
> scanbd and start up saned do I get an output from "scanimage -L".
> 
> $ scanimage -L
> device `genesys:libusb:001:035' is a Canon LiDE 35/40/50 flatbed scanner
> 
> That's when I also get a response from a network-connected client.
> 
> $ scanimage -L
> device `net:himbeere.local:genesys:libusb:001:035' is a Canon LiDE
> 35/40/50 flatbed scanner
> 
> So, what am I likely doing wrong here? Any idea?
> 
> When scanbd is running (and thus scanimage is broken locally as well as
> over the network), the following is the status:
> - scanbd service is running
> - saned service is stopped
> - /etc/sane.d/dll.conf contains only the net backend
> - /etc/scanbd/dll.conf does NOT contain the net backend
> - /etc/scanbd/dll.conf contains the necessary genesys backend
>   (and a few others)
> 
> Regards
> 
> Rolf
> 
> 


-- 
Wilhelm


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] [scanbd] using scanbd and saned over network at the same time

2016-02-19 Thread Wilhelm
Am 19.02.2016 um 14:38 schrieb Rolf Leggewie:
> Hello,
> 
> I'd like to know if it is possible to have a computer that does
> button-triggered scanning via scanbd but also exports the scanner over
> the network to be accesible via the common. How would one do that?

Well, absolutely: thats the whole story of scanbd (see the readme.txt of
scanbd). With scanbd all scan-request must be via network, even local
applications must use network-scanning instead of local (via usb) access
to the scanner.

>From ReadMe.txt:

0.1) the solution

scanbd (the scanner button daemon) opens and polls the scanner and
therefore
locks the device. So no other application can access the device directly
(open
the /dev/..., or via libusb, etc).

To solve this, we use a second daemon (in the so called "manager-mode" of
scanbd): scanbm is configured as a "proxy" to access the scanner and, if
another
application tries to use the scanner, the polling daemon is ordered to
disable
polling for the time the other scan-application wants to use the scanner.

To make this happen, scanbm is configured instead of saned as the network
scanning daemon. If a scan request arrives to scanbm on the sane-port,
scanbm
stops the polling by sending a dbus-signal (default) or a posix-signal
(SIGUSR1)
(signal-mode) to the polling scanbd-daemon. Then it starts the real
saned which
scans and sends the data back to the requesting application. Afterwards the
scanbd-manager scanbm restarts the polling by sending another
dbus-signal (or the
posix-signal SIGUSR2) to scanbd. scanbd now reenables polling of the
devices.

Scanbm is actually only a symbolic link to scanbd. Manager mode can be
activatied by calling scanbd as scanbm OR as scanbd -m as in previous
version
of scanbd.

So all applications must be enabled to use network-scanning (even if the
scanner is local, see below)!

Hth
-- 
Wilhelm


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] Scanner Button Daemon [scanbd]: New release 1.4.4

2015-10-05 Thread Wilhelm
Hi all,

I like to announce the new version 1.4.4 of scanbd, the scanner button
daemon.

This release fixes some minor quirks including user supplied patches.

Feel free to get it via

http://sourceforge.net/projects/scanbd/files/releases/scanbd-1.4.4.tgz/download

or

svn co https://scanbd.svn.sourceforge.net/svnroot/scanbd/releases/1.4.4

[
scanbd is a scanner button daemon. It polls the scanner buttons looking
for buttons pressed or function knob changes or other scanner events  as
paper inserts / removals and at the same time (!) allows
also scan-applications to access the scanners, locally or remote via
network. If buttons are pressed or other scanner events take place,
various actions can be submitted (scan, copy, email, ...) via action
scripts. The function knob values are passed to the action-scripts as
well. Scan actions are also signaled via dbus. This can be useful for
foreign applications. Scans can also be triggered via dbus or signals
from foreign applications.
On platforms which support signaling of dynamic device insertion /
removal (using e.g. libudev, dbus, hal) scanbd supports this as well.
scanbd can use all sane-backends or some special backends from the (old)
scanbuttond project.
Supported platforms: Linux (x86/ARM), FreeBSD, NetBSD, OpenBSD
]

-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] No scanner found with Scanimage -L

2015-07-12 Thread Wilhelm
Am 12.07.2015 um 17:23 schrieb ylafont:
 I added -7 for log and as soon as that was done i lost the net backend upon
 reboot. here are the logs
 
 NEt backend working (no -7)
 https://www.dropbox.com/s/vnvvblkd9ue7sb2/syslog-net.log?dl=0
 
 net backend missing. (with -7)
 https://www.dropbox.com/s/e9ibafveiiumdzx/syslog-nonet.log?dl=0

Well I don't see any issues here in both cases.

Please do the following test:

1) start scanbd so that the scanner is found
2) remove scanner
3) scanimage -L should be empty
4) insert scanner
5) scanimage -L should find the scanner again

-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] No scanner found with Scanimage -L

2015-07-11 Thread Wilhelm
Am 11.07.2015 um 13:43 schrieb ylafont:
 i have so time to play with this today,  also Scandb has always started with
 both configuration with the init script and in /etc/rc.local  the issue was
 that the NEt interface would disappear when starting with the init script. 
 
 Do you want to send you both logs? one starting with the init method and
 starting in he /etc/rc.loca method? just want to confirm. thanks.

One starting when it finds the net-device and one when the net-device
isn't found.

-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] No scanner found with Scanimage -L

2015-07-07 Thread Wilhelm
The configuration looks good.

Please send me

1) the log file (with scanbd debug level=7) if started at a service at boot

2) the log file (with scanbd debug level=7) if started later

I assume that for some reason the scanner isn't present at boot time and
the appropriate event when it is later found isn't send or captured.

Please do the following test:

1) start scanbd so that the scanner is found
2) remove scanner
3) scanimage -L should be empty
4) insert scanner
5) scanimage -L should find the scanner again



Am 07.07.2015 um 23:07 schrieb ylafont:
 Here is the current config.  let me know if i missed a file. I believe it is
 scanbd 1.4.2
 
 */etc/sane.d/sane.conf*
 #scan-client.somedomain.firm
 #192.168.0.1
 #192.168.0.1/29
 #[2001:7a8:185e::42:12]
 #[2001:7a8:185e::42:12]/64
 192.168.1.0/24
 
 */etc/sane.d/net.config*
 # This is the net backend config file.
 
 ## net backend options
 # Timeout for the initial connection to saned. This will prevent the backend
 # from blocking for several minutes trying to connect to an unresponsive
 # saned host (network outage, host down, ...). Value in seconds.
 # connect_timeout = 60
 connect_timeout = 3
 
 ## saned hosts
 # Each line names a host to attach to.
 # If you list localhost then your backends can be accessed either
 # directly or through the net backend.  Going through the net backend
 # may be necessary to access devices that need special privileges.
 #localhost
 localhost
 
 */etc/sane.d/dll.conf*
 net
 /etc/default/saned
 # Defaults for the saned initscript, from sane-utils
 # Set to yes to start saned
 RUN=no
 
 # Set to the user saned should run as
 RUN_AS_USER=saned
 
 */etc/xinetd.d/sane-port*
 service saned 
 {
   port = 6566
   socket_type = stream
   #server = /usr/sbin/saned
   #server = /usr/local/sbin/scanbm -c /usr/local/etc/scanbd/scanbd.conf
   server = /usr/local/sbin/scanbm
   server_args = scanbm -c /usr/local/etc/scanbd/scanbd.conf
   protocol = tcp
   user = saned
   group = scanner
   wait = no
   disable = no
 }
 
 
 */usr/local/etc/sane.d/dll.conf*
 Fujitsu
 
 */usr/local/etc/sane.d/net.conf*
 File is empty
 
 
 
 
 --
 View this message in context: 
 http://sane.10972.n7.nabble.com/weird-No-scanner-found-with-Scanimage-L-tp19894p19905.html
 Sent from the SANE - Dev mailing list archive at Nabble.com.
 


-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] No scanner found with Scanimage -L

2015-07-06 Thread Wilhelm
Am 07.07.2015 um 01:41 schrieb ylafont:
 I will have to spend more time with this
 
 I disabled the init.d script 
 
 *sudo service scanbd stop
 sudo update-rc.d. scanbd remove*
 
 rebooted 
 
 started the service manually
 
 *sudo service scanbd start *
 
 and the NET backend  remained. 

It would be helpfull if you post your configuration (sane and scanbd) as
well as the version and the system you are using.

 
 again, when scanbd starts automatically via the init.d the NET backend for
 some reasons disappears.
 
 
 for now i placed   sudo  service scanbd start in /etc/rc.local  and solved
 my problem.  Will try the upstart jobs when i am able.
 
 
 
 
 --
 View this message in context: 
 http://sane.10972.n7.nabble.com/weird-No-scanner-found-with-Scanimage-L-tp19894p19903.html
 Sent from the SANE - Dev mailing list archive at Nabble.com.
 


-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] No scanner found with Scanimage -L

2015-07-05 Thread Wilhelm
Am 05.07.2015 um 03:32 schrieb ylafont:
 I have a weird problem, weird to me at least.
 
 I have sane and scandb installed and setup with one issue. when I enable
 scandb with 
 sudo update-rc.d scanbd enable  and reboot scanbd startd properly and my
 scripts work without any issues. 
 
 for some reason, i loose the net device that was available when scanbd was
 not auto starting. 
 
 pi@PiScanner ~ $ scanimage -L
 device `net:localhost:fujitsu:fi-4220C2dj:100742' is a FUJITSU fi-4220C2dj
 scanner
 
 
 Did i miss  or mis-configured something?

Looks like a misconfiguration.

Since scanbd acts like a proxy, no devices should be available if scanbd
isn't running.


-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] No scanner found with Scanimage -L

2015-07-05 Thread Wilhelm
scanbd grabs all devices it finds.

all user-level programms (e.g. scanimage) should use only the
net-backend with the host configured the scanbd is running on (in most
cases localhost but can be remote).

scanbd should use a configuration to reach the real scanners (local
connected or reachable over net).


Am 05.07.2015 um 14:34 schrieb ylafont:
 understood, but what can  be reason for the NET device not to be found when
 the scandb is running?
 
 thanks Wilhelm. 
 
 
 
 --
 View this message in context: 
 http://sane.10972.n7.nabble.com/weird-No-scanner-found-with-Scanimage-L-tp19894p19896.html
 Sent from the SANE - Dev mailing list archive at Nabble.com.
 


-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LIDE 110 + USB3

2015-06-26 Thread Wilhelm
Hi all,

Am 26.06.2015 um 08:29 schrieb Heinz Wiesinger:
 On Friday 19 June 2015 15:57:03 Marc Cousin wrote:
 On Thursday 30 April 2015 13:15:17 Marc Cousin wrote:
 On 18/04/2015 18:46, Marc Cousin wrote:
 On 18/04/2015 18:27, Marc Cousin wrote:
 On 18/04/2015 12:35, Heinz Wiesinger wrote:
 On Saturday 18 April 2015 10:58:31 Marc Cousin wrote:
 Hi,

 I've got a brand new computer with USB3 all over the place, and
 cannot
 use my old LIDE 110 with it, even with a git version. The scanner
 is
 still working, as it works when connecter to my older laptop, through
 USB2. It doesn't work with a git checkout from a few minutes ago.

 I see that some drivers have received some patches to work around
 problems with USB 3. Is there something to be done to the genesys
 driver
 too ? What can I provide to help solving this ?

 Hi,

 I have the same problem with the LIDE 210. In a message from last
 month, Stef
 asked for usbpcap log from windows (see
 http://lists.alioth.debian.org/pipermail/sane-devel/2015-March/033202.
 ht
 ml

   for details). Unfortunately I don't have access to a Windows

 computer having
 USB3 ports. So if you have and you could provide those logs, it might
 help in
 figuring out what's going wrong.

 Grs,
 Heinz

 I have no windows installed. I have one in a KVM box, should I give it
 a
 try ?

 I gave it a try, in the KVM windows, scanning works. It is seen as USB2
 from windows though, I don't know if this is of any importance.

 So,

 Is this dump (from a virtulized windows seeing USB2) interesting ?

 Regards

 Hi,

 I'm back on this, after a while away from home. Is there anything I can
 provide ?

 To sum up:

 - The LIDE110 doesn't work from SANE (git checkout from 10 minutes ago) +
 Linux (4.0.5): I only have problem with the scanner. Any other periphal I
 plugged in worked ok (mouse, usb card reader, usb disk drive, keyboard)…
 - It works in Win7, virtualized in KVM, using the exact same USB3 port (seen
 as USB2 from Windows)
 - It almost works when all debug traces are activated in SANE (it fails much
 later)

 I am willing to capture anything you want, just tell me (and give me
 pointers to how to do the requested captures). I could even (but as a last
 resort, as I don't have space for it right now) install a Win7 on this
 machine.
 
 Hi!
 
 I'm CC'ing Stef on this since he is the dev who originally asked me for the 
 usbpcap logs.
 
 But what I think is, that if windows only sees the connection as USB2, it 
 won't be much help in fixing the USB3 issues.
 

I use a Canon LIDE 110 since two years on a Lenovo X230 (USB3) with
Arch-Linux and I never had any problems with it. May its related to a
Host-HW + kernel issue?


-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] Scanner Button Daemon [scanbd]: release 1.4.3

2015-06-09 Thread Wilhelm
Hi all,

I like to announce the new version 1.4.3 of scanbd, the scanner button
daemon.

This release fixes an important bug using more than one scanner a the
same time.

Feel free to get it via

http://sourceforge.net/projects/scanbd/files/releases/scanbd-1.4.3.tgz/download

or

svn co https://scanbd.svn.sourceforge.net/svnroot/scanbd/releases/1.4.3

[
scanbd is a scanner button daemon. It polls the scanner buttons looking
for buttons pressed or function knob changes or other scanner events  as
paper inserts / removals and at the same time (!) allows
also scan-applications to access the scanners, locally or remote via
network. If buttons are pressed or other scanner events take place,
various actions can be submitted (scan, copy, email, ...) via action
scripts. The function knob values are passed to the action-scripts as
well. Scan actions are also signaled via dbus. This can be useful for
foreign applications. Scans can also be triggered via dbus or signals
from foreign applications.
On platforms which support signaling of dynamic device insertion /
removal (using e.g. libudev, dbus, hal) scanbd supports this as well.
scanbd can use all sane-backends or some special backends from the (old)
scanbuttond project.
Supported platforms: Linux (x86/ARM), FreeBSD, NetBSD, OpenBSD
]

-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Scanbd fails to start with multiple scanners (and no paper loaded)

2015-06-03 Thread Wilhelm
Well, looks like an embarrassing (and weird) error: could you please try
the trunk version of scanbd now?

Am 03.06.2015 um 16:18 schrieb Greg Kontos:
 Thank you, Wilhelm.  I appreciate you looking into this issue.  I tried 
 commenting out the paperload and paperunload actions, which still led to the 
 same behavior where the process dies on startup.  I went an extra step and 
 also commented out the entire scanner specific fujitsu conf file within the 
 main scanbd.conf file.  Unfortunately, I still see the same behavior on 
 startup.
 
 :) I'm pretty lucky to have multiple scanners to test with.  If there are 
 tests you would like me to run, just shout.
 
 Thanks again,
 Greg
 
 
 
 
 
 Greg Kontos
 LIMS Integration Specialist
 
 Innovative Diagnostic Laboratory
 8751 Park Central Drive, Suite 200
 Richmond, VA 23227
 Phone: (804) 261-3340 ext.1846
 Cell Phone:
 Fax: (804) 515-7291
 mailto:gkon...@myinnovativelab.com
 
 Visit our website: http://www.myinnovativelab.com
 
 CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files or 
 previous e-mail messages attached to it contain confidential and/or 
 privileged information meant for the listed recipient(s) only. You may not 
 distribute or share this correspondence without written authorization from 
 the above author.
 
 If you are not the intended recipient, or a person responsible for delivering 
 it to the intended recipient, you are hereby notified that any disclosure, 
 copying, distribution or use of any of the information contained in or 
 attached to this transmission is STRICTLY PROHIBITED. If you have received 
 this transmission in error, please immediately notify me by reply e-mail and 
 destroy the original transmission and its attachments without saving them in 
 any manner.
 
 -Original Message-
 From: Wilhelm [mailto:wilhelm.me...@fh-kl.de]
 Sent: Wednesday, June 03, 2015 1:38 AM
 To: Greg Kontos; sane-devel@lists.alioth.debian.org
 Subject: Re: [sane-devel] Scanbd fails to start with multiple scanners (and 
 no paper loaded)
 
 Hi Greg,
 
 do you need the paperload or paperunload action? If not, please remove 
 them from the config file, if yes, then give them a correct script name.
 
 With this changes, please give me the full startup log with debug level 7.
 
 Thanks,
  Wilhelm
 
 Am 02.06.2015 um 17:31 schrieb Wilhelm:
 Hi Greg,

 thank you for your patience!

 I have some ideas where to look for this type of error, but
 unfortunately not enough time to do so. And I don't have access to
 more than one scanner at the moment :-(

 But please stay tuned ...

 Thanks,
  Wilhelm


 Am 02.06.2015 um 14:35 schrieb Greg Kontos:
 Hi Wilhelm,

 I'm following up to see if you have any thoughts or advice regarding the 
 trouble with running multiple scanners?

 Thanks,
 Greg




 Greg Kontos
 LIMS Integration Specialist

 Innovative Diagnostic Laboratory
 8751 Park Central Drive, Suite 200
 Richmond, VA 23227
 Phone: (804) 261-3340 ext.1846
 Cell Phone:
 Fax: (804) 515-7291
 mailto:gkon...@myinnovativelab.com

 Visit our website: http://www.myinnovativelab.com

 CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files 
 or previous e-mail messages attached to it contain confidential and/or 
 privileged information meant for the listed recipient(s) only. You may not 
 distribute or share this correspondence without written authorization from 
 the above author.

 If you are not the intended recipient, or a person responsible for 
 delivering it to the intended recipient, you are hereby notified that any 
 disclosure, copying, distribution or use of any of the information 
 contained in or attached to this transmission is STRICTLY PROHIBITED. If 
 you have received this transmission in error, please immediately notify me 
 by reply e-mail and destroy the original transmission and its attachments 
 without saving them in any manner.

 -Original Message-
 From: Wilhelm [mailto:wilhelm.me...@fh-kl.de]
 Sent: Friday, May 22, 2015 12:15 AM
 To: Greg Kontos; sane-devel@lists.alioth.debian.org
 Subject: Re: [sane-devel] Scanbd fails to start with multiple
 scanners (and no paper loaded)

 Hi Greg,

 please post the scanbd.conf and all the included config files (e.g.
 fujitsu.conf, ...),


 Am 21.05.2015 um 15:59 schrieb Greg Kontos:
 Thank you, Wilhelm.

 The attached zip contains log files with debug level 7.  The file 
 syslog_20150521 shows the process exiting.  The file syslog_start_20150521 
 shows the process starting properly with paper loaded into the scanners.

 I have also included
 - the *.script files referenced in the scanbd.conf file.
 - scanbd is the config file from /etc/default/scanbd
 - scanbd.service is the systemctl file from
 /lib/systemd/system/scanbd.service

 Let me know if there are any more files or test cases that I can run to 
 help troubleshoot this issue.

 Regards,
 G Kontos




 Greg Kontos
 LIMS Integration Specialist

 Innovative Diagnostic Laboratory
 8751 Park

Re: [sane-devel] Scanbd fails to start with multiple scanners (and no paper loaded)

2015-06-02 Thread Wilhelm
Hi Greg,

do you need the paperload or paperunload action? If not, please
remove them from the config file, if yes, then give them a correct
script name.

With this changes, please give me the full startup log with debug level 7.

Thanks,
 Wilhelm

Am 02.06.2015 um 17:31 schrieb Wilhelm:
 Hi Greg,
 
 thank you for your patience!
 
 I have some ideas where to look for this type of error, but
 unfortunately not enough time to do so. And I don't have access to more
 than one scanner at the moment :-(
 
 But please stay tuned ...
 
 Thanks,
  Wilhelm
 
 
 Am 02.06.2015 um 14:35 schrieb Greg Kontos:
 Hi Wilhelm,

 I'm following up to see if you have any thoughts or advice regarding the 
 trouble with running multiple scanners?

 Thanks,
 Greg




 Greg Kontos
 LIMS Integration Specialist

 Innovative Diagnostic Laboratory
 8751 Park Central Drive, Suite 200
 Richmond, VA 23227
 Phone: (804) 261-3340 ext.1846
 Cell Phone:
 Fax: (804) 515-7291
 mailto:gkon...@myinnovativelab.com

 Visit our website: http://www.myinnovativelab.com

 CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files 
 or previous e-mail messages attached to it contain confidential and/or 
 privileged information meant for the listed recipient(s) only. You may not 
 distribute or share this correspondence without written authorization from 
 the above author.

 If you are not the intended recipient, or a person responsible for 
 delivering it to the intended recipient, you are hereby notified that any 
 disclosure, copying, distribution or use of any of the information contained 
 in or attached to this transmission is STRICTLY PROHIBITED. If you have 
 received this transmission in error, please immediately notify me by reply 
 e-mail and destroy the original transmission and its attachments without 
 saving them in any manner.

 -Original Message-
 From: Wilhelm [mailto:wilhelm.me...@fh-kl.de]
 Sent: Friday, May 22, 2015 12:15 AM
 To: Greg Kontos; sane-devel@lists.alioth.debian.org
 Subject: Re: [sane-devel] Scanbd fails to start with multiple scanners (and 
 no paper loaded)

 Hi Greg,

 please post the scanbd.conf and all the included config files (e.g.
 fujitsu.conf, ...),


 Am 21.05.2015 um 15:59 schrieb Greg Kontos:
 Thank you, Wilhelm.

 The attached zip contains log files with debug level 7.  The file 
 syslog_20150521 shows the process exiting.  The file syslog_start_20150521 
 shows the process starting properly with paper loaded into the scanners.

 I have also included
 - the *.script files referenced in the scanbd.conf file.
 - scanbd is the config file from /etc/default/scanbd
 - scanbd.service is the systemctl file from
 /lib/systemd/system/scanbd.service

 Let me know if there are any more files or test cases that I can run to 
 help troubleshoot this issue.

 Regards,
 G Kontos




 Greg Kontos
 LIMS Integration Specialist

 Innovative Diagnostic Laboratory
 8751 Park Central Drive, Suite 200
 Richmond, VA 23227
 Phone: (804) 261-3340 ext.1846
 Cell Phone:
 Fax: (804) 515-7291
 mailto:gkon...@myinnovativelab.com

 Visit our website: http://www.myinnovativelab.com

 CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files 
 or previous e-mail messages attached to it contain confidential and/or 
 privileged information meant for the listed recipient(s) only. You may not 
 distribute or share this correspondence without written authorization from 
 the above author.

 If you are not the intended recipient, or a person responsible for 
 delivering it to the intended recipient, you are hereby notified that any 
 disclosure, copying, distribution or use of any of the information 
 contained in or attached to this transmission is STRICTLY PROHIBITED. If 
 you have received this transmission in error, please immediately notify me 
 by reply e-mail and destroy the original transmission and its attachments 
 without saving them in any manner.

 -Original Message-
 From: Wilhelm [mailto:wilhelm.me...@fh-kl.de]
 Sent: Wednesday, May 20, 2015 5:24 PM
 To: Greg Kontos; sane-devel@lists.alioth.debian.org
 Subject: Re: [sane-devel] Scanbd fails to start with multiple scanners
 (and no paper loaded)

 Am 20.05.2015 um 21:24 schrieb Greg Kontos:
 Thank you, Wilhelm.  I appreciate you taking the time to look into this.

 I am using version 1.4.0-2 of scanbd.  This problem does not persist with 
 only one scanner.  It seems that the scanner will trigger the page-loaded 
 action after a scan is complete.  So the strange behavior of the scan 
 button happens in other situations.

 In the attached zip file please find the scanbd.conf and log files.  The 
 log file shows two startup sequences.  The first is without paper loaded 
 in the scanner.  The second has paper loaded on startup.

 Sorry, but I need all config files (also the included ones) and please 
 start with debug level = 7.


 Regards,
 G Kontos




 Greg Kontos
 LIMS Integration Specialist

 Innovative Diagnostic Laboratory
 8751

Re: [sane-devel] Scanbd fails to start with multiple scanners (and no paper loaded)

2015-06-02 Thread Wilhelm
Hi Greg,

thank you for your patience!

I have some ideas where to look for this type of error, but
unfortunately not enough time to do so. And I don't have access to more
than one scanner at the moment :-(

But please stay tuned ...

Thanks,
 Wilhelm


Am 02.06.2015 um 14:35 schrieb Greg Kontos:
 Hi Wilhelm,
 
 I'm following up to see if you have any thoughts or advice regarding the 
 trouble with running multiple scanners?
 
 Thanks,
 Greg
 
 
 
 
 Greg Kontos
 LIMS Integration Specialist
 
 Innovative Diagnostic Laboratory
 8751 Park Central Drive, Suite 200
 Richmond, VA 23227
 Phone: (804) 261-3340 ext.1846
 Cell Phone:
 Fax: (804) 515-7291
 mailto:gkon...@myinnovativelab.com
 
 Visit our website: http://www.myinnovativelab.com
 
 CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files or 
 previous e-mail messages attached to it contain confidential and/or 
 privileged information meant for the listed recipient(s) only. You may not 
 distribute or share this correspondence without written authorization from 
 the above author.
 
 If you are not the intended recipient, or a person responsible for delivering 
 it to the intended recipient, you are hereby notified that any disclosure, 
 copying, distribution or use of any of the information contained in or 
 attached to this transmission is STRICTLY PROHIBITED. If you have received 
 this transmission in error, please immediately notify me by reply e-mail and 
 destroy the original transmission and its attachments without saving them in 
 any manner.
 
 -Original Message-
 From: Wilhelm [mailto:wilhelm.me...@fh-kl.de]
 Sent: Friday, May 22, 2015 12:15 AM
 To: Greg Kontos; sane-devel@lists.alioth.debian.org
 Subject: Re: [sane-devel] Scanbd fails to start with multiple scanners (and 
 no paper loaded)
 
 Hi Greg,
 
 please post the scanbd.conf and all the included config files (e.g.
 fujitsu.conf, ...),
 
 
 Am 21.05.2015 um 15:59 schrieb Greg Kontos:
 Thank you, Wilhelm.

 The attached zip contains log files with debug level 7.  The file 
 syslog_20150521 shows the process exiting.  The file syslog_start_20150521 
 shows the process starting properly with paper loaded into the scanners.

 I have also included
 - the *.script files referenced in the scanbd.conf file.
 - scanbd is the config file from /etc/default/scanbd
 - scanbd.service is the systemctl file from
 /lib/systemd/system/scanbd.service

 Let me know if there are any more files or test cases that I can run to help 
 troubleshoot this issue.

 Regards,
 G Kontos




 Greg Kontos
 LIMS Integration Specialist

 Innovative Diagnostic Laboratory
 8751 Park Central Drive, Suite 200
 Richmond, VA 23227
 Phone: (804) 261-3340 ext.1846
 Cell Phone:
 Fax: (804) 515-7291
 mailto:gkon...@myinnovativelab.com

 Visit our website: http://www.myinnovativelab.com

 CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files 
 or previous e-mail messages attached to it contain confidential and/or 
 privileged information meant for the listed recipient(s) only. You may not 
 distribute or share this correspondence without written authorization from 
 the above author.

 If you are not the intended recipient, or a person responsible for 
 delivering it to the intended recipient, you are hereby notified that any 
 disclosure, copying, distribution or use of any of the information contained 
 in or attached to this transmission is STRICTLY PROHIBITED. If you have 
 received this transmission in error, please immediately notify me by reply 
 e-mail and destroy the original transmission and its attachments without 
 saving them in any manner.

 -Original Message-
 From: Wilhelm [mailto:wilhelm.me...@fh-kl.de]
 Sent: Wednesday, May 20, 2015 5:24 PM
 To: Greg Kontos; sane-devel@lists.alioth.debian.org
 Subject: Re: [sane-devel] Scanbd fails to start with multiple scanners
 (and no paper loaded)

 Am 20.05.2015 um 21:24 schrieb Greg Kontos:
 Thank you, Wilhelm.  I appreciate you taking the time to look into this.

 I am using version 1.4.0-2 of scanbd.  This problem does not persist with 
 only one scanner.  It seems that the scanner will trigger the page-loaded 
 action after a scan is complete.  So the strange behavior of the scan 
 button happens in other situations.

 In the attached zip file please find the scanbd.conf and log files.  The 
 log file shows two startup sequences.  The first is without paper loaded in 
 the scanner.  The second has paper loaded on startup.

 Sorry, but I need all config files (also the included ones) and please start 
 with debug level = 7.


 Regards,
 G Kontos




 Greg Kontos
 LIMS Integration Specialist

 Innovative Diagnostic Laboratory
 8751 Park Central Drive, Suite 200
 Richmond, VA 23227
 Phone: (804) 261-3340 ext.1846
 Cell Phone:
 Fax: (804) 515-7291
 mailto:gkon...@myinnovativelab.com

 Visit our website: http://www.myinnovativelab.com

 CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files

Re: [sane-devel] Scanbd fails to start with multiple scanners (and no paper loaded)

2015-05-21 Thread Wilhelm
Hi Greg,

please post the scanbd.conf and all the included config files (e.g.
fujitsu.conf, ...),


Am 21.05.2015 um 15:59 schrieb Greg Kontos:
 Thank you, Wilhelm.
 
 The attached zip contains log files with debug level 7.  The file 
 syslog_20150521 shows the process exiting.  The file syslog_start_20150521 
 shows the process starting properly with paper loaded into the scanners.
 
 I have also included
 - the *.script files referenced in the scanbd.conf file.
 - scanbd is the config file from /etc/default/scanbd
 - scanbd.service is the systemctl file from /lib/systemd/system/scanbd.service
 
 Let me know if there are any more files or test cases that I can run to help 
 troubleshoot this issue.
 
 Regards,
 G Kontos
 
 
 
 
 Greg Kontos
 LIMS Integration Specialist
 
 Innovative Diagnostic Laboratory
 8751 Park Central Drive, Suite 200
 Richmond, VA 23227
 Phone: (804) 261-3340 ext.1846
 Cell Phone:
 Fax: (804) 515-7291
 mailto:gkon...@myinnovativelab.com
 
 Visit our website: http://www.myinnovativelab.com
 
 CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files or 
 previous e-mail messages attached to it contain confidential and/or 
 privileged information meant for the listed recipient(s) only. You may not 
 distribute or share this correspondence without written authorization from 
 the above author.
 
 If you are not the intended recipient, or a person responsible for delivering 
 it to the intended recipient, you are hereby notified that any disclosure, 
 copying, distribution or use of any of the information contained in or 
 attached to this transmission is STRICTLY PROHIBITED. If you have received 
 this transmission in error, please immediately notify me by reply e-mail and 
 destroy the original transmission and its attachments without saving them in 
 any manner.
 
 -Original Message-
 From: Wilhelm [mailto:wilhelm.me...@fh-kl.de]
 Sent: Wednesday, May 20, 2015 5:24 PM
 To: Greg Kontos; sane-devel@lists.alioth.debian.org
 Subject: Re: [sane-devel] Scanbd fails to start with multiple scanners (and 
 no paper loaded)
 
 Am 20.05.2015 um 21:24 schrieb Greg Kontos:
 Thank you, Wilhelm.  I appreciate you taking the time to look into this.

 I am using version 1.4.0-2 of scanbd.  This problem does not persist with 
 only one scanner.  It seems that the scanner will trigger the page-loaded 
 action after a scan is complete.  So the strange behavior of the scan button 
 happens in other situations.

 In the attached zip file please find the scanbd.conf and log files.  The log 
 file shows two startup sequences.  The first is without paper loaded in the 
 scanner.  The second has paper loaded on startup.
 
 Sorry, but I need all config files (also the included ones) and please start 
 with debug level = 7.
 

 Regards,
 G Kontos




 Greg Kontos
 LIMS Integration Specialist

 Innovative Diagnostic Laboratory
 8751 Park Central Drive, Suite 200
 Richmond, VA 23227
 Phone: (804) 261-3340 ext.1846
 Cell Phone:
 Fax: (804) 515-7291
 mailto:gkon...@myinnovativelab.com

 Visit our website: http://www.myinnovativelab.com

 CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files 
 or previous e-mail messages attached to it contain confidential and/or 
 privileged information meant for the listed recipient(s) only. You may not 
 distribute or share this correspondence without written authorization from 
 the above author.

 If you are not the intended recipient, or a person responsible for 
 delivering it to the intended recipient, you are hereby notified that any 
 disclosure, copying, distribution or use of any of the information contained 
 in or attached to this transmission is STRICTLY PROHIBITED. If you have 
 received this transmission in error, please immediately notify me by reply 
 e-mail and destroy the original transmission and its attachments without 
 saving them in any manner.

 -Original Message-
 From: sane-devel
 [mailto:sane-devel-bounces+gkontos=myinnovativelab@lists.alioth.de
 bian.org] On Behalf Of Wilhelm
 Sent: Wednesday, May 20, 2015 11:55 AM
 To: sane-devel@lists.alioth.debian.org
 Subject: Re: [sane-devel] Scanbd fails to start with multiple scanners
 (and no paper loaded)

 Hi Greg,

 please

 1) post your scabd config files
 2) provide scanbd version information

 I see a page-load event with no script defined - looks strange.

 You said that there wasn't any paper load: so the page-load event get fired 
 without any paper load action? More strange.

 3) Can please give the full log from scanbd startup till crash.

 Does the problem remain with only one scanner?


 Am 20.05.2015 um 16:49 schrieb Greg Kontos:
 Hello,



 I’m running scanbd on a debian machine with version 1.0.25 of the
 sane-backend.  I installed scanbd using apt-get, sane-backend was
 compiled from a git clone.  I’m using two fujitsu fi-7160 scanners in
 my setup.  The problem: If there is no paper loaded in at least one
 scanner, scanbd.service

Re: [sane-devel] Scanbd fails to start with multiple scanners (and no paper loaded)

2015-05-20 Thread Wilhelm
 are not the intended recipient, or a person responsible for
 delivering it to the intended recipient, you are hereby notified that
 any disclosure, copying, distribution or use of any of the information
 contained in or attached to this transmission is STRICTLY PROHIBITED. If
 you have received this transmission in error, please immediately notify
 me by reply e-mail and destroy the original transmission and its
 attachments without saving them in any manner.
 
 
 
 
 


-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Scanbd fails to start with multiple scanners (and no paper loaded)

2015-05-20 Thread Wilhelm
Am 20.05.2015 um 21:24 schrieb Greg Kontos:
 Thank you, Wilhelm.  I appreciate you taking the time to look into this.
 
 I am using version 1.4.0-2 of scanbd.  This problem does not persist with 
 only one scanner.  It seems that the scanner will trigger the page-loaded 
 action after a scan is complete.  So the strange behavior of the scan button 
 happens in other situations.
 
 In the attached zip file please find the scanbd.conf and log files.  The log 
 file shows two startup sequences.  The first is without paper loaded in the 
 scanner.  The second has paper loaded on startup.

Sorry, but I need all config files (also the included ones) and please
start with debug level = 7.

 
 Regards,
 G Kontos
 
 
 
 
 Greg Kontos
 LIMS Integration Specialist
 
 Innovative Diagnostic Laboratory
 8751 Park Central Drive, Suite 200
 Richmond, VA 23227
 Phone: (804) 261-3340 ext.1846
 Cell Phone:
 Fax: (804) 515-7291
 mailto:gkon...@myinnovativelab.com
 
 Visit our website: http://www.myinnovativelab.com
 
 CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files or 
 previous e-mail messages attached to it contain confidential and/or 
 privileged information meant for the listed recipient(s) only. You may not 
 distribute or share this correspondence without written authorization from 
 the above author.
 
 If you are not the intended recipient, or a person responsible for delivering 
 it to the intended recipient, you are hereby notified that any disclosure, 
 copying, distribution or use of any of the information contained in or 
 attached to this transmission is STRICTLY PROHIBITED. If you have received 
 this transmission in error, please immediately notify me by reply e-mail and 
 destroy the original transmission and its attachments without saving them in 
 any manner.
 
 -Original Message-
 From: sane-devel 
 [mailto:sane-devel-bounces+gkontos=myinnovativelab@lists.alioth.debian.org]
  On Behalf Of Wilhelm
 Sent: Wednesday, May 20, 2015 11:55 AM
 To: sane-devel@lists.alioth.debian.org
 Subject: Re: [sane-devel] Scanbd fails to start with multiple scanners (and 
 no paper loaded)
 
 Hi Greg,
 
 please
 
 1) post your scabd config files
 2) provide scanbd version information
 
 I see a page-load event with no script defined - looks strange.
 
 You said that there wasn't any paper load: so the page-load event get fired 
 without any paper load action? More strange.
 
 3) Can please give the full log from scanbd startup till crash.
 
 Does the problem remain with only one scanner?
 
 
 Am 20.05.2015 um 16:49 schrieb Greg Kontos:
 Hello,



 I’m running scanbd on a debian machine with version 1.0.25 of the
 sane-backend.  I installed scanbd using apt-get, sane-backend was
 compiled from a git clone.  I’m using two fujitsu fi-7160 scanners in
 my setup.  The problem: If there is no paper loaded in at least one
 scanner, scanbd.service will exit the main process and abort.  This
 failure will at a variety of times depending on the circumstances.  It
 will happen during startup of the machine.  It will also happen after
 a few minutes after a scan process is complete.  This post-scan
 behavior is not 100% replicable.



 The following is /var/log/syslog after a system restart.  : (I can
 provide a more detailed log if that will be helpful)



 May 20 09:36:40 hp6300pro-23 systemd[1151]: Starting Paths.

 May 20 09:36:40 hp6300pro-23 systemd[1151]: Reached target Paths.

 May 20 09:36:40 hp6300pro-23 systemd[1151]: Starting Timers.

 May 20 09:36:40 hp6300pro-23 systemd[1151]: Reached target Timers.

 May 20 09:36:40 hp6300pro-23 systemd[1151]: Starting Sockets.

 May 20 09:36:40 hp6300pro-23 systemd[1151]: Reached target Sockets.

 May 20 09:36:40 hp6300pro-23 systemd[1151]: Starting Basic System.

 May 20 09:36:40 hp6300pro-23 systemd[1151]: Reached target Basic System.

 May 20 09:36:40 hp6300pro-23 systemd[1151]: Starting Default.

 May 20 09:36:40 hp6300pro-23 systemd[1151]: Reached target Default.

 May 20 09:36:40 hp6300pro-23 systemd[1151]: Startup finished in 4ms.

 May 20 09:37:06 hp6300pro-23 scanbd: /usr/sbin/scanbd: trigger action
 for page-loaded for device fujitsu:fi-7160:188290 with script (null)

 May 20 09:37:07 hp6300pro-23 scanbd: /usr/sbin/scanbd: trigger action
 for page-loaded for device fujitsu:fi-7160:187984 with script (null)

 May 20 09:40:13 hp6300pro-23 scanbd[542]: scanbd: sane.c:852: sane_poll:
 Assertion `st-triggered_option  st-num_of_options_with_scripts' failed.

 May 20 09:40:13 hp6300pro-23 scanbd[542]: /usr/sbin/scanbd: dbus match
 type='signal',interface='org.freedesktop.Hal.Manager'

 May 20 09:40:13 hp6300pro-23 scanbd[542]: /usr/sbin/scanbd: trigger
 action for page-loaded for device fujitsu:fi-7160:188290 with script
 (null)

 May 20 09:40:13 hp6300pro-23 scanbd[542]: /usr/sbin/scanbd: trigger
 action for page-loaded for device fujitsu:fi-7160:187984 with script
 (null)

 May 20 09:40:13 hp6300pro-23 scanbd[542]: /usr/sbin/scanbd: trigger

Re: [sane-devel] Raspbian Jessie - scanbd scripting issue

2015-04-01 Thread Wilhelm
Am 31.03.2015 um 18:26 schrieb RainerF:
 Wilhelm,
 
 I wasn't sure what you meant with
 
 Wilhelm Meier-2 wrote
 So please change the bool-expression in this if() to true and test,
 please.
 
 So I commented the outer if statement
 
 // if ((st-opts[si].from_value.num_value == st-opts[si].value.num_value) 
 //   (st-opts[si].to_value.num_value == value)) {
  slog(SLOG_DEBUG, value trigger: numerical);
  st-triggered = true;
  st-triggered_option = si;
  // we need to trigger all waiting threads
  if (pthread_cond_broadcast(st-cv)  0) {
  slog(SLOG_ERROR, pthread_cond_broadcats: this shouln't happen);
  }
 // }
 
 and recompiled. That's working now for all buttons.

Ok, thanks for testing!
I will make a new release in a few days.

 
 Thanks a lot for your efforts!
 
 Kind regards,
 Rainer
 
 View this message in context: Re: Raspbian Jessie - scanbd scripting
 issue
 http://sane.10972.n7.nabble.com/Raspbian-Jessie-scanbd-scripting-issue-tp19611p19625.html
 Sent from the SANE - Dev mailing list archive
 http://sane.10972.n7.nabble.com/SANE-Dev-f3.html at Nabble.com.
 
 


-- 
Wilhelm

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Raspbian Jessie - scanbd scripting issue

2015-03-31 Thread Wilhelm
Am 31.03.2015 um 15:43 schrieb RainerF:
 Wilhelm,
 
 thank you for taking the time to look into these issues. Following your
 advise I had a look into the source code and tried to understand, what
 happens in case, when e.g. button 3 is pressed and compared the logs
 with the information by pressing e.g. button 4 (log file excerpt - see
 below).
 
 The last common action for both button events is this logging information:
 
scanbd: button 4 has been pressed.
 
 respective
 
scanbd: button 3 has been pressed.
 
 The message has been generated in file scanbuttond_wrapper.c in line 519
 (source version 1.4.2). Next follows this if statement:

Ok, re-looking at these lines I would say its a bug!


As I said before with the scanbuttond-backends there is no change for
the button values from from_value to to_value. Its only pressed/not-pressed.

So please change the bool-expression in this if() to true
and test, please.

 if ((st-opts[si].from_value.num_value == st-opts[si].value.num_value) 
   (st-opts[si].to_value.num_value == value)) {
 slog(SLOG_DEBUG, value trigger: numerical);
 st-triggered = true;
 st-triggered_option = si;
 // we need to trigger all waiting threads
 if (pthread_cond_broadcast(st-cv)  0) {
 slog(SLOG_ERROR, pthread_cond_broadcats: this shouln't happen);
 }
 }
 
 Within the if statement the next logging message is generated and a new
 thread, where further action for script execution seems to be taken. The
 logging information is only printed for button 3! Obviously the if
 condition is false for button 4. I will try to debug this (I have no
 experience with debugging multi-threaded code), hoping to get closer to
 the problem, why no script is executed for button 1 and 4 - or do you
 already have an idea, what might be wrong?
 
 Kind regards,
 Rainer.
 
 
 syslog excerpt
 
 
   button 4 pressed
 
 scanbd: polling thread for Perfection 1670 cancellation point
 scanbd: polling device Perfection 1670
 scanbd:  button 4 pressed 
 scanbd: option: 1
 scanbd: scanbtnd_button_name (1)
 scanbd: scanbtnd_button_name, backend: Snapscan USB
 scanbd: checking option scan number 1 (0) for device Perfection 1670
 scanbd: option: 3
 scanbd: scanbtnd_button_name (3)
 scanbd: scanbtnd_button_name, backend: Snapscan USB
 scanbd: checking option email number 3 (1) for device Perfection 1670
 scanbd: option: 2
 scanbd: scanbtnd_button_name (2)
 scanbd: scanbtnd_button_name, backend: Snapscan USB
 scanbd: checking option copy number 2 (2) for device Perfection 1670
 scanbd: option: 4
 scanbd: scanbtnd_button_name (4)
 scanbd: scanbtnd_button_name, backend: Snapscan USB
 scanbd: checking option pdf number 4 (3) for device Perfection 1670
 scanbd: button 4 has been pressed.
 scanbd: Iteration on dbus call
 scanbd: polling thread for Perfection 1670 cancellation point
 scanbd: polling device Perfection 1670
 ...
 
 
   button 3 pressed
 
 scanbd: polling thread for Perfection 1670 cancellation point
 scanbd: polling device Perfection 1670
 scanbd:  button 3 pressed 
 scanbd: option: 1
 scanbd: scanbtnd_button_name (1)
 scanbd: scanbtnd_button_name, backend: Snapscan USB
 scanbd: checking option scan number 1 (0) for device Perfection 1670
 scanbd: option: 3
 scanbd: scanbtnd_button_name (3)
 scanbd: scanbtnd_button_name, backend: Snapscan USB
 scanbd: checking option email number 3 (1) for device Perfection 1670
 scanbd: button 3 has been pressed.
 scanbd: value trigger: numerical
 scanbd: trigger action for device Perfection 1670 with script scan.script
 scanbd: setting env: 
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
 scanbd: No PWD, setting env: PWD=/home/pi
 scanbd: setting env: USER=root
 scanbd: setting env: HOME=/root
 scanbd: setting env: SCANBD_DEVICE=snapscan:libusb:001:004
 scanbd: setting env: SCANBD_ACTION=email
 scanbd: append string Perfection 1670 to signal scan_begin
 scanbd: now sending signal scan_begin
 scanbd: Iteration on dbus call
 scanbd: append string 
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin to signal 
 trigger
 scanbd: append string PWD=/home/pi to signal trigger
 scanbd: append string USER=root to signal trigger
 scanbd: append string HOME=/root to signal trigger
 scanbd: append string SCANBD_DEVICE=snapscan:libusb:001:004 to signal trigger
 scanbd: append string SCANBD_ACTION=email to signal trigger
 scanbd: now sending signal trigger
 scanbd: now flushing the dbus
 scanbd: unref the signal
 scanbd: using relative script path: scan.script, expanded to: 
 /usr/local/etc/scanbd/scan.script
 scanbd: waiting for child: /usr/local/etc/scanbd/scan.script
 scanbd: exec for /usr/local/etc/scanbd/scan.script
 scanbd: Iteration on dbus call
 scanbd: Iteration on dbus call
 scanbd: Iteration on dbus call
 scanbd: Iteration on dbus call
 scanbd: Iteration on dbus call
 scanbd: Iteration on dbus call
 scanbd: Iteration on dbus call

Re: [sane-devel] Raspbian Jessie - scanbd scripting issue

2015-03-30 Thread Wilhelm
Am 30.03.2015 um 12:17 schrieb RainerF:
 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 source
 http://downloads.sourceforge.net/project/scanbd/releases/scanbd-1.4.2.tgz
 with the old scanbutton backends support. That's working, but there are
 two issues:
 
 
   1) only two buttons invoke script execution
 
 The scanner has four buttons, but currently scripts are only executed
 for button 2 (copy) and button 3 (email). 

Please try to hold down the button a little bit longer ...

 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.

The scanbuttond backend can only check for presses, not for specific
values. So, you shouldn't have to define a trigger-value-change.



 
 Might this be misconfigured?
 How can I check, which string has been send from the scanbuttond backend?

It must be in the logs (like the other button presses you receive ...).

 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.

The backend places names on the button mumers: you can change it if you
want to since you are compiling from source:

const char* scanbtnd_button_name(const backend_t* backend, unsigned int
button) {
slog(SLOG_INFO, scanbtnd_button_name (%d), button);
assert(backend);
const char* backend_name = backend-scanbtnd_get_backend_name();
assert(backend_name);
slog(SLOG_INFO, scanbtnd_button_name, backend: %s, backend_name);

if (strcmp(snapscan, backend_name)) {
assert(button = 5);
switch(button) {
case 0:
return NULL;
break;
case 1:
return scan; // web;
break;
case 2:
return copy; // email;
break;
case 3:
return email; // copy;
break;
case 4:
return pdf; // send;
break;
case 5:
return stop;
break;
default:
return NULL;
break;
}
}
return NULL;
}

But I would suggest to adapt the snapscan.conf.



 
 
   2) scanimage reports 'no scan device'
 
 When I execute
 
 scanimage -L  or
 sudo scanimage -L or
 SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d scanimage -L

Please read the ReadMe.txt: for the frontends don't use SANE_CONFIG_DIR,
thats only for saned.

Just use xsane or scanimage as usual, *but* adapt your
/etc/sane.d/dll.conf to include only the net-backend. And that must
point to the machine with scanbd/saned (e.g. localhost).

HTH,
 Wilhelm

 
 I always get the information that no scan device was found. I would have
 expected something like
 
 device `net:localhost:snapscan:libusb:001:004' is a EPSON …
 
 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.
 Am I wrong with this assumption?
 
 I attached my configuration and a part of the syslog file.
 
 Thanks in advance for any kind of assistance, which might help to solve
 the above mentined issues.
 
 Cheers, Rainer.
 
 ---
 
 
   configuration files
 
 
   /usr/local/etc/scanbd/scanbd.conf (only changes from default):
 
   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)
 
 
   sudo cp scanbd_dbus.conf /etc/dbus-1/system.d/
 
 this file is copied as is from the integration folder
 
 
   sudo nano /lib/systemd/system/scanbd.service (only changes from
   default):
 
   [Service]
   ExecStart=/usr/local/sbin/scanbd –f –c /usr/local/etc/scanbd/scanbd.conf
   Environment=SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d
 
 
   syslog (excerpt):
 
 ...
 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

Re: [sane-devel] Scanbm and xinetd.d

2015-03-20 Thread Wilhelm Meier
Please send the log file when scanbm is started via xinetd.

Am 18.03.2015 um 23:24 schrieb ylafont:
 I have been trying to duplicate my scandb setup without success.  No sure
 why, scanbm in not starting starting via xinetd which is the exact same file
 from the previous setup and everything is identical.  is this a rights
 issue?  the user is root, so  i am not sure if that is it.
 
 if i start  scanbd:
 /usr/local/sbin/scanbd -d7 -f -c /usr/local/etc/scanbd/scanbd.conf
 everything works.
 
 if start scanbm
 /usr/local/sbin/scanbm -d7 -f -c /usr/local/etc/scanbd/scanbd.conf
 
 i get the error below.
 
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: foreground
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: config-file:
 /usr/local/etc/scanbd/scanbd.conf
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: reading config
 file /usr/local/etc/scanbd/scanbd.conf
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: We are called
 as scanbm - setting manager-mode
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: debug on:
 level: 7
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: Entering
 manager mode
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: dbus signal
 saned-start
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: dbus_init
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: dbus match
 type='signal',interface='org.freedesktop.Hal.Manager'
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: now sending
 signal saned_begin
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: manager mode:
 dbus
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: calling dbus
 method: aquire
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm:
 dbus_call_method
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: waiting for
 reply
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: forking
 subprocess for saned
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: waiting for
 saned
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: Setting
 environment: SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d
 *Mar 18 18:27:21 raspberry-pi saned[1982]: saned (AF-indep+IPv6) from
 sane-backends 1.0.22 starting up
 Mar 18 18:27:21 raspberry-pi saned[1982]: check_host: getpeername failed:
 Socket operation on non-socket
 Mar 18 18:27:21 raspberry-pi saned[1982]: init: access by host [error]
 denied
 Mar 18 18:27:21 raspberry-pi saned[1982]: saned exiting*
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: saned exited
 with status: 0
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: calling dbus
 method: release
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm:
 dbus_call_method
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: waiting for
 reply
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: dbus signal
 saned-end
 Mar 18 18:27:21 raspberry-pi scanbm: /usr/local/sbin/scanbm: now sending
 signal saned_end
 
 
 and on reboot, scanbm does not start.
 
 /etc/xinetd.d/saned
 
 service saned 
 {
   port = 6566
   socket_type = stream
   server = /usr/local/sbin/scanbm
   server_args = scanbm –c /usr/local/etc/scanbd/scanbd.conf 
   protocol = tcp
   user = saned
   #user = root
   group = scanner
   wait = no
   disable = no
 }
 
 
 thanks.
 
 
 
 --
 View this message in context: 
 http://sane.10972.n7.nabble.com/Scanbm-and-xinetd-d-tp19579.html
 Sent from the SANE - Dev mailing list archive at Nabble.com.
 


-- 
Wilhelm Meier
Eichenweg 11a
D-66459 Kirkel-Limbach
0151-12414315

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] dbus error with scanbd

2015-03-19 Thread Wilhelm
Am 17.03.2015 um 17:03 schrieb ylafont:
 Will have to check that one out.
 
 i Compared the file from version 1.4.1  the current version (1.4.2) has a
 second part  on that line that it doe not like.
 
  policy user=saned* ! Arch Linux user=quot;daemonquot; /*

Looks like the xml-comment isn't well formed. Please try:

!-- Arch Linux user=daemon --

or delete this comment at all.

-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] scanbd and actually scanning over the LAN

2015-03-04 Thread Wilhelm
Am 04.03.2015 um 14:30 schrieb Rolf Leggewie:
 Hello,
 
 with scanbd sitting on top of the net backend I wonder if and how actual
 scanning over the LAN still works.  Two scenarios.
 
 a) sharing a scanbd scan host SH via the LAN to scan client SC
 b) accessing a saned LAN scanner LS on a scanbd-enabled computer SES
 
 Are both scenarios supported?  This will have implications for my
 packaging as well.
 
 I guess scenario A ought to be possible by adding something like
 192.168.0.0/24 to /etc/sane.d/saned.conf on SH, while scenario B would
 require adding the IP or hostname of LS to /etc/sane.d/net.conf on SES.
 
 So far, so (theoretically) good?  I wonder especially if scenario B
 isn't going to blow up in my face.

Should be ok if you omit localhost in saned / /etc/scanbd/net.conf.

But: local or remote scan-applications must (only) include the scanbd
host in /etc/sane.d/net.conf (either localhost or remote).


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] making scanbd work OOTB in debian - question about supported backends

2015-03-03 Thread Wilhelm
Am 04.03.2015 um 06:26 schrieb Rolf Leggewie:
 On 28.02.2015 16:27, Wilhelm wrote:
 Am 25.02.2015 um 07:06 schrieb Rolf Leggewie:
 Hello,

 I am maintaining scanbd in Debian and found scanbd difficult to
 configure with lots of possible pitfalls.  As much as possible I want to
 make it easy and failproof for the ordinary users to install and use
 scanbd OOTB.

 One of the things that broke things for me and that were hard to
 troubleshoot (I wrote to this ML about it last year) is that the SANE
 backend configurations need to be present both in /etc/sane.d and
 /etc/scanbd.  This is due to the nature scanbd sits on top of SANE. I
 still wonder if scanbd couldn't be made to have an explicit
 SANE_BACKEND_CONFIG_DIR in addition to the SANE_CONFIG_DIR?!  That would
 eliminate the need for what I am about to explain.

 What should be the effect of this env-variable SANE_BACKEND_CONFIG_DIR?

 I think it would be best, if the SANE lib would support setting
 explicitly the config file (dll.conf) and / or the config dir.

 Then saned could use this and introduced a -c config-file and / or
 -ddir options. And in turn scanbd can make use of this.
 
 I thought I had already replied to this message but I cannot see it in
 the archive.  My apologies if this comes out as a double-post.
 
 As maintainer, I currently need to copy all backend files from
 /etc/sane.d/*.conf to /etc/scanbd.  That is messy to say the least.  If
 SANE_BACKEND_CONFIG_DIR was a variable separate from SANE_CONFIG_DIR
 that wouldn't be necessary with obvious benefits to everyone.

All SANE desktop applications use SANE_CONFIG_DIR. scanbd must use saned
with a different dll.conf and therefore sets SANE_CONFIG_DIR before
invoking saned. SANElib looks for that dll.conf and config-files in
there and dll.d. The point is, that you can't direct SANE to another
dll.conf. And I don't see what the help of SANE_BACKEND_CONFIG_DIR could
be in this respect.

But: is SANE_BACKEND_CONFIG_DIR a SANElib env-variable? Don't know about it.


 
 I do believe that your suggestion of saned having a -d or -c parameter
 would likely achieve the same result, alas, we don't have it and it's
 not clear it will arrive.
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] making scanbd work OOTB in debian - question about supported backends

2015-03-01 Thread Wilhelm
Am 25.02.2015 um 07:06 schrieb Rolf Leggewie:
 Hello,
 
 I am maintaining scanbd in Debian and found scanbd difficult to
 configure with lots of possible pitfalls.  As much as possible I want to
 make it easy and failproof for the ordinary users to install and use
 scanbd OOTB.
 
 One of the things that broke things for me and that were hard to
 troubleshoot (I wrote to this ML about it last year) is that the SANE
 backend configurations need to be present both in /etc/sane.d and
 /etc/scanbd.  This is due to the nature scanbd sits on top of SANE. I
 still wonder if scanbd couldn't be made to have an explicit
 SANE_BACKEND_CONFIG_DIR in addition to the SANE_CONFIG_DIR?!  That would
 eliminate the need for what I am about to explain.

What should be the effect of this env-variable SANE_BACKEND_CONFIG_DIR?

I think it would be best, if the SANE lib would support setting
explicitly the config file (dll.conf) and / or the config dir.

Then saned could use this and introduced a -c config-file and / or
-ddir options. And in turn scanbd can make use of this.


 During installation of the binary package, I intend to create links from
 all the relevant backends /etc/sane.d/*.conf to /etc/scanbd.  I don't
 think all backends have scanner buttons.  I cannot imagine the v4l
 backend having scanner buttons (what does it do anyhow?) Same goes for
 the test backend.  Would you advise to keep a positive list of which
 backends to include in the linking or rather of which ones to exclude
 (such as dll.conf which is not a backend configuration at all).
 
 QUESTION: Can anyone point me to which backends have and don't have
 scanner buttons?
 
 Regards
 
 Rolf
 
 


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Scandb - On Paperload - fujitsu.conf

2015-02-20 Thread Wilhelm
Am 19.02.2015 um 17:00 schrieb ylafont:
 I copied the syslog to the dropbox folder.
 
 https://www.dropbox.com/sh/eu2mflwablkv8vm/AACgbgDwXF_i1n734Iar4wa6a?dl=0

thank you!

 
 again, thanks for the assistance.

you're welcome!

-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Scandb - On Paperload - fujitsu.conf

2015-02-18 Thread Wilhelm
Am 17.02.2015 um 21:43 schrieb ylafont:
 Scanbd files 
 https://www.dropbox.com/sh/eu2mflwablkv8vm/AACgbgDwXF_i1n734Iar4wa6a?dl=0

I added some additional checks in trunk, please try it again and send
back the logs. Thanks.

 
 scanbd.conf  launches scan.sh  which is in the same folder.
 (temporarily comment out). 
 
 fujitsu.com launches test.sh  - simply creates a file in the /tmp
 folder  informing it executed.  i have tried since just the name and the
 full path. same result. 
 
 Thank you for the assistance and please let me know if anything else is
 needed or required.
 
 
 On Tuesday, February 17, 2015 1:22 PM, Wilhelm Meier-2 [via SANE]
 [hidden email] /user/SendEmail.jtp?type=nodenode=19464i=0 wrote:
 
 
 I must admit that I have no idea what is going on - please post the full
 scanbd.conf and all relevant included .conf-files.
 
 And please test the script as saned user - not as the pi user.
 
 Am 17.02.2015 um 17:38 schrieb ylafont:
 
 I am assuming access rights for the folder are all good, the script can
 be executed if i place it in the scan action of scanbd.conf

 folders access
 .
 pi@PiScanner /usr/local/etc $ ls -l
 total 4
 drwxr-sr-x 4 root staff 4096 Feb 16 15:53 scanbd

 But just in case i gave all rights to the folder and everything below.

 pi@PiScanner /usr/local/etc $ ls -l
 total 4
 drwxrwsrwx 4 root staff 4096 Feb 16 15:53 scanbd


 On Monday, February 16, 2015 11:56 AM, Wilhelm Meier-2 [via SANE]
 [hidden email] /user/SendEmail.jtp?type=nodenode=19460i=0 wrote:


 Am 16.02.2015 um 17:43 schrieb ylafont:
 I have been trying to have a Paperload action start without success.

 scanbd gives me on error stating No such file or directory. The
 file is
 there.

 Please check the access rights of the user running scanbd, also to the
 directory.



 Scanbd Log ---

 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: checking
 option
 page-loaded number 77 (2) for device fujitsu:fi-4220C2dj:100742:
 value: 1
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: value trigger:
 numerical
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: trigger
 action for
 page-loaded for device fujitsu:fi-4220C2dj:100742 with script
 /usr/local/etc/scanbd/test.sh
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd:
 get_sane_option_value
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: Value of
 mode as
 string (len 7, hash -621353420): Lineart
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 SCANBD_FUNCTION_MODE=Lineart
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd:
 get_sane_option_value
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 SCANBD_FUNCTION=2
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 PWD=/
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: No USER,
 setting
 env: USER=saned
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 HOME=/
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 SCANBD_DEVICE=fujitsu:fi-4220C2dj:100742
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 SCANBD_ACTION=paperload
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 fujitsu:fi-4220C2dj:100742 to signal scan_begin
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: now sending
 signal
 scan_begin
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 SCANBD_FUNCTION_MODE=Lineart to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 SCANBD_FUNCTION=2 to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 PATH=/sbin:/usr/sbin:/bin:/usr/bin to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 PWD=/ to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 USER=saned to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 HOME=/ to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 SCANBD_DEVICE=fujitsu:fi-4220C2dj:100742 to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 SCANBD_ACTION=paperload to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: now sending
 signal
 trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: now flushing
 the
 dbus
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: unref the
 signal
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: using absolute
 script path: /usr/local/etc/scanbd/test.sh
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: waiting for
 child:
 /usr/local/etc/scanbd/test.sh
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: exec for
 /usr/local/etc/scanbd/test.sh
 Feb 16 16:34:36

Re: [sane-devel] Scandb - On Paperload - fujitsu.conf

2015-02-18 Thread Wilhelm
Am 18.02.2015 um 17:44 schrieb ylafont:
 Not sure what files need to be copy back.  None look like they have been
 modified.  Please let me know.

Look here please:

https://sourceforge.net/p/scanbd/code/207/

You have to checkout the latest version of trunk via svn.

-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Scandb - On Paperload - fujitsu.conf

2015-02-18 Thread Wilhelm
Am 18.02.2015 um 22:20 schrieb ylafont:
 My Process,
 
 rename /usr/local/sbin/scanbd  ---  /usr/local/sbin/scanbd.old
 replaced /usr/local/srv/1.4.1/src/scanbd/sane.c with new posted version

Well, in this case this should work, but I wanted you to check out the
last version of trunk ...

 
 cd /usr/local/srv/1.4.1/
 sudo ./configre
 sudo make all
 sudo make install
 
 checked to insure scanbd was recreated in /usr/local/sbin
 
 rebooted
 
 re-tested.
 
 check tmp folder the environment file.
 worked like a charm. 

That's good news.
Please do me a favor and send the log-files with the highest log-level
(just about 100 lines before the exec of the script).

 Could something have gone wrong with the initial compile  if the code was
 not changed?

I have no idea ...



 
 
 
 
 
 --
 View this message in context: 
 http://sane.10972.n7.nabble.com/Scandb-On-Paperload-fujitsu-conf-tp19449p19471.html
 Sent from the SANE - Dev mailing list archive at Nabble.com.
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Scandb - On Paperload - fujitsu.conf

2015-02-17 Thread Wilhelm
I must admit that I have no idea what is going on - please post the full
scanbd.conf and all relevant included .conf-files.

And please test the script as saned user - not as the pi user.

Am 17.02.2015 um 17:38 schrieb ylafont:
 I am assuming access rights for the folder are all good, the script can
 be executed if i place it in the scan action of scanbd.conf 
 
 folders access 
 . 
 pi@PiScanner /usr/local/etc $ ls -l 
 total 4 
 drwxr-sr-x 4 root staff 4096 Feb 16 15:53 scanbd 
 
 But just in case i gave all rights to the folder and everything below. 
 
 pi@PiScanner /usr/local/etc $ ls -l 
 total 4 
 drwxrwsrwx 4 root staff 4096 Feb 16 15:53 scanbd 
 
 
 On Monday, February 16, 2015 11:56 AM, Wilhelm Meier-2 [via SANE]
 [hidden email] /user/SendEmail.jtp?type=nodenode=19460i=0 wrote:
 
 
 Am 16.02.2015 um 17:43 schrieb ylafont:
 I have been trying to have a Paperload action start without success.

 scanbd gives me on error stating No such file or directory. The file is
 there.
 
 Please check the access rights of the user running scanbd, also to the
 directory.
 


 Scanbd Log ---

 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: checking option
 page-loaded number 77 (2) for device fujitsu:fi-4220C2dj:100742: value: 1
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: value trigger:
 numerical
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: trigger
 action for
 page-loaded for device fujitsu:fi-4220C2dj:100742 with script
 /usr/local/etc/scanbd/test.sh
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd:
 get_sane_option_value
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: Value of
 mode as
 string (len 7, hash -621353420): Lineart
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 SCANBD_FUNCTION_MODE=Lineart
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd:
 get_sane_option_value
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 SCANBD_FUNCTION=2
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 PWD=/
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: No USER,
 setting
 env: USER=saned
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 HOME=/
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 SCANBD_DEVICE=fujitsu:fi-4220C2dj:100742
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: setting env:
 SCANBD_ACTION=paperload
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 fujitsu:fi-4220C2dj:100742 to signal scan_begin
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: now sending
 signal
 scan_begin
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 SCANBD_FUNCTION_MODE=Lineart to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 SCANBD_FUNCTION=2 to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 PATH=/sbin:/usr/sbin:/bin:/usr/bin to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 PWD=/ to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 USER=saned to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 HOME=/ to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 SCANBD_DEVICE=fujitsu:fi-4220C2dj:100742 to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 SCANBD_ACTION=paperload to signal trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: now sending
 signal
 trigger
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: now flushing
 the
 dbus
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: unref the
 signal
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: using absolute
 script path: /usr/local/etc/scanbd/test.sh
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: waiting for
 child:
 /usr/local/etc/scanbd/test.sh
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: exec for
 /usr/local/etc/scanbd/test.sh
 Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: execlp: No such
 file or directory
 *Feb 16 16:34:36 PiScanner scanbd: /usr/local/sbin/scanbd: child
 /usr/local/etc/scanbd/test.sh exited with status: 1*
 Feb 16 16:34:37 PiScanner scanbd: /usr/local/sbin/scanbd: Iteration on
 dbus
 call
 Feb 16 16:34:37 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 fujitsu:fi-4220C2dj:100742 to signal scan_end
 Feb 16 16:34:37 PiScanner scanbd: /usr/local/sbin/scanbd: now sending
 signal
 scan_end
 Feb 16 16:34:37 PiScanner scanbd: /usr/local/sbin/scanbd: reopen device
 fujitsu:fi-4220C2dj:100742
 Feb 16 16:34:37 PiScanner scanbd: /usr/local/sbin/scanbd: got the value
 already - copy
 Feb 16 16:34:37 PiScanner scanbd: /usr

Re: [sane-devel] Scandb - On Paperload - fujitsu.conf

2015-02-16 Thread Wilhelm
 21:06 scan.sh
 -rwxr-xr-x 1 root staff 1195 Feb  4 00:10 test.script.org
 -rwxrwxrwx 1 root staff 2009 Feb 16 16:12 test.sh
 pi@PiScanner /usr/local/etc/scanbd $
 
 
 
 paperload section - Fujitsu.conf ---
 
 action paperload {
 filter = ^page-loaded.*
 desc   = page loaded
 numerical-trigger {
from-value = 0
 to-value   = 1
 }
 # script must be an relative path starting from scriptdir
 (see above), 
 # or an absolute pathname. 
 # It must contain the path to the action script without
 arguments
 # Absolute path example: script = /some/path/foo.script 
 #script = 
   script = /usr/local/etc/scanbd/test.sh
   
 }
 
 
 
 
 --
 View this message in context: 
 http://sane.10972.n7.nabble.com/Scandb-On-Paperload-fujitsu-conf-tp19449.html
 Sent from the SANE - Dev mailing list archive at Nabble.com.
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] scanbd Post Processing

2015-02-10 Thread Wilhelm
Am 10.02.2015 um 04:30 schrieb ylafont:
 Forgive me if this  not the correct section  for this.
 
 I wanted to start a bash script to process the completed scans. I created a
 link to Scan.sh from test.script
 
 test.script - scan.sh
 
 A section of scan.sh contains the following when scanning via the ADF
 
 if [ $SCANBD_ACTION -eq paperload ]  [ $SCANBD_FUNCTION -eq 2 ]; then
 
 logger -t scanbd: $0 * Now Scanning on device $SCANBD_DEVICE
 ***
 scanimage -d $SCANBD_DEVICE -y 279.4 -x 215.9 --batch --format=tiff --mode
 Lineart --resolution 300 --source=ADF Duplex
 
 logger -t scanbd: $0 * Scanning ended on device
 $SCANBD_DEVICE ***
 fi
 
 logger -t scanbd: $0 End of $SCANBD_ACTION for device $SCANBD_DEVICE
 Removing blank pages and cleaning all others.
 logger -t scanbd: $0  Starting Page Removal Process **
 
 *. ./premove.sh*   - Post processing script

Is the above line part of the scan-script?

You can only use *one* script for one action.

 
 After the scanner completes the scan the script is terminated and does not
 allow processing to continue.
 Feb 10 00:38:14 PiScanner scanbd: /usr/local/etc/scanbd/scan.sh: 
 Scanning ended on device fujitsu:fi-4220C2dj:100742 **
 Feb 10 00:38:14 PiScanner scanbd: /usr/local/etc/scanbd/scan.sh: End of scan
 for device fujitsu:fi-4220C2dj:100742
 Feb 10 00:38:14 PiScanner scanbd: /usr/local/sbin/scanbd: child
 /usr/local/etc/scanbd/scan.sh exited with status: 1

The scan-script terminates with an error - this might be a problem...

 Feb 10 00:38:15 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 fujitsu:fi-4220C2dj:100742 to signal scan_end
 Feb 10 00:38:15 PiScanner scanbd: /usr/local/sbin/scanbd: now sending signal
 scan_end
 
 
 Is there a method allowing the second script to continue and process the
 pages scanned?
 
 
 
 --
 View this message in context: 
 http://sane.10972.n7.nabble.com/scanbd-Post-Processing-tp19426.html
 Sent from the SANE - Dev mailing list archive at Nabble.com.
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] scanbd Post Processing

2015-02-10 Thread Wilhelm
Am 11.02.2015 um 03:19 schrieb ylafont:
 Yes, 
 
 the last line of the script, calls a script to process the scans,  

You are source-ing the premove.sh.
What happens if you start it by hand? But the problem then isn't related
to scanbd, seems to be bash related.

 
 The complete scan.sh.  is as follows. 
 
 logger -t scanbd: $0 Begin of $SCANBD_ACTION for device $SCANBD_DEVICE
 
 # printout all env-variables
 /usr/bin/printenv  /tmp/scanbd.env
 
 CurrentDir=$(pwd) #Script 
 Starting Directory
 scandir=/home/pi/PiScans#Scanning 
 Directory
 tmpdir=Scan-$RANDOM   #Script 
 temporary Directory of processing.
 
 mkdir $scandir/$tmpdir
 cd $scandir/$tmpdir
 
 if  [ $SCANBD_FUNCTION -eq 2 ]; then
 #if [ $SCANBD_ACTION -eq paperload ]  [ $SCANBD_FUNCTION -eq 2 ]; then
   logger -t scanbd: $0 * Now Scanning on device 
 $SCANBD_DEVICE
 ***
   #scanimage -d net:localhost:fujitsu:fi-4220C2dj:100742 -y 279.4 -x 215.9
 --batch --format=tiff --mode Lineart --resolution 300 --source=ADF Duplex
   scanimage -d $SCANBD_DEVICE -y 279.4 -x 215.9 --batch --format=tiff 
 --mode
 Lineart --resolution 300 --source=ADF Duplex
   logger -t scanbd: $0 * Scanning ended on device
 $SCANBD_DEVICE ***
 fi
 
 . ./premove.sh
 
 logger -t scanbd: $0 End   of $SCANBD_ACTION for device $SCANBD_DEVICE
 ___
 
 
 I had also address the error - but the second script which is in the same
 location as scan.sh does not execute.
 
 Feb 11 02:19:18 PiScanner scanbd: /usr/local/etc/scanbd/scan.sh: Begin of
 scan for device fujitsu:fi-4220C2dj:100742
 Feb 11 02:19:18 PiScanner scanbd: /usr/local/etc/scanbd/scan.sh:
 * Now Scanning on device fujitsu:fi-4220C2dj:100742
 ***
 Feb 11 02:19:19 PiScanner scanbd: /usr/local/sbin/scanbd: Iteration on dbus
 call
 Feb 11 02:19:20 PiScanner scanbd: /usr/local/sbin/scanbd: Iteration on dbus
 call
 Feb 11 02:19:21 PiScanner scanbd: /usr/local/sbin/scanbd: Iteration on dbus
 call
 Feb 11 02:19:22 PiScanner scanbd: /usr/local/sbin/scanbd: Iteration on dbus
 call
 Feb 11 02:19:23 PiScanner scanbd: /usr/local/sbin/scanbd: Iteration on dbus
 call
 Feb 11 02:19:24 PiScanner scanbd: /usr/local/sbin/scanbd: Iteration on dbus
 call
 Feb 11 02:19:25 PiScanner scanbd: /usr/local/sbin/scanbd: Iteration on dbus
 call
 Feb 11 02:19:26 PiScanner scanbd: /usr/local/sbin/scanbd: Iteration on dbus
 call
 Feb 11 02:19:27 PiScanner scanbd: /usr/local/sbin/scanbd: Iteration on dbus
 call
 Feb 11 02:19:27 PiScanner scanbd: /usr/local/etc/scanbd/scan.sh:
 * Scanning ended on device fujitsu:fi-4220C2dj:100742
 ***
 Feb 11 02:19:27 PiScanner scanbd: /usr/local/etc/scanbd/scan.sh: This this
 End  ***  of scan for device fujitsu:fi-4220C2dj:100742
 Feb 11 02:19:27 PiScanner scanbd: /usr/local/sbin/scanbd: child
 /usr/local/etc/scanbd/scan.sh exited with status: 0
 Feb 11 02:19:27 PiScanner scanbd: /usr/local/sbin/scanbd: append string
 fujitsu:fi-4220C2dj:100742 to signal scan_end
 
 
 
 
 
 --
 View this message in context: 
 http://sane.10972.n7.nabble.com/scanbd-Post-Processing-tp19426p19430.html
 Sent from the SANE - Dev mailing list archive at Nabble.com.
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] Scanner Button Daemon [scanbd]: release 1.4.2.

2015-02-04 Thread Wilhelm
Hi all,

I like to announce the new version 1.4.2 of scanbd, the scanner button
daemon.

This release is mostly a maintenace release: support for c11 and minor
typo corrections.
Feel free to get it via

http://sourceforge.net/projects/scanbd/files/releases/scanbd-1.4.2.tgz/download

or

svn co https://scanbd.svn.sourceforge.net/svnroot/scanbd/releases/1.4.2

[
scanbd is a scanner button daemon. It polls the scanner buttons looking
for buttons pressed or function knob changes or other scanner events  as
paper inserts / removals and at the same time (!) allows
also scan-applications to access the scanners, locally or remote via
network. If buttons are pressed or other scanner events take place,
various actions can be submitted (scan, copy, email, ...) via action
scripts. The function knob values are passed to the action-scripts as
well. Scan actions are also signaled via dbus. This can be useful for
foreign applications. Scans can also be triggered via dbus or signals
from foreign applications.
On platforms which support signaling of dynamic device insertion /
removal (using e.g. libudev, dbus, hal) scanbd supports this as well.
scanbd can use all sane-backends or some special backends from the (old)
scanbuttond project.
Supported platforms: Linux (x86/ARM), FreeBSD, NetBSD, OpenBSD
]

-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] scanbd: Can't get the scbtn device list

2014-12-28 Thread Wilhelm
Hi Alex,

Am 28.12.2014 um 21:08 schrieb Alexander Tomisch:
 Hello,
 
 I tried to install scanbd on a Arch Linux X64 but it did not recognize
 my Scanner - output of scanbd: Can't get the scbtn device list.
 
 It is not my first time with scanbd and on my previous installations it
 was already working with my scanner and the scanbuttond epson backend.

do you really need the scanbuttond backend? These backends are included
into scanbd as is, because they aren't actively maintained.

 
 I first installed scanbd from AUR (1.4.0) and then i tried the latest
 (1.4.1) from sourceforge - same problem.
 
 
 Scanning with sane is working, also through the running scanbd-service.

This indicates, that libsane is working correctly!

 
 
 Output of lsusb:
 
 Bus 001 Device 049: ID 04b8:010c Seiko Epson Corp. GT-6700U [Perfection
 640]

Unfortunately I don't have access to this type of scanner ...

 
 
 Output of scanbd, it runs as root for testing:
 
 /usr/bin/scanbd -d7 -f -c /etc/scanbd/scanbd.conf
 ##
 
 /usr/bin/scanbd: foreground
 /usr/bin/scanbd: config-file: /etc/scanbd/scanbd.conf
 /usr/bin/scanbd: reading config file /etc/scanbd/scanbd.conf
 /usr/bin/scanbd: debug on: level: 7
 /usr/bin/scanbd: dropping privs to uid root
 /usr/bin/scanbd: dropping privs to gid scanner
 /usr/bin/scanbd: group scanner has member:
 /usr/bin/scanbd: alex
 /usr/bin/scanbd: drop privileges to gid: 96
 /usr/bin/scanbd: Running as effective gid 96
 /usr/bin/scanbd: drop privileges to uid: 0
 /usr/bin/scanbd: Running as effective uid 0
 /usr/bin/scanbd: dbus_init
 /usr/bin/scanbd: dbus match
 type='signal',interface='org.freedesktop.Hal.Manager'
 /usr/bin/scanbd: Loading /usr/lib/scanbd/scanbuttond/backends/meta.so
 /usr/bin/scanbd: meta-backend: init
 /usr/bin/scanbd: libusbi: initializing...
 /usr/bin/scanbd: Loading /usr/lib/scanbd/scanbuttond/backends/epson.so
 /usr/bin/scanbd: meta-backend: attaching backend: Epson USB
 /usr/bin/scanbd: epson-backend: init
 /usr/bin/scanbd: Scanning for local-only devices
 /usr/bin/scanbd: Can't get the scbtn device list
 /usr/bin/scanbd: device list null
 /usr/bin/scanbd: start_scbtn_threads
 /usr/bin/scanbd: start the threads (0)
 /usr/bin/scanbd: start dbus thread
 /usr/bin/scanbd: Not Primary Owner (-1)
 /usr/bin/scanbd: Name Error (Connection :1.110 is not allowed to own
 the service de.kmux.scanbd.server due to security policies in the
 configuration file)
 /usr/bin/scanbd: udev init
 /usr/bin/scanbd: get udev monitor
 /usr/bin/scanbd: udev fd is non-blocking, now setting to blocking mode
 /usr/bin/scanbd: start udev thread
 /usr/bin/scanbd: udev thread started
 ^C/usr/bin/scanbd: sig_term/int_handler called with signal 2
 /usr/bin/scanbd: stop_scbtn_threads
 /usr/bin/scanbd: waiting ...
 /usr/bin/scanbd: stop dbus thread
 /usr/bin/scanbd: stop udev thread
 /usr/bin/scanbd: join udev thread
 /usr/bin/scanbd: cleanup device handler
 /usr/bin/scanbd: close udev monitor
 /usr/bin/scanbd: close udev
 /usr/bin/scanbd: exiting scanbd
 
 ##
 
 Any hints?
 
 Alex
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] improve scanbd for Debian

2014-12-17 Thread Wilhelm
Am 17.12.2014 um 12:29 schrieb Thorsten Müller:
 Am Mittwoch, 17. Dezember 2014, 16:47:31 schrieb Rolf Leggewie:
 On 12.12.2014 13:58, Wilhelm wrote:
 Be sure that scanbd uses the correct location of libsane config
 files
 (see ReadMe). In most cases this will be a seperate directory (e.g.
 /etc/scanbd) where all configs and dll.conf are. This dll.conf must
 not contain the net-backend.

 On the other hand the standard libsane config location (/etc/sane)
 has to contain a dll.conf with only the net backend.

 I changed trunk to include an additional debug output to log the
 env-var SANE_CONFIG_DIR. Please check the startup-script if the
 right dir ist set ...

 SANE_CONFIG_DIR is set to /etc/scanbd.  

good

 The dll.conf files were not
 set up according to above requirements but when I changed them that
 way everything stopped working, including scanbd from the command
 line or even scanimage -L.  

what stopped working?

 sane-find-scanner would continue to
 find the device, though.

without SANE_CONFIG_DIR=/etc/scanbd? should not happen (s. ReadMe), but

SANE_CONFIG_DIR=/etc/scanbd scanimage -L

should list the scanner.


 Before I attempted to change things, /etc/scanbd/dll.conf contained
 ONLY the net backend 

wrong

 and /etc/sane.d/dll.conf contained a whole bunch
 of backends including genesys and net.

wrong: should only contain net backend

So, it looks like you swapped the config: please read the ReadMe carefully.

All - also local - clients must use the net-backend! This is because the
real device is locked due to scanbd polling the buttons. If a network
connection arrives (from local or remote client), scanbm (or scanbd -m)
stops scanbd from polling, releasing the devices an starts saned.

 I've managed to get /etc/scanbd/dll.conf to contain ONLY the genesys
 backend (dropped the net backend) without breaking anything that was
 previously working.  Now it's on to get saned to work over the network
 which I remember from a few years ago when I did this for actually
 scanning across the LAN to be a horrible config nightmare.

 I will need to look into how to make that part work as expected and
 then I will need to figure out how to make sure that the Debian users
 have a proper setup.  This will be complicated since it involves the
 configuration files for a separate package.

 On 12.12.2014 15:32, Simon Matter wrote:
 Given that you were unable to see any difference I started a re-run
 and inserted some markers into syslog with the logger command to
 make sure I will be able to gather what happened when this time. 
 From what I understand now, it seems that the scanner is indeed
 NOT recognized.  How can that come about, especially given that on
 a call from the command-line things work just fine with the same
 configuration? 
 That sounds like a kind of permission problem. Is there something
 like udev granting access to the device for locally logged in users
 which does not happen when started iva init?

 Simon, permissions problem was my first thought as well.  But I had
 run a few tests already and kind of ruled that out.  This included
 setting user and group in scanbd.conf to root.root.  I verified with
 ps that scanbd was indeed running as the root user but even then the
 buttons did not trigger a reaction.

 When I call scanbd from the command line the script does not switch to
 the saned user.  It only does this (for understandable reasons) when
 called as sudo scanbd -f.  But even then, the buttons work.
 
 I found this thread just now. It's a good thing you try to build a 
 debian package for scanbd. For my own purposes, I built a dabian package 
 from scanbd to work on my Kubuntu 12.04 LTS system that sets up 
 everything to work as expected. If you are interested, I could mail the 
 *.debian.tar.gz file so you can check out what I did to make things 
 work. My local scanner is a Canon LiDE 210 which uses the genesys 
 backend as well, so your setup should be very similar to mine.
 
 My package depends on libsane 1.0.24 or higher since earlier versions 
 don't supoprt the five front panel buttons on my LiDE 210.
 
 The package is built with scanbd 1.4.0
 
 Greetings
 Thorsten
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] improve scanbd for Debian

2014-12-11 Thread Wilhelm
Am 11.12.2014 um 12:47 schrieb Rolf Leggewie:
 On 11.12.2014 15:39, Wilhelm wrote:
 Well, I see for in syslog.log

 Nov 15 19:08:43 localhost scanbd: scanbd: exec for
 /usr/share/scanbd/scripts/copy.script
 Nov 15 19:08:43 localhost scanbd: scanbd: execlp: No such file or directory

 which meens that your script isn't found ... but the action is triggered
 from the scanner (once in this log).
 
 
 Hello Wilhelm,
 
 thank you for the quick response.  Like I said, the binary package and
 my installation still has many rough edges.  They will need to be dealt
 with one at a time, in the proper order.
 
 The part you refer to is the one that is actually working, where the
 call to the script at least happens.  Maybe the script does not exist
 but that is irrelevant at this time because I want to start scanbd from
 init but it doesn't even try to call any script (existing or
 non-existing).  It only does that when I call it from the command-line.

Ok, understand.

Actually I have no debian system at hand ...

Did you try all buttons or only option[34] file?

 
 Lines 71 to 503 are the ones that show the call where button presses do
 not trigger any kind of response.
 
 Regards
 
 Rolf
 
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] improve scanbd for Debian

2014-12-11 Thread Wilhelm
Hi Rolf,

Am 11.12.2014 um 12:47 schrieb Rolf Leggewie:
 On 11.12.2014 15:39, Wilhelm wrote:
 Well, I see for in syslog.log

 Nov 15 19:08:43 localhost scanbd: scanbd: exec for
 /usr/share/scanbd/scripts/copy.script
 Nov 15 19:08:43 localhost scanbd: scanbd: execlp: No such file or directory

 which meens that your script isn't found ... but the action is triggered
 from the scanner (once in this log).
 
 
 Hello Wilhelm,
 
 thank you for the quick response.  Like I said, the binary package and
 my installation still has many rough edges.  They will need to be dealt
 with one at a time, in the proper order.
 
 The part you refer to is the one that is actually working, where the
 call to the script at least happens.  Maybe the script does not exist
 but that is irrelevant at this time because I want to start scanbd from
 init but it doesn't even try to call any script (existing or
 non-existing).  It only does that when I call it from the command-line.
 
 Lines 71 to 503 are the ones that show the call where button presses do
 not trigger any kind of response.
 

I must admit, actually I have no idea whar ist going wrong here. I see
that the scanner and all options are recognized as in the
call-from-shell case. So, the buttons presses (value changes) should be
recognized as well ...

On my system (arch linux) there are no problems ...

Wilhelm

-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] improve scanbd for Debian

2014-12-11 Thread Wilhelm
Am 12.12.2014 um 03:27 schrieb Rolf Leggewie:
 On 12.12.2014 05:07, Wilhelm wrote:
 I must admit, actually I have no idea whar ist going wrong here. I see
 that the scanner and all options are recognized as in the
 call-from-shell case.
 
 Wilhelm, thank you for having a look.  I must admit that the logs were
 gotten a few weeks ago.  It is quite possible that my memory of what I
 was doing at what point in time was faulty.  My apologies about that. I
 am only starting to learn how to decipher the logs on my own (totally
 impossible feat at log level 7, hahaha).
 
 Given that you were unable to see any difference I started a re-run and
 inserted some markers into syslog with the logger command to make sure I
 will be able to gather what happened when this time.  From what I
 understand now, it seems that the scanner is indeed NOT recognized.  How
 can that come about, especially given that on a call from the
 command-line things work just fine with the same configuration?

Be sure that scanbd uses the correct location of libsane config files
(see ReadMe). In most cases this will be a seperate directory (e.g.
/etc/scanbd) where all configs and dll.conf are. This dll.conf must not
contain the net-backend.

On the other hand the standard libsane config location (/etc/sane) has
to contain a dll.conf with only the net backend.

I changed trunk to include an additional debug output to log the env-var
SANE_CONFIG_DIR. Please check the startup-script if the right dir ist
set ...

 
 FTR, I started scandbd from the command-line, waited a few seconds and
 then pressed each button once.  This seems to have been successful.  In
 the case of init, I started the program via the services command,
 realized the scanner was NOT recognized, unplugged and replugged it and
 then pressed all buttons (even though apparently the scanner had not
 been recognized).
 
 Regards
 
 Rolf
 
 
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] improve scanbd for Debian

2014-12-10 Thread Wilhelm
Am 11.12.2014 um 07:51 schrieb Rolf Leggewie:
 Hello group,
 
 I'm happy to manage to get scanbd into Debian and replace scanbuttond.
 The package still has many rough edges and even for me as Maintainer
 does not work perfectly.  My local setup includes a Canon LiDE 35
 connected over USB. scanbd generally works fine when called straight
 from the command line as scanbd -f even for an ordinary user.  Buttons
 are recognized and scripts called.

Well, I see for in syslog.log

Nov 15 19:08:43 localhost scanbd: scanbd: exec for
/usr/share/scanbd/scripts/copy.script
Nov 15 19:08:43 localhost scanbd: scanbd: execlp: No such file or directory

which meens that your script isn't found ... but the action is triggered
from the scanner (once in this log).


 
 I recently added the upstream init script to the package (patched to
 include a call to status) and that doesn't seem to work properly.  My
 machine runs Ubuntu Trusty and sysvrc.  scanbd seems to start up fine
 from init as verified with ps faux.
 
 saned21838  0.0  0.0  33252  1552 ?Sl   13:35   0:00
   \_ /usr/sbin/scanbd -c /etc/scanbd/scanbd.conf
 
 But there is no reaction to button presses on the scanner.  I have
 uploaded one log with successful button presses when the program is
 started directly by the user and one where the program is started from
 init and no reactions occur. Hopefully someone can spot something in
 there or otherwise suggest something for triage to move this along.
 
 I also reported this as https://bugs.launchpad.net/bugs/1401389
 
 The attached tar-file contains the log from the console in
 scanbd.console-log and from syslog in scanbd-syslog.log
 
 First is a startup via init (19:00:53 to 19:07:46, lines 71 to 503).
 This is followed by a call to scanbd straight from the user command line
 (19:08:04 to 19:08:56, lines 504 to 1999). The Canon device is found in
 both cases (19:07:42, line 84 and 19:08:07, line 517). A file button
 press is registered at 19:08:42 that triggers the copy.script (line
 1655). Line numbers refer to the syslog since only that one has time-stamps.
 
 Regards
 
 Rolf
 
 
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] Fwd: Re: scanbd occasionally ignores scanner button presses

2014-05-16 Thread Wilhelm
Hi Milan,

Am 16.05.2014 09:38, schrieb Milan Knížek:
 Hello devs!
 
 I have setup scanbd to poll CanoScan 9000F button presses (Arch Linux,
 x86_64, sane-git from 2013-07-08, scanbd 1.3.1), scanbd.service and
 scanbm.socket are run through systemd unit files.
 
 It usually works just fine, but randomly scanbd completely ignores the
 button presses - usually, it does not even help to switch the scanner
 off/on. The only reliable solution so far is to restart the
 scanbd.service.
 
 I increased the debug level to 3 and watched syslog for messages when
 scanbd operates normally and when it ignores the presses. I could not
 find anything unusual in the messages. Scanbd continues to send lot of
 repeated messages (like in normal state), but pressing a button does not
 log any messages anymore.
 
 I have yet to confirm it by further testing, but it seems that I can
 trigger the stale status of the scanbd by repeatedly pressing the
 scanner button (e.g. the PDF merge button, which does not really scan
 anything) in a quick sequence.
 
 Is this a known behaviour? How can I debug it further?

not as far as I know.

 
 Is there any SIGNAL I could send to scanbd process to refresh itself
 without the need to restart scanbd.service?

Try to send SIGUSR1 to stop all polling and then SIGUSR2 to restart all
polling.

 
 At the moment, I implemented a workaround by killing (SIGKILL) the
 scanbd process every time the button is pressed and restarting
 scanbd.service (at the end of the action script).
 
 regards,
 Milan
 


-- 
Wilhelm
w.me...@unix.net


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

[sane-devel] UMAX Astra Backend and scanbd

2013-11-10 Thread Wilhelm
Hi Uwe,

Am 10.11.2013 01:42, schrieb info at uss-online.de:
 Dear all,
 
 does no one have experience with this type of Backend and scanbd?

did you experience any option value changes in the log as you press some
buttons?


 
 Uwe
 
 
 
 info.info http://info.info info at uss-online.de schrieb:
 
 Dear all,
 
 many thanks for the continues improvement and support of the sane 
 team members to also let scanners work under linux.
 
 This is my first post to this list, so please give me corrective 
 information on how to do it the proper way.
 
 After having read many articles on using the scanbd with standard 
 sane backends, i would like to raise this topic here.
 Actually i am not able to use the UMAX Backend with a UMAX ASTRA 
 2200 and scanbd. I have already been in contact with Wilhelm 
 concerning the scanbd daemon, but his analysis on the scanbd was 
 positive from my system config, but out of scope for the button read 
 out from the UMAX backend.
 
 The system is a Raspberry-Pi, actualized SW environment, added users 
 as I would like to have them on the five RPi-s in my home, added 
 sane plus UMAX backend and tested for local (and net) usage. All 
 fine so far.
 Now i added the scanbd with the required config, based on the git 
 available sane backends and tried to get any relevant info to let 
 scanbd handle the buttons.
 Yes, i know that the scanner is a decade (or more old) but still a 
 lot of them are in use and i would like to activate the document 
 scanning in a women acceptable Faktor.
 The Raspberry-Pi is already running 24/7 due to his main jobs as 
 openhab server and cups server activities. Should i mention, that i 
 am not a SW developer?
 
 Please find here relevant information on the system config and 
 installed modules also as the test results i got:
 
 Date:20131017
 
 Scanner Buttons / Raspberry Pi / UMAX ASTRA 2200SU via USB
 
 Raspbian 15.10.2013, Kernel: Linux raspi-3 3.6.11+ #538 PREEMPT Fri 
 Aug 30 20:42:08 BST 2013 armv6l GNU/Linux
 
 sane-backends: git repo:
 scanimage (sane-backends) 1.0.25git; backend version 1.0.22
 
 scanimage -L:
 
 usb-bus:
 ls -la /dev/bus/usb/001/
 crw-rw-r-T+ 1 root root 189, 5 Oct 17 12:28 006
 
 
 scanbd:
 scanbd-code-181-trunk
 compiled mit: USE_SANE=YES
 
 
 
 +++
 directory /etc:
 /etc/sane.d:
 -rw-r--r--   1 root root  468 Oct 16 20:37 dll.conf
 drwxr-xr-x   2 root root 4096 Oct 16 13:56 dll.d
 -rw-r--r--   1 root root  594 Oct 17 10:25 net.conf
 -rw-r--r--   1 root root 1073 Oct 17 10:25 saned.conf
 -rw-r--r--   1 root root 3094 Sep 27  2012 umax.conf
 
 dll.conf:
 # /etc/sane.d/dll.conf - Configuration file for the SANE dynamic 
 backend loader
 net
 #umax
 
 saned.conf:
 # saned.conf
 # Configuration for the saned daemon
 localhst
 127.0.0.1 http://127.0.0.1
 192.168.0.0/24 http://192.168.0.0/24
 
 net.conf:
 connect_timeout = 5
 localhost
 127.0.0.1 http://127.0.0.1
 192.168.0.0/24 http://192.168.0.0/24
 
 /etc/xinetd.d
 -rw-r--r--   1 root root   798 Oct 13 03:05 chargen
 -rw-r--r--   1 root root   660 Oct 13 03:05 daytime
 -rw-r--r--   1 root root   549 Oct 13 03:05 discard
 -rw-r--r--   1 root root   580 Oct 13 03:05 echo
 -rw-r--r--   1 ud   users  334 Oct 16 20:42 sane-port
 -rw-r--r--   1 root root   727 Oct 13 03:05 time
 
 sane-port:
 service sane-port
 {
 disable = no
 socket_type = stream
 protocol= tcp
 port= 6566
 wait= no
 user= saned
 group   = scanner
 server  = /usr/local/sbin/scanbd
 server_args = scanbd -m -c /usr/local/etc/scanbd/scanbd.conf
 }
 
 /etc/group:
 scanner:x:113:saned,ud
 saned:x:115:
 
 +++
 
 
 +++
 directory /usr/local/etc/scanbd:
 -rwxr-xr-x 1 root staff 1694 Oct 16 15:42 action.script
 -rw-r--r-- 1 root root   468 Oct 16 20:37 dll.conf
 -rwxr-xr-x 1 root staff 1112 Oct 16 15:42 example.script
 -rw-r--r-- 1 root root   594 Oct 16 21:21 net.conf
 -rw-r--r-- 1 root root  1073 Oct 16 21:22 saned.conf
 -rwxr-xr-x 1 root staff 1202 Oct 16 15:42 scanadf.script
 -rw-r--r-- 1 root staff 7687 Oct 16 21:31 scanbd.conf
 drwxr-sr-x 2 root staff 4096 Oct 16 20:29 scanner.d
 -rwxr-xr-x 1 root staff 1177 Oct 16 15:42 test.script
 -rw-r--r-- 1 ud   ud3094 Oct 15 16:27 umax.conf
 
 dll.conf:
 #net
 umax
 
 net.conf:
 localhost
 127.0.0.1 http://127.0.0.1
 192.168.0.0/24 http

[sane-devel] scanbd with HP8250 (avision)

2013-11-09 Thread Wilhelm
Hi James,

Am 08.11.2013 18:17, schrieb James Klaas:

...

 and enumerates the options repeatedly until I hit a button on the
 scanner, at which point it goes back to only showing the above
 Iteration on dbus call messages. I posted my log at
 http://pastebin.com/XbHawE9c.

looks good as your scanner seems to be recognized via libsane. Now you
have to figure out which button maps to which option: watch the logfile
while you are pressing the buttons. Then you can modify the example
scripts to get useful actions to be done.

-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd daemon does not load firmware

2013-09-23 Thread Wilhelm
Hi Ilya,

Am 20.09.2013 06:36, schrieb Ilya V. Ivanchenko:
 Wilhelm,
 Here's a patch that implements device insertion/removal hooks. I've
 tested it with scanbuttond backend and it solves the problem of firmware
 not being loaded to the scanner.

thanks again. Just added the patches!

 --
 Ilya
 
 
 *From:* Wilhelm wilhelm.meier at fh-kl.de
 *To:* Ilya V. Ivanchenko iva2k at yahoo.com
 *Cc:* w.meier at unix.net w.meier at unix.net;
 sane-devel at lists.alioth.debian.org sane-devel at 
 lists.alioth.debian.org
 *Sent:* Friday, August 30, 2013 10:29 PM
 *Subject:* Re: scanbd daemon does not load firmware
 
 Am 31.08.2013 02:28, schrieb Ilya V. Ivanchenko:
 Thanks, that clarifies the situation and also explains what you meant by
 the callback. This external hook should be given in configuration file,
 like in /etc/scanbd/scanbd.conf. Do you have a name you'd like for that
 option?
 
 Well, could imagine prepare_script as an option name for the
 scriptname. It's value should be an absolute path name or a relative
 pathname, where the same rules apply as for all scripts (see scriptdir
 option). And I would to pass it at most the same env vars the action
 scripts receive. And additionally an env variable called WHEN (or make
 it configurable) with the values inserted or removed or thelike.
 
 I'm looking forward to your contribution!
 Thanks!
 -- 
 Wilhelm
 w.meier at unix.net mailto:w.meier at unix.net
 
 
 
 


-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd daemon does not load firmware

2013-09-21 Thread Wilhelm
Hi Ilya,

Am 20.09.2013 06:36, schrieb Ilya V. Ivanchenko:
 Wilhelm,
 Here's a patch that implements device insertion/removal hooks. I've
 tested it with scanbuttond backend and it solves the problem of firmware
 not being loaded to the scanner.

thank you for your patch! Looks very good. I will integrate that in the
next few days, please be a little patient because I have a very tight
time budget this weekend.

Thanks!
Wilhelm

 --
 Ilya
 
 
 *From:* Wilhelm wilhelm.meier at fh-kl.de
 *To:* Ilya V. Ivanchenko iva2k at yahoo.com
 *Cc:* w.meier at unix.net w.meier at unix.net;
 sane-devel at lists.alioth.debian.org sane-devel at 
 lists.alioth.debian.org
 *Sent:* Friday, August 30, 2013 10:29 PM
 *Subject:* Re: scanbd daemon does not load firmware
 
 Am 31.08.2013 02:28, schrieb Ilya V. Ivanchenko:
 Thanks, that clarifies the situation and also explains what you meant by
 the callback. This external hook should be given in configuration file,
 like in /etc/scanbd/scanbd.conf. Do you have a name you'd like for that
 option?
 
 Well, could imagine prepare_script as an option name for the
 scriptname. It's value should be an absolute path name or a relative
 pathname, where the same rules apply as for all scripts (see scriptdir
 option). And I would to pass it at most the same env vars the action
 scripts receive. And additionally an env variable called WHEN (or make
 it configurable) with the values inserted or removed or thelike.
 
 I'm looking forward to your contribution!
 Thanks!
 -- 
 Wilhelm
 w.meier at unix.net mailto:w.meier at unix.net
 
 
 
 


-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbuttond backend for Epson GT-1500

2013-09-21 Thread Wilhelm
Am 20.09.2013 06:38, schrieb Ilya V. Ivanchenko:
 Here's a patch that adds support for 5 buttons on Epson GT-1500 scanner
 using scanbuttond backend.

Thanks again, but it will last same days for me to put it into the trunk.

Thanks,

Wilhelm


-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd daemon does not load firmware

2013-08-31 Thread Wilhelm
Am 30.08.2013 19:44, schrieb Ilya V. Ivanchenko:
 Hi Wilhelm,

 Thanks! I checked out the code from svn and found the markers without
 problems.

 It is first time I reviewed scanbd code, so I got few questions, maybe
 you can answer and save me some time.

I hope so ...


 It looks like the backend selection sane vs. scanbuttond is exclusive
 (compiled with #ifdef). What I gathered is in sane branch the calling
 sequence will be sane_init(), sane_get_devices(). I peeked into sanei
 code, and it seems it will call sane_open() from sane_get_devices().
 sane_open() does load firmware for the scanner if it is required (each
 sane backend has its own implementation). So my understanding is that
 scanbd with sane backend will load the firmware and have no problem. Is
 that correct?

yes!


 Now to the scanbuttonbd backend of scanbd. It looks like it won't call
 into sane backends as it has its own backends library. And scanbuttond
 backend has no code that loads firmware. As such, the bug of not loading
 the firmware is only happens with scanbuttond backend. Am I right?

yes!


 Now I have to select an appropriate fix for the firmware issue, and my
 #1 option is to call sane_get_devices(), even when using scanbuttond
 backend which now is exclusive from sane backend. Will that be a
 problem?

The scanbuttons backends exists only for old scanners / for historical 
reasons. So, the preferred way is to use sane-backends.

Because there are scanbuttond backends for scanners with no sane-backend 
I don't want to couple scanbuttond and sane together. Therefore I would 
suggest a generic solution to call an external programm / script in the 
case a device is inserted / removed. This external programm / script can 
then load the firmware by any means - even calling simply scanimage if 
sane is configured correctly.

One can aruge that using scanbd/scanbuttond for a scanner with no 
sane-support is sort of useless in case the buttons should trigger a 
scan-operation. But there might be other scan-applications than sane ...

 If it is, then I don't have an option #2... or better said it
 gets very complicated very quickly.

 --
 Ilya

 
 *From:* Wilhelm wilhelm.meier at fh-kl.de
 *To:* Ilya V. Ivanchenko iva2k at yahoo.com
 *Cc:* w.meier at unix.net w.meier at unix.net;
 sane-devel at lists.alioth.debian.org sane-devel at 
 lists.alioth.debian.org
 *Sent:* Thursday, August 29, 2013 12:33 PM
 *Subject:* Re: scanbd daemon does not load firmware

 Am 29.08.2013 16:03, schrieb Ilya V. Ivanchenko:
 2. When using scanbuttond-backends, fix loading firmware on USB
 insert.
  
   what I could imagine is to fix this problem with a special
   shell-callback, when scanbd detects a device inserion / removal.
  
  Forgot to say: would you like to write a patch for that? I will provide
  you with the neccessary info to do that. Shouldn't be too much work ;-)
  
   Not a problem. I'm a software/systems engineer, so I know what I (will
   be) doing. Only I have short window before I leave for a business trip.

 I just marked the code with four place to insert code to start such a
 callback:

 // TODO: call the device insertion / removal callback

 (if you use qtcreator you'll quickly find them)


 I'm looking forward to your patches ;-)

  
  2. When using scanbuttond-backends, fix loading firmware on
 USB insert.

what I could imagine is to fix this problem with a special
shell-callback, when scanbd detects a device inserion / removal.
   This is in the nutshell how I patched the problem from udev.
  
  yes, but you had to stop / restart the scanbd and that's more a
  workaround than a solution ...
  
   I agree.
  
   --
   Ilya


 --
 Wilhelm
 w.meier at unix.net mailto:w.meier at unix.net




-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd daemon does not load firmware

2013-08-29 Thread Wilhelm
Hi Ilya,

is there a special reason using the (old) scanbuttond-backends and not 
sane-backends?

If you plugin / poweron the scanner for the first time, who does the 
firmware get loaded in this case?

Am 29.08.2013 03:42, schrieb Ilya Ivanchenko:
 On Wed, 2013-08-28, Wilhelm wrote:
 Am 28.08.2013 07:11, schrieb Ilya V. Ivanchenko:
 I created a neat setup using xinet + scanbd service + scanbd daemon (for
 buttons) + sane (client) to use Epson GT-1500 (with ADF) as a workhorse
 of a network scanner, with scanner buttons hooked to various jobs.
 Everything is working great, except...

 I encountered a problem after the scanner is powered off and then on
 again. The buttons service (scanbd daemon) stops reading the buttons and
 keeps getting communication error in the syslog.

 that shouldn't happen. Normally, scanbd gets via udev | hal | dbus a
 device-removed event and then abandones the device until it gets plugged
 in again.

 Good to know that scanbd should manage firmware loading, it answers the
 questions I had. Now it seems we better dig to the root of the
 problem...


 So, please show the syslog from beginning of the scanbd log messages and
 in the situation when the device is removed.

 I've pasted syslog snippet with the problem when firmware is not loaded
 (with scanbd debug-level=7) here (device was removed on Aug 28 18:02:28,
 communication error happens on Aug 28 18:03:19):
 http://pastebin.com/BweSr5p2
 (it will expire in 1 month)


 And please: how did you configure / compile, which platform, ...

 Ubuntu 12.04LTS on Intel amd64, 1st installed sane and Epson's iscan:

 sudo apt-get install sane-utils
 sudo dpkg -i iscan-data_1.23.0-1_all.deb
 sudo dpkg -i iscan_2.29.1-5~usb0.1.ltdl7_amd64.deb
 sudo dpkg -i iscan-plugin-gt-1500_2.2.0-1_amd64.deb
 scanimage -L
 # works

 2nd downloaded scanbd (181-trunk)
 Prepared:
 sudo apt-get install build-essential checkinstall
 sudo apt-get install libconfuse-dev libsane-dev libudev-dev
 sudo apt-get install libconfuse-dev libusb-dev libudev-dev libdbus-1-dev
 dbus libsane-dev
 ## Sane option will only work if sane backend supports reading buttons
 from the scanner (use scanimage -A to check):
 # ./configure --prefix= --with-user=saned --with-group=scanner
 ## Use scanbuttond backend (embedded into scanbd):
 ./configure --prefix= --with-user=saned --with-group=scanner
 --enable-scanbuttond

 I patched 2 files:

 - src/scanbuttond/backends/epson_vphoto.c - added VID/PID 04B8/0133 for
 Epson GT-1500:
{ 0x04B8, 0x0133, 5 }   // Epson GT-1500, buttons: 1=scan, 2=copy,
 3=email, 4=pdf, 5=stop
...
{ Epson, GT-1500}

 - src/scanbd/scanbuttond_wrapper.c function scanbtnd_button_name()
 (upped the assert for button count =4 to =5 and renamed buttons per
 Epson line above)

 BTW - it would be nice if device definitions can name their own buttons
 instead of hard-coded values.That first list with VID/PID/count_buttons
 could contain an array of strings for that.

 Then I compiled:
 make
 sudo make install


 The system configuration involved some editing in /etc/, but I think it
 is not the issue here. Anyway let me know if you need any other
 information.

 Regards,

 --
 Ilya




-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd daemon does not load firmware

2013-08-29 Thread Wilhelm
Hi Ilja,

Am 29.08.2013 15:25, schrieb Ilya V. Ivanchenko:
 Hi Wilhelm,

 **is there a special reason using the (old) scanbuttond-backends and not
sane-backends?
 I first tried sane-backends, and apparently it does not read the buttons
 for Epson GT-1500.

did you use the epkowa backend? The sane-support-page says, that this 
backend supports most features of the GT-1500.

 I tried various things with sane-backends, but
 scanimage -A gives no button options and it was very unclear how to
 patch sane-backends or even where to start. So I quickly gave up and
 moved to scanbuttond-backends where it was easy to figure out a patch
 and it worked right away. I'd be glad if sane backend worked, but even
 Epson's iscan does not support buttons (seemingly on any of their scanners).

If you plugin / poweron the scanner for the first time, who does the
firmware get loaded in this case?
 Good question. Now retracing my steps backwards, I think I got
 iscan+sane to load the drivers the very first time and I did not notice
 this problem. When I tested things, I always used scanimage -L as a
 quick test, and it pulled the string up to the firmware loading (at
 which moment scanner clearly does a whizz sound moving the head in its
 POST). It appears to me that scanbd somehow misses calling the firmware
 load on USB insert (before reading buttons), but does it on scanimage
 -L. Perhaps it is due to the use of scanbuttond-backends and not
 sane-backends.

 So my current conclusions are that there are two potential issues to fix:
   1. Make sane-backends support buttons that scanbuttond-backends support.

that would be the best choice, since I have no real plans to support the 
scanbuttond backends.

   2. When using scanbuttond-backends, fix loading firmware on USB insert.

what I could imagine is to fix this problem with a special 
shell-callback, when scanbd detects a device inserion / removal.

 Please correct me if I'm wrong here.

 --
 Wilhelm
 w.meier at unix.net mailto:w.meier at unix.net




-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd daemon does not load firmware

2013-08-29 Thread Wilhelm
Am 29.08.2013 15:33, schrieb Wilhelm:
 Hi Ilja,

 Am 29.08.2013 15:25, schrieb Ilya V. Ivanchenko:
 Hi Wilhelm,

 **is there a special reason using the (old) scanbuttond-backends and not
 sane-backends?
 I first tried sane-backends, and apparently it does not read the buttons
 for Epson GT-1500.

 did you use the epkowa backend? The sane-support-page says, that this
 backend supports most features of the GT-1500.

 I tried various things with sane-backends, but
 scanimage -A gives no button options and it was very unclear how to
 patch sane-backends or even where to start. So I quickly gave up and
 moved to scanbuttond-backends where it was easy to figure out a patch
 and it worked right away. I'd be glad if sane backend worked, but even
 Epson's iscan does not support buttons (seemingly on any of their
 scanners).

 If you plugin / poweron the scanner for the first time, who does the
 firmware get loaded in this case?
 Good question. Now retracing my steps backwards, I think I got
 iscan+sane to load the drivers the very first time and I did not notice
 this problem. When I tested things, I always used scanimage -L as a
 quick test, and it pulled the string up to the firmware loading (at
 which moment scanner clearly does a whizz sound moving the head in its
 POST). It appears to me that scanbd somehow misses calling the firmware
 load on USB insert (before reading buttons), but does it on scanimage
 -L. Perhaps it is due to the use of scanbuttond-backends and not
 sane-backends.

 So my current conclusions are that there are two potential issues to fix:
   1. Make sane-backends support buttons that scanbuttond-backends
 support.

 that would be the best choice, since I have no real plans to support the
 scanbuttond backends.

   2. When using scanbuttond-backends, fix loading firmware on USB insert.

 what I could imagine is to fix this problem with a special
 shell-callback, when scanbd detects a device inserion / removal.

Forgot to say: would you like to write a patch for that? I will provide 
you with the neccessary info to do that. Shouldn't be too much work ;-)


 Please correct me if I'm wrong here.

 --
 Wilhelm
 w.meier at unix.net mailto:w.meier at unix.net






-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd daemon does not load firmware

2013-08-29 Thread Wilhelm
Am 29.08.2013 15:52, schrieb Ilya V. Ivanchenko:
 Hi Wilhelm,

  is there a special reason using the (old) scanbuttond-backends and not
  sane-backends?
   I first tried sane-backends, and apparently it does not read the buttons
   for Epson GT-1500.
  
  did you use the epkowa backend? The sane-support-page says, that this
  backend supports most features of the GT-1500.
 Yes, epkowa is the backend used in the current configuration. I had
 problems of getting buttons to work with sane, but now retracing back it
 may be due to sane configuration needing epson2 (would not work with
 epkowa for some reason), and switching to scanbd needing epkowa (would
 not work with epson2).

 I just tried scanimage -A again and found --monitor-button option
 there, but scanimage -h does not have button options (except
 --wait-for-button). Can you suggest what commands I should use to test
 the buttons from command line?

   So my current conclusions are that there are two potential issues to
 fix:
1. Make sane-backends support buttons that scanbuttond-backends
 support.
  
  that would be the best choice, since I have no real plans to support the
  scanbuttond backends.
 I guess I could try sane-backends again to see if I can make the buttons
 work with epkowa backend.

2. When using scanbuttond-backends, fix loading firmware on USB insert.
  
  what I could imagine is to fix this problem with a special
  shell-callback, when scanbd detects a device inserion / removal.
 This is in the nutshell how I patched the problem from udev.

yes, but you had to stop / restart the scanbd and that's more a 
workaround than a solution ...


 --
 Ilya


-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd daemon does not load firmware

2013-08-29 Thread Wilhelm
Am 29.08.2013 16:03, schrieb Ilya V. Ivanchenko:
   2. When using scanbuttond-backends, fix loading firmware on USB insert.

 what I could imagine is to fix this problem with a special
 shell-callback, when scanbd detects a device inserion / removal.

Forgot to say: would you like to write a patch for that? I will provide
you with the neccessary info to do that. Shouldn't be too much work ;-)

 Not a problem. I'm a software/systems engineer, so I know what I (will
 be) doing. Only I have short window before I leave for a business trip.

I just marked the code with four place to insert code to start such a 
callback:

// TODO: call the device insertion / removal callback

(if you use qtcreator you'll quickly find them)


I'm looking forward to your patches ;-)


2. When using scanbuttond-backends, fix loading firmware on USB insert.
  
  what I could imagine is to fix this problem with a special
  shell-callback, when scanbd detects a device inserion / removal.
 This is in the nutshell how I patched the problem from udev.

yes, but you had to stop / restart the scanbd and that's more a
workaround than a solution ...

 I agree.

 --
 Ilya


-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd daemon does not load firmware

2013-08-28 Thread Wilhelm
Hello,

Am 28.08.2013 07:11, schrieb Ilya V. Ivanchenko:
 I created a neat setup using xinet + scanbd service + scanbd daemon (for
 buttons) + sane (client) to use Epson GT-1500 (with ADF) as a workhorse
 of a network scanner, with scanner buttons hooked to various jobs.
 Everything is working great, except...

 I encountered a problem after the scanner is powered off and then on
 again. The buttons service (scanbd daemon) stops reading the buttons and
 keeps getting communication error in the syslog.

that shouldn't happen. Normally, scanbd gets via udev | hal | dbus a 
device-removed event and then abandones the device until it gets plugged 
in again.

So, please show the syslog from beginning of the scanbd log messages and 
in the situation when the device is removed.

And please: how did you configure / compile, which platform, ...

 I tried various things until it occurred to me that Epson GT-1500 uses
 iscan plugin that loads firmware file (/usr/share/iscan/esfw86.bin) and
 the power off-on resets the scanner and thus wipes out the firmware. It
 seems like scanbd daemon does not load the firmware when the scanner is
 powered back on (at least I was not able to find how to configure it to
 do so), and it gets into trouble trying to read the buttons from device
 without its firmware.

This seems to be a consequence of the above failure: the device isn't 
closed correctly and not reopened therefore. So the firmware isn't 
loaded again (should be done on device opening).


 I have few questions to scanbd team:

 1. Can scanbd daemon automatically load firmware file and what should be
 done in the config files to achieve that? sane config files seem to have
 firmware option, but I don't see anything in scanbd documentation.

as stated above: should be done on openeing the device


 2. If scanbd daemon currently cannot load the firmware, are there any
 plans to add this feature?

see above


 3. If not, what is the recommended way to set scanbd up so it will work
 with scanners that require firmware to be loaded?

see above


 I spent few hours and came up with the following rework using udev rule
 that invokes scanimage -L command to pull the command chain that loads
 the firmware. It works fine and I have not seen communication error since.

 A. Create a script that causes firmware to be loaded (I'm open to other
 methods, but scanimage -L is the only I found so far)
 sudo tee /etc/scanbd/scanner.d/on_insert.sh  /dev/null  CATEOF
 #! /bin/bash
 logger=/usr/bin/logger -t scanbd
 $logger Loading firmware for $1
 /usr/sbin/service scanbd stop 21 /dev/null
 /usr/bin/scanimage -L 21 | $logger
 /usr/sbin/service scanbd start 21 /dev/null
 $logger Done loading firmware for $1
 CATEOF
 sudo chmod a+x /etc/scanbd/scanner.d/on_insert.sh

 B. Create udev rule to call the above script.
 sudo tee /etc/udevd/rules.d/98-epson.rules  /dev/null  CATEOF
 # Force firmware load for EPSON GT-1500
 ACTION==add, ENV{DEVTYPE}==usb_device, ATTRS{idVendor}==04b8,
 ATTRS{idProduct}==0133, RUN+=/etc/scanbd/scanner.d/on_insert.sh %p
 CATEOF





-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd with old udev version

2013-08-25 Thread Wilhelm
Am 24.08.2013 15:55, schrieb Sander Devrieze:
 2013/8/22 Sander Devrieze s.devrieze at gmail.com
 mailto:s.devrieze at gmail.com

 snip
 I got a bit further this evening:

 1) saned not running + /usr/local/sbin/scanbm  sleep 1 
 SANE_CONFIG_DIR=/usr/local/etc/scanbd/ scanimage -L -- found
 2) saned not running +/usr/local/sbin/scanbm  sleep 1  scanimage
 -L -- not found
 3) saned running + scanimage -L -- not found
 4) saned running + SANE_CONFIG_DIR=/usr/local/etc/scanbd/ scanimage
 -L -- found

 What to try next?

 Please note I also still getting this error as in the beginning:

 libudev: udev_monitor_enable_receiving: bind failed: Operation not
 permitted
 /usr/local/sbin/scanbd: Can't enable udev receiving
 /usr/local/sbin/scanbd: Can't init udev


 Ok, I got everything working as it should. It came out the permissions
 in /usr/local/etc/scanbd/saned.conf had to be fixed.

Can you describe what the problem was? Which permission do you mean? Or 
do you mean the access-list?

 Maybe some note can
 be added to the documentation?

do you feel the paragraph for saned isn't sufficient?


 In attachment you can find my action script which is based on some GPL
 script I found. Same license applies. For sending the emails, I suggest
 installing ssmtp if you do not want to setup your own mailserver.

Thank you. Will put this into the contrib dir.

-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd with old udev version

2013-08-25 Thread Wilhelm
Am 25.08.2013 11:41, schrieb Wilhelm:
 Am 24.08.2013 15:55, schrieb Sander Devrieze:
 2013/8/22 Sander Devrieze s.devrieze at gmail.com
 mailto:s.devrieze at gmail.com

 snip
 I got a bit further this evening:

 1) saned not running + /usr/local/sbin/scanbm  sleep 1 
 SANE_CONFIG_DIR=/usr/local/etc/scanbd/ scanimage -L -- found
 2) saned not running +/usr/local/sbin/scanbm  sleep 1  scanimage
 -L -- not found
 3) saned running + scanimage -L -- not found
 4) saned running + SANE_CONFIG_DIR=/usr/local/etc/scanbd/ scanimage
 -L -- found

 What to try next?

 Please note I also still getting this error as in the beginning:

 libudev: udev_monitor_enable_receiving: bind failed: Operation not
 permitted
 /usr/local/sbin/scanbd: Can't enable udev receiving
 /usr/local/sbin/scanbd: Can't init udev


 Ok, I got everything working as it should. It came out the permissions
 in /usr/local/etc/scanbd/saned.conf had to be fixed.

 Can you describe what the problem was? Which permission do you mean? Or
 do you mean the access-list?

 Maybe some note can
 be added to the documentation?

 do you feel the paragraph for saned isn't sufficient?

ohm just found a typo in the documentation ... it must read saned.conf 
instead of net.conf !



 In attachment you can find my action script which is based on some GPL
 script I found. Same license applies. For sending the emails, I suggest
 installing ssmtp if you do not want to setup your own mailserver.

 Thank you. Will put this into the contrib dir.



-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd with old udev version

2013-08-22 Thread Wilhelm
Am 21.08.2013 23:27, schrieb Sander Devrieze:
 2013/8/21 Wilhelm wilhelm.meier at fh-kl.de mailto:wilhelm.meier at 
 fh-kl.de

 Am 21.08.2013 16:04, schrieb Sander Devrieze:

 2013/8/21 Wilhelm wilhelm.meier at fh-kl.de
 mailto:wilhelm.meier at fh-kl.de mailto:wilhelm.meier at fh-kl.de
 mailto:wilhelm.meier at fh-kl.de


 snip

 Mmh, looks good.

 So, if scanimage finds the scanner (started with the uid/gid as in
 scanbd.conf), scanbd should find it too, if started as root and the
 env-var SANE_CONFIG_DIR set.


 Scanimage does not find the scanner right now. It did only find the
 scanner when not using the net backend os sane.

That's ok. For a desktop machine using scanbd and local scanning apps 
(like scanimage), scanbd / scanbm must be running. Please read 0.1) 
solution from the README.txt: scanbm acts as a proxy for saned.

 In that case, the
 genesys backend was immediately chosen. What else can I try?

The below log shows, that scanbd recognizes the scanner and his options. 
So now you have to figure out which buttons correlate to which option 
value changes: just press a button and watch the log. Then you can tweak 
the scripts for the button actions.


 Line in /etc/passwd
 saned:x:104:109::/home/saned:/bin/false

 This uid and gid do match with scandb:

 /usr/local/sbin/scanbd: foreground
 /usr/local/sbin/scanbd: config-file: /usr/local/etc/scanbd/scanbd.conf
 /usr/local/sbin/scanbd: reading config file
 /usr/local/etc/scanbd/scanbd.conf
 /usr/local/sbin/scanbd: debug on: level: 7
 /usr/local/sbin/scanbd: dropping privs to uid saned
 /usr/local/sbin/scanbd: dropping privs to gid saned
 /usr/local/sbin/scanbd: drop privileges to gid: 109
 /usr/local/sbin/scanbd: Running as effective gid 109
 /usr/local/sbin/scanbd: drop privileges to uid: 104
 /usr/local/sbin/scanbd: Running as effective uid 104
 /usr/local/sbin/scanbd: dbus_init
 /usr/local/sbin/scanbd: dbus match
 type='signal',interface='org.freedesktop.Hal.Manager'
 /usr/local/sbin/scanbd: sane version 1.0
 /usr/local/sbin/scanbd: Scanning for local-only devices
 /usr/local/sbin/scanbd: found device: genesys:libusb:001:005 Canon LiDE
 110 flatbed scanner
 /usr/local/sbin/scanbd: start_sane_threads
 /usr/local/sbin/scanbd: Starting poll thread for genesys:libusb:001:005
 /usr/local/sbin/scanbd: sane_poll
 /usr/local/sbin/scanbd: Thread started for device genesys:libusb:001:005
 /usr/local/sbin/scanbd: start dbus thread
 /usr/local/sbin/scanbd: timeout: 500 ms
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: udev init
 /usr/local/sbin/scanbd: get udev monitor
 libudev: udev_monitor_enable_receiving: bind failed: Operation not permitted
 /usr/local/sbin/scanbd: Can't enable udev receiving
 /usr/local/sbin/scanbd: Can't init udev
 /usr/local/sbin/scanbd: found 41 options for device genesys:libusb:001:005
 /usr/local/sbin/scanbd: sane_find_matching_options
 /usr/local/sbin/scanbd: found 5 actions in section (null)



-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd with old udev version

2013-08-22 Thread Wilhelm
Am 22.08.2013 08:58, schrieb Sander Devrieze:
 2013/8/22 Wilhelm wilhelm.meier at fh-kl.de mailto:wilhelm.meier at 
 fh-kl.de

 Am 21.08.2013 23:27, schrieb Sander Devrieze:

 2013/8/21 Wilhelm wilhelm.meier at fh-kl.de
 mailto:wilhelm.meier at fh-kl.de mailto:wilhelm.meier at fh-kl.de
 mailto:wilhelm.meier at fh-kl.de__

  Am 21.08.2013 16:04, schrieb Sander Devrieze:

  2013/8/21 Wilhelm wilhelm.meier at fh-kl.de
 mailto:wilhelm.meier at fh-kl.de
  mailto:wilhelm.meier at fh-kl.de
 mailto:wilhelm.meier at fh-kl.de__
 mailto:wilhelm.meier at fh-kl.de mailto:wilhelm.meier at fh-kl.de

  mailto:wilhelm.meier at fh-kl.de
 mailto:wilhelm.meier at fh-kl.de__


 snip

  Mmh, looks good.

  So, if scanimage finds the scanner (started with the
 uid/gid as in
  scanbd.conf), scanbd should find it too, if started as root
 and the
  env-var SANE_CONFIG_DIR set.


 Scanimage does not find the scanner right now. It did only find the
 scanner when not using the net backend os sane.


 That's ok. For a desktop machine using scanbd and local scanning
 apps (like scanimage), scanbd / scanbm must be running. Please read
 0.1) solution from the README.txt: scanbm acts as a proxy for saned.


 In that case, the
 genesys backend was immediately chosen. What else can I try?


 The below log shows, that scanbd recognizes the scanner and his
 options. So now you have to figure out which buttons correlate to
 which option value changes: just press a button and watch the log.
 Then you can tweak the scripts for the button actions.


 This is the current status:
 1) saned not running + scanbd not running + scanimage -L -- scanner found

this is not intended to work: scanimage should use the net backend and 
if saned isn't running it shouldn't work

 2) saned not running + scanbd running + manually running scanbm -- the
 logs show scanbd is interrupted for a short moment

ok

 3) saned not running + scanbd running + scanimage -L -- scanner *not* found

 Why is case #3 not working?

Presumably, scanimage is using the wrong dll.conf.

-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd with old udev version

2013-08-21 Thread Wilhelm
Hi Sander,

Am 21.08.2013 00:40, schrieb Sander Devrieze:
 Hello,

 I am trying to convert a WD MyBook into a scanner server. Sane detects
 the scanner and I was able to scan, but I cannot get scanbd to work.

Which options did you use for configure?


 May this be related to the fact that I am using a *very* old udev
 version (0.125-7+lenny3) which cannot be upgraded?

On Lenny you should try usind hal instead of udev. But this is only 
resonsible for detecting removable devices. As a fallback scanbd can be 
signaled (using some udev-rule, e.g.), please check the docu.

 Check the debug
 output below. How can I get scanbd running on my system?

First of all scanbd doesn't detect any scanner. There may be various 
reasons. But most likely scanbd uses a wrong dll.conf.

Did you
export SANE_CONFIG_DIR=/usr/local/etc/scanbd ?

please show your configs:

/etc/sane/dll.conf
/usr/local/sbin/scanbd/dll.conf
/usr/local/etc/scanbd/scanbd.conf

and show the env-vars for the user starting the scanbd (root).



 Thanks for helping me out!

 /usr/local/sbin/scanbd: foreground
 /usr/local/sbin/scanbd: config-file: /usr/local/etc/scanbd/scanbd.conf
 /usr/local/sbin/scanbd: reading config file
 /usr/local/etc/scanbd/scanbd.conf
 /usr/local/sbin/scanbd: debug on: level: 7
 /usr/local/sbin/scanbd: dropping privs to uid saned
 /usr/local/sbin/scanbd: dropping privs to gid saned
 /usr/local/sbin/scanbd: drop privileges to gid: 109
 /usr/local/sbin/scanbd: Running as effective gid 109
 /usr/local/sbin/scanbd: drop privileges to uid: 104
 /usr/local/sbin/scanbd: Running as effective uid 104
 /usr/local/sbin/scanbd: dbus_init
 /usr/local/sbin/scanbd: dbus match
 type='signal',interface='org.freedesktop.Hal.Manager'
 /usr/local/sbin/scanbd: sane version 1.0
 /usr/local/sbin/scanbd: Scanning for local-only devices
 /usr/local/sbin/scanbd: start_sane_threads
 /usr/local/sbin/scanbd: start dbus thread
 /usr/local/sbin/scanbd: timeout: 500 ms
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: udev init
 /usr/local/sbin/scanbd: get udev monitor
 libudev: udev_monitor_enable_receiving: bind failed: Operation not permitted
 /usr/local/sbin/scanbd: Can't enable udev receiving
 /usr/local/sbin/scanbd: Can't init udev
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: Iteration on dbus call

 --
 Kind Regards,
 Sander Devrieze




-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd with old udev version

2013-08-21 Thread Wilhelm
Am 21.08.2013 07:56, schrieb Sander Devrieze:
 2013/8/21 Wilhelm wilhelm.meier at fh-kl.de mailto:wilhelm.meier at 
 fh-kl.de

 Hi Sander,

 Am 21.08.2013 00:40, schrieb Sander Devrieze:

 Hello,

 I am trying to convert a WD MyBook into a scanner server. Sane
 detects
 the scanner and I was able to scan, but I cannot get scanbd to work.


 Which options did you use for configure?


 None, I just did a plain ./configure.



 May this be related to the fact that I am using a *very* old udev
 version (0.125-7+lenny3) which cannot be upgraded?


 On Lenny you should try usind hal instead of udev. But this is only
 resonsible for detecting removable devices. As a fallback scanbd can
 be signaled (using some udev-rule, e.g.), please check the docu.


 I am running Debian Squeeze. Only the udev package is from Lenny. This
 is needed because otherwise the special MyBook Linux kernel will not boot.


 Check the debug
 output below. How can I get scanbd running on my system?


 First of all scanbd doesn't detect any scanner. There may be various
 reasons. But most likely scanbd uses a wrong dll.conf.

 Did you
 export SANE_CONFIG_DIR=/usr/local/etc/scanbd ?


 Yes, and I also run scanbd like this to be sure:
 /usr/local/sbin/scanbd -d7 -f -c /usr/local/etc/scanbd/scanbd.conf

 When running scanbm, one of the lines reads like this:

 scanbm: Setting environment: SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d


 please show your configs:

 /etc/sane/dll.conf


 # /etc/sane.d/dll.conf - Configuration file for the SANE dynamic backend
 loader
 #
 # Backends can also be enabled by configuration snippets under
 # /etc/sane.d/dll.d directory -- packages providing backends should drop
 # a config file similar to dll.conf in this directory, named after the
 package.
 #

 # The next line enables the network backend; comment it out if you don't
 need
 # to use a remote SANE scanner over the network - see sane-net(5) and
 saned(8)
 net
 #abaton
 #agfafocus
 #apple
 snip all lines commented out below this

 /usr/local/sbin/scanbd/dll.__conf


what is the contents of this file?




 Ok, that seems to help. Maybe the readme file should be more clear that
 you need to copy the config files and not the directory sane.d in
 here. scanbd seems to work. However, sane does not recognize the scanner:

 scanimage: no SANE devices found

 Any idea what can be wrong?

 /usr/local/etc/scanbd/scanbd.__conf


 # global settings
 global {
  # turn on debugging

  # log to console
  debug   = true

  # debug logging
  # 1=error, 2=warn, 3=info, 4-7=debug
  debug-level = 7

  # drop priviliges to this user
  #=
  # Linux:
  # user= saned # root
  # *BSD
  # user= root
  user= saned

  # Group to be used
  #=
  # Linux (most distributions use the lp group to access scanners)
  # group   = lp
  # ArchLinux (ArchLinux uses the scanner group)
  # group = scanner
  #
  # *BSD (no group lp here, use daemon instead)
  # group   = daemon # root
  #
  group   = saned
  # the saned executable for manager-mode
  saned   = /usr/sbin/saned
  saned_opt  = {} # string-list
  saned_env  = { SANE_CONFIG_DIR=/usr/local/etc/scanbd } # list
 of environment vars for saned

  # Scriptdir specifies where scanbs normally looks for scripts.
  # The scriptdir option can be defined as:
  #   - a path relative to the configuations (path/etc/scanbd)
 directory
  #   - an abosolute path
  # Examples:
  # scriptdir = scripts
  # sets scriptdir to path/etc/scripts.
  # scriptdir = /some/path
  # sets scriptdir to the specified absolute path
  # Default scriptdir is path/etc/scanbd, this is normally
 appropriate
  # scriptdir =

  # scanbuttond_backends_dir sets the path where scanbd looks for
 the scanbuttond backends
  # It can be defined as relative path, starting from the scanbd
 config directory or
  # as an absolute path
  # Default is libdir/scanbd/scanbutond/backends
  # Example
  # scanbuttond_backends_dir =
 /usr/local/lib/scanbd/scanbuttond/backends

  # poll timeout in [ms]
  # (for polling the devices)
  timeout = 500

  pidfile = /var/run/scanbd.pid

  # env-vars for the scripts
  environment {
  # pass the device label as below in this env-var
  device = SCANBD_DEVICE
  # pass the action label as below in this env-var
  action = SCANBD_ACTION
  }

  # function definitions
  # values of the options

[sane-devel] scanbd with old udev version

2013-08-21 Thread Wilhelm
Am 21.08.2013 12:19, schrieb Sander Devrieze:
 2013/8/21 Wilhelm wilhelm.meier at fh-kl.de mailto:wilhelm.meier at 
 fh-kl.de

 snip


  /usr/local/sbin/scanbd/dll.conf



 what is the contents of this file?


 The directory /usr/local/sbin/scanbd does not exist. I think you mean
 /usr/local/etc/scanbd.

Sorry, yes.

So please show:

/etc/sane.d/dll.conf

and

/usr/local/etc/scanbd/dll.conf

or whatever dir SANE_CONFIG_DIR points to.

Please see section: 6) sane config, form the README.txt.

 These are the items in that directory:

 abaton.conf bh.conf coolscan3.conf dll.d
   genesys.conf hp.conf   ma1509.confmustek_usb.conf
 plustek_pp.conf  scanbd.conf st400.conftest.script
 action.script canon630u.conf  coolscan.conf dmc.conf
   geniusvp2.conf  hpsj5s.conf   magicolor.confnec.conf
   qcam.conf  scanner.d stv680.confu12.conf
 agfafocus.conf canon.conf  dc210.conf
   epjitsu.conf gphoto2.conf hs2p.conf matsushita.conf
 net.conf ricoh.conf  sceptre.conf tamarack.conf
 umax1220u.conf
 apple.conf canon_dr.conf   dc240.conf epson2.conf
   gt68xx.conf ibm.conf  microtek2.confp5.conf
   rts8891.conf  sharp.conf teco1.confumax.conf
 artec.conf canon_pp.conf   dc25.conf epson.conf
   hp3900.conf kodak.confmicrotek.confpie.conf
   s9036.conf  sm3840.conf teco2.confumax_pp.conf
 artec_eplus48u.conf  cardscan.conf   dell1600n_net.conf  example.script
 hp4200.conf leo.conf  mustek.confpixma.conf
   saned.conf  snapscan.conf  teco3.confv4l.conf
 avision.conf coolscan2.conf  dll.conf fujitsu.conf
   hp5400.conf lexmark.conf  mustek_pp.confplustek.conf
   scanadf.script   sp15c.conf test.confxerox_mfp.conf

 Which one do you need to see? I already showed you dll.conf.



 Ok, that seems to help. Maybe the readme file should be more
 clear that
 you need to copy the config files and not the directory sane.d in
 here. scanbd seems to work. However, sane does not recognize the
 scanner:

 scanimage: no SANE devices found

 Any idea what can be wrong?

  /usr/local/etc/scanbd/scanbd.conf


 This file does not exist. I only have /usr/local/etc/scanbd/scanbd.conf
 as shown in my previous mail:


 # global settings
 global {
   # turn on debugging

   # log to console
   debug   = true

   # debug logging
   # 1=error, 2=warn, 3=info, 4-7=debug
   debug-level = 7

   # drop priviliges to this user
   #=
   # Linux:
   # user= saned # root
   # *BSD
   # user= root
   user= saned

   # Group to be used
   #=
   # Linux (most distributions use the lp group to access
 scanners)
   # group   = lp
   # ArchLinux (ArchLinux uses the scanner group)
   # group = scanner
   #
   # *BSD (no group lp here, use daemon instead)
   # group   = daemon # root
   #
   group   = saned
   # the saned executable for manager-mode
   saned   = /usr/sbin/saned
   saned_opt  = {} # string-list
   saned_env  = {
 SANE_CONFIG_DIR=/usr/local/__etc/scanbd } # list
 of environment vars for saned

   # Scriptdir specifies where scanbs normally looks for
 scripts.
   # The scriptdir option can be defined as:
   #   - a path relative to the configuations
 (path/etc/scanbd)
 directory
   #   - an abosolute path
   # Examples:
   # scriptdir = scripts
   # sets scriptdir to path/etc/scripts.
   # scriptdir = /some/path
   # sets scriptdir to the specified absolute path
   # Default scriptdir is path/etc/scanbd, this is normally
 appropriate
   # scriptdir =

   # scanbuttond_backends_dir sets the path where scanbd
 looks for
 the scanbuttond backends
   # It can be defined as relative path, starting from
 the scanbd
 config directory or
   # as an absolute path
   # Default is libdir/scanbd/scanbutond/__backends
   # Example
   # scanbuttond_backends_dir =
 /usr/local/lib/scanbd/__scanbuttond/backends

   # poll timeout in [ms

[sane-devel] scanbd problem with dbus permission ?

2013-08-21 Thread Wilhelm
Am 20.08.2013 20:54, schrieb Wilhelm:
 Am 20.08.2013 18:17, schrieb Michael Markusch:
 Hi Wilhelm,

 thanks for your answer.

 I followed your notes but it still does not work.

 sad but true ;-)

 Looks like scanbd uses the wrong dll.conf, did you
 export SANE_CONFIG_DIR=/usr/local/etc/scanbd ?

 please show your configs:

 /etc/sane/dll.conf
 /usr/local/sbin/scanbd/dll.conf

Sorry, I meant:

/usr/local/etc/scanbd/dll.conf

 /usr/local/etc/scanbd/scanbd.conf

 and show the env-vars for the user starting the scanbd (root).


 - make distclean
 - ./configure
 - make
 - set in /usr/local/sbin/scanbd/dll.confonly genesys
 - sudo /usr/local/sbin/scanbd -d -f -c /usr/local/etc/scanbd/scanbd.conf

 /usr/local/sbin/scanbd: debug on: level: 7
 /usr/local/sbin/scanbd: dropping privs to uid saned
 /usr/local/sbin/scanbd: dropping privs to gid lp
 /usr/local/sbin/scanbd: drop privileges to gid: 7
 /usr/local/sbin/scanbd: Running as effective gid 7
 /usr/local/sbin/scanbd: drop privileges to uid: 112
 /usr/local/sbin/scanbd: Running as effective uid 112
 /usr/local/sbin/scanbd: dbus_init
 /usr/local/sbin/scanbd: dbus match
 type='signal',interface='org.freedesktop.Hal.Manager'
 /usr/local/sbin/scanbd: sane version 1.0
 /usr/local/sbin/scanbd: Scanning for local-only devices
 /usr/local/sbin/scanbd: start_sane_threads
 /usr/local/sbin/scanbd: start dbus thread
 /usr/local/sbin/scanbd: udev init
 /usr/local/sbin/scanbd: get udev monitor
 /usr/local/sbin/scanbd: timeout: 500 ms
 /usr/local/sbin/scanbd: udev fd is non-blocking, now setting to
 blocking mode
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: start udev thread
 /usr/local/sbin/scanbd: udev thread started
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: Iteration on dbus call
 ...

 What else can I try?

 Thanks,
 Michael


 Am 20.08.2013 07:50, schrieb Wilhelm:
 Hi Michael,

 Am 18.08.2013 14:33, schrieb Michael Markusch:
 Hi,

 I tried to install scanbd and I guess that's very easy, but now I
 have a
 permission problem. In the past I use my scanner with sane as
 scanserver
 and everything worked.

 My system:
 Debian Wheezy, Kernel 3.6.11 on Raspberry Pi

 Scanner:
 Canon canoscan lide 35


 Here my installation steps:

 - install libconfuse-dev libsane-dev libudev-dev libusb-dev
 - I use scanbd from SVN
 - ./configure --enable-scanbuttond (no problems)

 why did you enable scanbuttond-drivers. Your scanner should be fully
 supported by the sane-backends (and as you said, scanimage is working)

 - make (no problems)
 - make install (no problems)
 - copy scanbd_dbus.conf to /etc/dbus-1/system.d/
 - install xinetd
 - generate /etc/xinetd.d/sane-port
 - edit /etc/sane.d/dll.conf set only net
 - edit /usr/local/etc/scanbd/dll.conf set #net

 be sure to include the backend for your scanner

 - edit /etc/sane.d/net.conf set localhost and connect_timeout = 60
 - copy backends /etc/sane.d/ to /usr/local/etc/scanbd/
 - export SANE_CONFIG_DIR=/usr/local/etc/scanbd
 - /usr/local/sbin/scanbd -d -f -c /usr/local/etc/scanbd/scanbd.conf
 (with problems)

 Log:

 /usr/local/sbin/scanbd: debug on: level: 7
 /usr/local/sbin/scanbd: dropping privs to uid saned
 /usr/local/sbin/scanbd: dropping privs to gid lp
 /usr/local/sbin/scanbd: drop privileges to gid: 7
 /usr/local/sbin/scanbd: Can't set the effective gid to 7
 /usr/local/sbin/scanbd: drop privileges to uid: 112
 /usr/local/sbin/scanbd: Can't set the effective uid to 112

 If you start scanbd as unprivileged user it isn't possible to changed
 the euid/egid. Start it as root and it will itself change the euid /
 egid to the ones in the config file.

 /usr/local/sbin/scanbd: dbus_init
 /usr/local/sbin/scanbd: dbus match
 type='signal',interface='org.freedesktop.Hal.Manager'
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/meta.so
 /usr/local/sbin/scanbd: meta-backend: init
 /usr/local/sbin/scanbd: libusbi: initializing...
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/hp3500.so
 /usr/local/sbin/scanbd: meta-backend: attaching backend: HP3500 USB
 /usr/local/sbin/scanbd: hp3500-backend: init
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/snapscan.so
 /usr/local/sbin/scanbd: meta-backend: attaching backend: Snapscan USB
 /usr/local/sbin/scanbd: snapscan-backend: init
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/niash.so
 /usr/local/sbin/scanbd: meta-backend: attaching backend: Niash USB
 /usr/local/sbin/scanbd: niash-backend: init
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/epson_vphoto.so
 /usr/local/sbin/scanbd: meta-backend: attaching backend: Epson VX00
 Photo USB
 /usr/local/sbin/scanbd: epson-vphoto-backend: init
 /usr/local/sbin/scanbd: Scanning for local-only devices
 /usr/local/sbin/scanbd: Can't get the scbtn device list

[sane-devel] scanbd with old udev version

2013-08-21 Thread Wilhelm
Am 21.08.2013 16:04, schrieb Sander Devrieze:
 2013/8/21 Wilhelm wilhelm.meier at fh-kl.de mailto:wilhelm.meier at 
 fh-kl.de

 Am 21.08.2013 12:19, schrieb Sander Devrieze:

 2013/8/21 Wilhelm wilhelm.meier at fh-kl.de
 mailto:wilhelm.meier at fh-kl.de mailto:wilhelm.meier at fh-kl.de
 mailto:wilhelm.meier at fh-kl.de__

  snip


   /usr/local/sbin/scanbd/dll.__conf




  what is the contents of this file?


 The directory /usr/local/sbin/scanbd does not exist. I think you
 mean
 /usr/local/etc/scanbd.


 Sorry, yes.

 So please show:

 /etc/sane.d/dll.conf


 # /etc/sane.d/dll.conf - Configuration file for the SANE dynamic backend
 loader
 #
 # Backends can also be enabled by configuration snippets under
 # /etc/sane.d/dll.d directory -- packages providing backends should drop
 # a config file similar to dll.conf in this directory, named after the
 package.
 #

 # The next line enables the network backend; comment it out if you don't
 need
 # to use a remote SANE scanner over the network - see sane-net(5) and
 saned(8)
 net
 #abaton
 snip commented out backends
 #microtek

 and

 /usr/local/etc/scanbd/dll.conf

 or whatever dir SANE_CONFIG_DIR points to.


 # /etc/sane.d/dll.conf - Configuration file for the SANE dynamic backend
 loader
 #
 # Backends can also be enabled by configuration snippets under
 # /etc/sane.d/dll.d directory -- packages providing backends should drop
 # a config file similar to dll.conf in this directory, named after the
 package.
 #

 # The next line enables the network backend; comment it out if you don't
 need
 # to use a remote SANE scanner over the network - see sane-net(5) and
 saned(8)
 #net
 abaton
 agfafocus
 apple
 avision
 artec
 artec_eplus48u
 as6e
 bh
 canon
 canon630u
 canon_dr
 #canon_pp
 cardscan
 coolscan
 #coolscan2
 coolscan3
 #dc25
 #dc210
 #dc240
 dell1600n_net
 dmc
 epjitsu
 #epson
 epson2
 fujitsu
 #gphoto2
 genesys
 gt68xx
 hp
 hp3900
 hpsj5s
 hp3500
 hp4200
 hp5400
 hp5590
 hpljm1005
 and so forth

Mmh, looks good.

So, if scanimage finds the scanner (started with the uid/gid as in 
scanbd.conf), scanbd should find it too, if started as root and the 
env-var SANE_CONFIG_DIR set.

-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd problem with dbus permission ?

2013-08-20 Thread Wilhelm
Hi Michael,

Am 18.08.2013 14:33, schrieb Michael Markusch:
 Hi,

 I tried to install scanbd and I guess that's very easy, but now I have a
 permission problem. In the past I use my scanner with sane as scanserver
 and everything worked.

 My system:
 Debian Wheezy, Kernel 3.6.11 on Raspberry Pi

 Scanner:
 Canon canoscan lide 35


 Here my installation steps:

 - install libconfuse-dev libsane-dev libudev-dev libusb-dev
 - I use scanbd from SVN
 - ./configure --enable-scanbuttond (no problems)

why did you enable scanbuttond-drivers. Your scanner should be fully 
supported by the sane-backends (and as you said, scanimage is working)

 - make (no problems)
 - make install (no problems)
 - copy scanbd_dbus.conf to /etc/dbus-1/system.d/
 - install xinetd
 - generate /etc/xinetd.d/sane-port
 - edit /etc/sane.d/dll.conf set only net
 - edit /usr/local/etc/scanbd/dll.conf set #net

be sure to include the backend for your scanner

 - edit /etc/sane.d/net.conf set localhost and connect_timeout = 60
 - copy backends /etc/sane.d/ to /usr/local/etc/scanbd/
 - export SANE_CONFIG_DIR=/usr/local/etc/scanbd
 - /usr/local/sbin/scanbd -d -f -c /usr/local/etc/scanbd/scanbd.conf
 (with problems)

 Log:

 /usr/local/sbin/scanbd: debug on: level: 7
 /usr/local/sbin/scanbd: dropping privs to uid saned
 /usr/local/sbin/scanbd: dropping privs to gid lp
 /usr/local/sbin/scanbd: drop privileges to gid: 7
 /usr/local/sbin/scanbd: Can't set the effective gid to 7
 /usr/local/sbin/scanbd: drop privileges to uid: 112
 /usr/local/sbin/scanbd: Can't set the effective uid to 112

If you start scanbd as unprivileged user it isn't possible to changed 
the euid/egid. Start it as root and it will itself change the euid / 
egid to the ones in the config file.

 /usr/local/sbin/scanbd: dbus_init
 /usr/local/sbin/scanbd: dbus match
 type='signal',interface='org.freedesktop.Hal.Manager'
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/meta.so
 /usr/local/sbin/scanbd: meta-backend: init
 /usr/local/sbin/scanbd: libusbi: initializing...
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/hp3500.so
 /usr/local/sbin/scanbd: meta-backend: attaching backend: HP3500 USB
 /usr/local/sbin/scanbd: hp3500-backend: init
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/snapscan.so
 /usr/local/sbin/scanbd: meta-backend: attaching backend: Snapscan USB
 /usr/local/sbin/scanbd: snapscan-backend: init
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/niash.so
 /usr/local/sbin/scanbd: meta-backend: attaching backend: Niash USB
 /usr/local/sbin/scanbd: niash-backend: init
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/epson_vphoto.so
 /usr/local/sbin/scanbd: meta-backend: attaching backend: Epson VX00
 Photo USB
 /usr/local/sbin/scanbd: epson-vphoto-backend: init
 /usr/local/sbin/scanbd: Scanning for local-only devices
 /usr/local/sbin/scanbd: Can't get the scbtn device list

your scanner isn't recognized by the old scanbuttond-backends. As said 
above please use the sane-backends

 /usr/local/sbin/scanbd: device list null
 /usr/local/sbin/scanbd: start_scbtn_threads
 /usr/local/sbin/scanbd: start the threads (0)
 /usr/local/sbin/scanbd: start dbus thread
 /usr/local/sbin/scanbd: Not Primary Owner (-1)
 /usr/local/sbin/scanbd: Name Error (Connection :1.48 is not allowed
 to own the service de.kmux.scanbd.server due to security policies in
 the configuration file)

 If I started scanbd as sudo:

 Log:

 ...
 /usr/local/sbin/scanbd: meta-backend: attaching backend: Epson VX00
 Photo USB
 /usr/local/sbin/scanbd: epson-vphoto-backend: init
 /usr/local/sbin/scanbd: Scanning for local-only devices
 /usr/local/sbin/scanbd: Can't get the scbtn device list
 /usr/local/sbin/scanbd: device list null
 /usr/local/sbin/scanbd: start_scbtn_threads
 /usr/local/sbin/scanbd: start the threads (0)
 /usr/local/sbin/scanbd: start dbus thread
 /usr/local/sbin/scanbd: timeout: 500 ms
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: Iteration on dbus call

 I tried also too:

 - SANE_CONFIG_DIR=/usr/local/etc/scanbd scanimage -L (with problems)
 - copy 99-saned.rules to /lib/udev/rules.d
 - udevadm trigger
 - SANE_CONFIG_DIR=/usr/local/etc/scanbd scanimage -L (with problems)
 - sudo SANE_CONFIG_DIR=/usr/local/etc/scanbd scanimage -L (no problems)


 I'm not familiar with dbus and so on... Can someone help me please?

Please do:

make distclean
./configure
make

and install it as above.
Then redo your tests.


-- 
Wilhelm
w.meier at unix.net



[sane-devel] scanbd problem with dbus permission ?

2013-08-20 Thread Wilhelm
Am 20.08.2013 18:17, schrieb Michael Markusch:
 Hi Wilhelm,

 thanks for your answer.

 I followed your notes but it still does not work.

sad but true ;-)

Looks like scanbd uses the wrong dll.conf, did you
export SANE_CONFIG_DIR=/usr/local/etc/scanbd ?

please show your configs:

/etc/sane/dll.conf
/usr/local/sbin/scanbd/dll.conf
/usr/local/etc/scanbd/scanbd.conf

and show the env-vars for the user starting the scanbd (root).


 - make distclean
 - ./configure
 - make
 - set in /usr/local/sbin/scanbd/dll.confonly genesys
 - sudo /usr/local/sbin/scanbd -d -f -c /usr/local/etc/scanbd/scanbd.conf

 /usr/local/sbin/scanbd: debug on: level: 7
 /usr/local/sbin/scanbd: dropping privs to uid saned
 /usr/local/sbin/scanbd: dropping privs to gid lp
 /usr/local/sbin/scanbd: drop privileges to gid: 7
 /usr/local/sbin/scanbd: Running as effective gid 7
 /usr/local/sbin/scanbd: drop privileges to uid: 112
 /usr/local/sbin/scanbd: Running as effective uid 112
 /usr/local/sbin/scanbd: dbus_init
 /usr/local/sbin/scanbd: dbus match
 type='signal',interface='org.freedesktop.Hal.Manager'
 /usr/local/sbin/scanbd: sane version 1.0
 /usr/local/sbin/scanbd: Scanning for local-only devices
 /usr/local/sbin/scanbd: start_sane_threads
 /usr/local/sbin/scanbd: start dbus thread
 /usr/local/sbin/scanbd: udev init
 /usr/local/sbin/scanbd: get udev monitor
 /usr/local/sbin/scanbd: timeout: 500 ms
 /usr/local/sbin/scanbd: udev fd is non-blocking, now setting to
 blocking mode
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: start udev thread
 /usr/local/sbin/scanbd: udev thread started
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: Iteration on dbus call
 /usr/local/sbin/scanbd: Iteration on dbus call
 ...

 What else can I try?

 Thanks,
 Michael


 Am 20.08.2013 07:50, schrieb Wilhelm:
 Hi Michael,

 Am 18.08.2013 14:33, schrieb Michael Markusch:
 Hi,

 I tried to install scanbd and I guess that's very easy, but now I have a
 permission problem. In the past I use my scanner with sane as scanserver
 and everything worked.

 My system:
 Debian Wheezy, Kernel 3.6.11 on Raspberry Pi

 Scanner:
 Canon canoscan lide 35


 Here my installation steps:

 - install libconfuse-dev libsane-dev libudev-dev libusb-dev
 - I use scanbd from SVN
 - ./configure --enable-scanbuttond (no problems)

 why did you enable scanbuttond-drivers. Your scanner should be fully
 supported by the sane-backends (and as you said, scanimage is working)

 - make (no problems)
 - make install (no problems)
 - copy scanbd_dbus.conf to /etc/dbus-1/system.d/
 - install xinetd
 - generate /etc/xinetd.d/sane-port
 - edit /etc/sane.d/dll.conf set only net
 - edit /usr/local/etc/scanbd/dll.conf set #net

 be sure to include the backend for your scanner

 - edit /etc/sane.d/net.conf set localhost and connect_timeout = 60
 - copy backends /etc/sane.d/ to /usr/local/etc/scanbd/
 - export SANE_CONFIG_DIR=/usr/local/etc/scanbd
 - /usr/local/sbin/scanbd -d -f -c /usr/local/etc/scanbd/scanbd.conf
 (with problems)

 Log:

 /usr/local/sbin/scanbd: debug on: level: 7
 /usr/local/sbin/scanbd: dropping privs to uid saned
 /usr/local/sbin/scanbd: dropping privs to gid lp
 /usr/local/sbin/scanbd: drop privileges to gid: 7
 /usr/local/sbin/scanbd: Can't set the effective gid to 7
 /usr/local/sbin/scanbd: drop privileges to uid: 112
 /usr/local/sbin/scanbd: Can't set the effective uid to 112

 If you start scanbd as unprivileged user it isn't possible to changed
 the euid/egid. Start it as root and it will itself change the euid /
 egid to the ones in the config file.

 /usr/local/sbin/scanbd: dbus_init
 /usr/local/sbin/scanbd: dbus match
 type='signal',interface='org.freedesktop.Hal.Manager'
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/meta.so
 /usr/local/sbin/scanbd: meta-backend: init
 /usr/local/sbin/scanbd: libusbi: initializing...
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/hp3500.so
 /usr/local/sbin/scanbd: meta-backend: attaching backend: HP3500 USB
 /usr/local/sbin/scanbd: hp3500-backend: init
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/snapscan.so
 /usr/local/sbin/scanbd: meta-backend: attaching backend: Snapscan USB
 /usr/local/sbin/scanbd: snapscan-backend: init
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/niash.so
 /usr/local/sbin/scanbd: meta-backend: attaching backend: Niash USB
 /usr/local/sbin/scanbd: niash-backend: init
 /usr/local/sbin/scanbd: Loading
 /usr/local/lib/scanbd/scanbuttond/backends/epson_vphoto.so
 /usr/local/sbin/scanbd: meta-backend: attaching backend: Epson VX00
 Photo USB
 /usr/local/sbin/scanbd: epson-vphoto-backend: init
 /usr/local/sbin/scanbd: Scanning for local-only devices
 /usr/local/sbin/scanbd: Can't get the scbtn device list

 your scanner isn't recognized by the old scanbuttond-backends. As said
 above please use the sane

[sane-devel] Scanner Button Daemon [scanbd]: release 1.3.1

2013-08-12 Thread Wilhelm
Hi all,

I like to announce the new version 1.3.1 of scanbd, the scanner button 
daemon.

This release is mostly a maintainers release (added support for scanbd 
with ArchLinux / ARM on BeagleBone).

http://sourceforge.net/projects/scanbd/files/releases/scanbd--1.3.1.zip/download

or

svn co https://scanbd.svn.sourceforge.net/svnroot/scanbd/releases/1.3.1

[
scanbd is a scanner button daemon. It polls the scanner buttons looking
for buttons pressed or function knob changes or other scanner events  as 
paper inserts / removals and at the same time allows
also scan-applications to access the scanners. If buttons are pressed,
etc., various actions can be submitted (scan, copy, email, ...) via 
action scripts. The function knob values are passed to the 
action-scripts as well. Scan actions are also signaled via dbus. This 
can be useful for foreign applications. Scans can also be triggered via 
dbus from foreign applications.
On platforms which support signaling of dynamic device insertion / 
removal (libudev, dbus, hal) scanbd supports this as well.
scanbd can use all sane-backends or some special backends from the (old) 
scanbuttond project.
Supported platforms: Linux (x86/ARM), FreeBSD, NetBSD, OpenBSD
]

-- 
Wilhelm
w.meier at unix.net



[sane-devel] genesys md6228: buttons supported?

2013-03-28 Thread Wilhelm
Am 27.03.2013 23:12, schrieb Dominik Kopp:
 Hi,

 does my scanner MD6228 (ID 0461:0377) support the hardware buttons?
 (probably equal to Medion MD 5345)

 Because the buttons (OCR, email, copy...) in skanlite as well as in xscan
 are grey.

If you like you can checkout

http://sourceforge.net/projects/scanbd

to poll the buttons and activate actions on button-presses.


 And scanimage -A shows:

 All options specific to device `genesys:libusb:004:003':
Scan Mode:
  --mode Color|Gray|Lineart [Gray]
  Selects the scan mode (e.g., lineart, monochrome, or color).

 ...

  than the vertical resolution this disables horizontal interpolation.
  --color-filter Red|Green|Blue [Green]
  When using gray or lineart this option selects the used color.
Sensors:
  --scan[=(yes|no)] [no] [hardware]
  Scan button
  --email[=(yes|no)] [no] [hardware]
  Email button
  --copy[=(yes|no)] [no] [hardware]
  Copy button
  --ocr[=(yes|no)] [no] [hardware]
  OCR button
  --power[=(yes|no)] [no] [hardware]
  Power button
Buttons:
  --clear-calibration
  Clear calibration cache

 

 Dominik




-- 
Wilhelm




[sane-devel] scanbd on Raspberry Pi Connection Failed system_bus_socket

2013-03-18 Thread Wilhelm
Am 18.03.2013 12:26, schrieb deigerwutz:
 Hello all

 I try to use a Rasperry Pi with Raspian Wheezy as a network scanner device.
 After I have installed /scanbd/ as described in the package-readme and some
 copying of files, I can use it in foreground with scanbd -f.
 The scanner is recognised an I can use scanner buttons as I want it.

Sounds good ;-)


 The problem is to load the daemon in background at system boot.
 The /var/log/syslog shows an error at starting up scanbd:
 Mar 18 10:27:18 raspberrypi scanbd: /usr/local/bin/scanbd: DBus connection
 error: Failed to connect to to socket /var/run/dbus/system_bus_socket: No
 such file or directory
 The scanbd gets started but does nothing.
 The missed file system_bus_socket exists in the meantioned directory. Its
 timestamp is equal to the log-entry (10:27:18)


 $ ps -ef |grep scan

 root 1729 1  0  10:27 ?00:00:00 /usr/local/bin/scanbd -c
 /usr/local/etc/scanbd/scanbd.conf


please show the file-mode bits



 Also it seams that the environment variable $SANE_CONFIG_DIR ist not set at
 boot because an echo-command prints an empty row.

can you track this down to where it happens?


 If I set the variable manually by using export export
 SANE_CONFIG_DIR=/usr/local/etc/scanbd I can run in background with scanbd -c
 /usr/local/etc/scanbd/scanbd.conf and everything runs as expected.

 Do I have something to change in boot process or with read permissions?

to place the init-script and add the run-level links should be enough ...


 Thanks in advance, guys.





 --
 View this message in context: 
 http://sane.10972.n7.nabble.com/scanbd-on-Raspberry-Pi-Connection-Failed-system-bus-socket-tp17350.html
 Sent from the SANE - Dev mailing list archive at Nabble.com.



-- 
Wilhelm




[sane-devel] scanbd Canon MG6250

2013-02-01 Thread Wilhelm
Am 01.02.2013 16:59, schrieb Matthias Thon:
 Hello,
 i've tried to use scanbd with my MG6200 Series device. He finds
 button-1 and button-2 option. But the value is still 0.

 I have try Scan - BlackWhite or Scan - Color.

 Is there a way to see more detailed the communication between scanbd and
 the device? (more then with debug level 7)

Please provide us with the logs and configs.

-- 
Wilhelm




[sane-devel] Scanner Button Daemon [scanbd] 1.3: parse error in config file

2013-01-20 Thread Wilhelm
Am 19.01.2013 18:54, schrieb Rolf Bensch:
 Hi Wilhelm,

 Yesterday I started with scanbd and my CS9000F.

 I mentioned an error with scanbd.conf:

 $ /usr/local/bin/scanbd -df -c /usr/local/etc/scanbd/scanbd.conf
 /usr/local/etc/scanbd/scanbd.conf:197: no such option 'include'
 /usr/local/bin/scanbd: parse error in config file

please provide us with the config file(s).


 As a workaround I copied the contents of pixma.conf into scanbd.conf.

 It could be nice to use the 'include' function. Configuration will be
 much easier to use prepared conf files. I'll provide my conf and script
 files to the ml when everything is working.

 Cheers,
 Rolf



 Am 06.01.2013 09:11, schrieb Wilhelm:
 Hi all,

 I like to announce the new version 1.3 of scanbd, the scanner button
 daemon.

 This release is mostly a maintainers release as it restructures the
 layout of the source repository and adds support for autotools /
 configure. This makes compilation / integration much more simple. More
 documentation and helpful integration files (like systemd-config or
 startup for FreeBSD e.g.) for various platforms are added.

 I would like to clearly mention that all the hard work was done by
 Louis Lagendijk (louis at fazant.net)! Many thanks for his efforts and his
 patience!

 http://sourceforge.net/projects/scanbd/files/releases/scanbd-1.3.tar.gz/download


 or

 svn co https://scanbd.svn.sourceforge.net/svnroot/scanbd/releases/1.3

 [
 scanbd is a scanner button daemon. It polls the scanner buttons looking
 for buttons pressed or function knob changes or other scanner events  as
 paper inserts / removals and at the same time allows
 also scan-applications to access the scanners. If buttons are pressed,
 etc., various actions can be submitted (scan, copy, email, ...) via
 action scripts. The function knob values are passed to the
 action-scripts as well. Scan actions are also signaled via dbus. This
 can be useful for foreign applications. Scans can also be triggered via
 dbus from foreign applications.
 On platforms which support signaling of dynamic device insertion /
 removal (libudev, dbus, hal) scanbd supports this as well.
 scanbd can use all sane-backends or some special backends from the (old)
 scanbuttond project.
 Supported platforms: Linux, FreeBSD, NetBSD, OpenBSD
 ]




-- 
Wilhelm




[sane-devel] Canon Pixma MP280: Error during device I/O

2013-01-13 Thread Wilhelm
Hi Lars,

Am 12.01.2013 19:37, schrieb Lars Noschinski:
 Hi everyone,

 I am trying to get an Canon Pixma MP280 to scan an image. I am using the
 sane-backends-1.0.23,
 (packaged for Ubuntu from
 https://launchpad.net/~nathan-renniewaldock/+archive/sane) on Ubuntu 12.04.
 The scanner is detected without a problem, but if I try to scan an
 image, scanimage returns Error during device I/O. Before this error
 occurs, I can hear that the scanner is moving its head shortly. Despite
 the error being ETIMEDOUT, scanimage does not run for a long time; and
 most of that time is spent in device discovery.

please check if your usb interface stays on status power/control=on. If 
it is on power/control=auto (usb autosuspend) some usb-scanners have 
problems.
On ubuntu 12.04 there seems to be a problem with udev rules: make a test 
moving /lib/udev/rules.d/40-libsane.rules to ../99-libsane.rules. Don't 
forget udevadm control --reload-rules and replug the scanner.


 $ scanimage --version
 scanimage (sane-backends) 1.0.23; backend version 1.0.23

 $ scanimage -L
 device `pixma:04A91746_501A39' is a CANON Canon PIXMA MP280
 multi-function peripheral

 $ SANE_DEBUG_PIXMA=3 time scanimage -d pixma:04A91746_501A39  foo.pnm
 [sanei_debug] Setting debug level of pixma to 3.
 [pixma] pixma is compiled with pthread support.
 [pixma] pixma version 0.17.0
 [pixma] pixma_collect_devices() found Canon PIXMA MP280 at libusb:006:004
 [pixma] sanei_bjnp_find_devices:
 [pixma] wlan0 is IPv4 capable, sending broadcast..
 [pixma] wlan0 is IPv4 capable, sending broadcast..
 [pixma] wlan0 is IPv4 capable, sending broadcast..
 [pixma] wlan0 is IPv4 capable, sending broadcast..
 [pixma] wlan0 is IPv4 capable, sending broadcast..
 [pixma] pixma_open(): Canon PIXMA MP280
 [pixma] Reader task started
 [pixma] Reader task id=139717645358848 (threaded)
 [pixma]
 [pixma] pixma_scan(): start
 [pixma]   line_size=1914 image_size=1678578 channels=3 depth=8
 [pixma]   dpi=75x75 offset=(0,0) dimension=638x877
 [pixma]   gamma_table=0xb89678 source=0
 [pixma]   threshold=127 threshold_curve=0
 [pixma] WARNING:Timed out in wait_until_ready()
 [pixma] Current status: paper=0 cal=0 lamp=0 busy=0
 [pixma] pixma_read_image() failed ETIMEDOUT
 [pixma] Reader task terminated: ETIMEDOUT
 [pixma] read_image():reader task closed the pipe:0 bytes received,
 1678578 bytes expected
 scanimage: sane_read: Error during device I/O
 [pixma] pixma_close(): Canon PIXMA MP280
 Command exited with non-zero status 9
 0.00user 0.00system 0:01.56elapsed 1%CPU (0avgtext+0avgdata
 5744maxresident)k
 0inputs+8outputs (0major+486minor)pagefaults 0swaps


 If I search for ETIMEDOUT in the bugtracker, I find a few bugs which
 might be related (312918, 313894, 313952);
 but none of them came to a conclusion. Please let me know whether you
 need more information or whether I should attach this information to one
 of the existing bugs.

 Best regards,
Lars




-- 
Wilhelm




[sane-devel] using scanners unable to USB_AUTOSUSPEND

2013-01-11 Thread Wilhelm
Am 10.01.2013 17:29, schrieb Johannes Meixner:

 Hello,

 On Jan 10 16:58 Wilhelm wrote (excerpt):
 recently I had problems with my old EPSON 1670 Scanner, because it
 doesn't support usb autosuspend that most distros enable by default in
 the linux kernel. That causes scanimage or other applications (e.g.
 like scanner button daemon scanbd) to freeze or even reading wrong
 values.

 If I remember correctly a longer time ago the usb autosuspend issue
 was discussed on this list.

 As a consequence the sane-backends libsane.rules file for udev
 (it is /etc/udev/rules.d/55-libsane.rules at least in openSUSE)
 that is generated by tools/sane-desc.c in the sane-backends sources
 contains:
 ---

 # Epson Perfection 1670
 ATTR{idVendor}==04b8, ATTR{idProduct}==011f, ...
 ENV{libsane_matched}=yes
 ...
 # The following rule will disable USB autosuspend for the device
 ENV{libsane_matched}==yes, RUN+=/bin/sh -c
   'if test -e /sys/$env{DEVPATH}/power/control;
then echo on  /sys/$env{DEVPATH}/power/control;
elif test -e /sys/$env{DEVPATH}/power/level;
then echo on  /sys/$env{DEVPATH}/power/level; fi'
 ---

 (the actual udev rules are single long lines - only wrapped here)

 Accordingly - if your EPSON 1670 matches the idVendor/idProduct - it
 should get ENV{libsane_matched}=yes and USB autosuspend should get
 disabled for it.

Thanks for the hint! Must have missed the entry ...

But: I'm on ubuntu 12.04 and here I have the effect that after plugging 
in the scanner it remains for about 500ms in the state on and then 
falls back to auto. So I moved 40-libsane.rules to 99-libsane.rules 
and it is ok. Well, now I have to figure out the offending rule(s) ...


 Unfortunately things in udev/sysfs are unstable by design (udev/sysfs is
 primarily meant as a helper tool to do kernel related stuff and not
 a tool for application programs - sane-backends ia an application
 from the kernel point of view) so that it depends on the kernel
 and udev version whether or not udev rules actually work.


 Kind Regards
 Johannes Meixner


-- 
Wilhelm




  1   2   >