<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;">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...</div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">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.</div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0);
 background-color: transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">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. </div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style:
 normal;">I have few questions to scanbd team:</div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">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.</div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">2. If scanbd daemon currently cannot load the firmware, are there any plans to add this
 feature?</div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">3. If not, what is the recommended way to set scanbd up so it will work with scanners that require firmware to be loaded?</div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">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.</div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;">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)</div><div style="background-color: transparent;"><font face="arial, helvetica, sans-serif" size="2">sudo tee /etc/scanbd/scanner.d/on_insert.sh > /dev/null << CATEOF</font></div><div style="background-color: transparent;"><font face="arial, helvetica, sans-serif" size="2">#! /bin/bash</font></div><div style="background-color: transparent;"><font face="arial, helvetica, sans-serif" size="2">logger=/usr/bin/logger -t scanbd</font></div><div style="background-color: transparent;"><font face="arial, helvetica,
 sans-serif" size="2">$logger "Loading firmware for $1"</font></div><div style="background-color: transparent;"><font face="arial, helvetica, sans-serif" size="2">/usr/sbin/service scanbd stop 2>&1 >/dev/null</font></div><div style="background-color: transparent;"><font face="arial, helvetica, sans-serif" size="2">/usr/bin/scanimage -L 2>&1 | $logger</font></div><div style="background-color: transparent;"><font face="arial, helvetica, sans-serif" size="2">/usr/sbin/service scanbd start 2>&1 >/dev/null</font></div><div style="background-color: transparent;"><font face="arial, helvetica, sans-serif" size="2">$logger "Done loading firmware for $1"</font></div><div style="background-color: transparent;"><font face="arial, helvetica, sans-serif" size="2">CATEOF</font></div><div style="background-color: transparent;"><font face="arial, helvetica, sans-serif" size="2">sudo chmod a+x /etc/scanbd/scanner.d/on_insert.sh</font></div><div
 style="background-color: transparent;"><font face="arial, helvetica, sans-serif" size="2"><br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, sans-serif; font-style: normal;"><font face="arial, helvetica, sans-serif" size="2">B. Create udev rule to call the above script.</font></div><div style="background-color: transparent;"><font face="arial, helvetica, sans-serif" size="2">sudo tee /etc/udevd/rules.d/98-epson.rules > /dev/null << CATEOF</font></div><div style="background-color: transparent;"><font face="arial, helvetica, sans-serif" size="2"># Force firmware load for EPSON GT-1500</font></div><div style="background-color: transparent;"><font face="arial, helvetica, sans-serif" size="2">ACTION=="add", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0133", RUN+="/etc/scanbd/scanner.d/on_insert.sh %p"</font></div><div style="background-color:
 transparent;"><font face="arial, helvetica, sans-serif" size="2">CATEOF</font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><br></div></div></body></html>