[sane-devel] scanbd daemon does not load firmware

Wilhelm wilhelm.meier at fh-kl.de
Wed Aug 28 06:15:20 UTC 2013


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 2>&1 >/dev/null
> /usr/bin/scanimage -L 2>&1 | $logger
> /usr/sbin/service scanbd start 2>&1 >/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



More information about the sane-devel mailing list