<div dir="ltr">Hi,<div>So I created simple udev rules:</div><div><div>ATTR{product}=="CanoScan", KERNEL=="2-5.1", SYMLINK+="bus/usb/002/SCANNER1"</div><div>ATTR{product}=="CanoScan", KERNEL=="2-5.2", SYMLINK+="bus/usb/002/SCANNER2"</div>
<div>ATTR{product}=="CanoScan", KERNEL=="2-5.3", SYMLINK+="bus/usb/002/SCANNER3"</div><div>ATTR{product}=="CanoScan", KERNEL=="2-5.4", SYMLINK+="bus/usb/002/SCANNER4"</div>
</div><div><br></div><div>now scanimage -L give the next result:</div><div><div>device `genesys:libusb:002:013' is a Canon LiDE 700F flatbed scanner</div><div>device `genesys:libusb:002:014' is a Canon LiDE 700F flatbed scanner</div>
<div>device `genesys:libusb:002:015' is a Canon LiDE 700F flatbed scanner</div><div>device `genesys:libusb:002:016' is a Canon LiDE 700F flatbed scanner</div><div>device `genesys:libusb:002:SCANNER1' is a Canon LiDE 700F flatbed scanner</div>
<div>device `genesys:libusb:002:SCANNER4' is a Canon LiDE 700F flatbed scanner</div><div>device `genesys:libusb:002:SCANNER2' is a Canon LiDE 700F flatbed scanner</div><div>device `genesys:libusb:002:SCANNER3' is a Canon LiDE 700F flatbed scanner</div>
</div><div><br></div><div>when scanning for the first time (lets say calling to `genesys:libusb:002:SCANNER1' it works)</div><div>but when trying to call to the rest of the scanners i get error messages like </div><div>
<br></div><div>scanimage: open of device genesys:libusb:002:SCANNER2 failed: Invalid argument<br></div><div>or</div><div>scanimage: sane_start: Invalid argument<br></div><div><br></div><div>that happens <u>manually</u> too.<br>
<br></div><div>any idea?</div><div><br></div><div>tnx alot.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 27, 2014 at 3:07 PM, Richard Ryniker <span dir="ltr"><<a href="mailto:ryniker@alum.mit.edu" target="_blank">ryniker@alum.mit.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">>Is there any way to give each scanners a persistent (and informative)<br>
>name?<br>
<br>
</div>Udev is the general mechanism for this.<br>
<a href="https://en.wikipedia.org/wiki/Udev" target="_blank">https://en.wikipedia.org/wiki/Udev</a> gives an overview.<br>
<div class="im"><br>
>does anyone have some idea why the usb numbering changes while running<br>
>the script? (tried to run the commands manually one by one, no change in<br>
>scanners name for this case)<br>
<br>
</div>Probably a timing issue. Your script performs some USB activity, then<br>
again before the device has completely finished. The second operation<br>
(busy device) confuses the software, which resets to put the device into<br>
a known state (this causes the new device number). When you execute<br>
commands from your script manually, the extra time allows completion of<br>
device activity and no reset occurs.<br>
</blockquote></div><br></div>