Hi,
So I created simple udev rules:
ATTR{product}=="CanoScan", KERNEL=="2-5.1", SYMLINK+="bus/usb/002/SCANNER1"
ATTR{product}=="CanoScan", KERNEL=="2-5.2", SYMLINK+="bus/usb/002/SCANNER2"
ATTR{product}=="CanoScan", KERNEL=="2-5.3", SYMLINK+="bus/usb/002/SCANNER3"
ATTR{product}=="CanoScan", KERNEL=="2-5.4", SYMLINK+="bus/usb/002/SCANNER4"now scanimage -L give the next result: device `genesys:libusb:002:013' is a Canon LiDE 700F flatbed scanner device `genesys:libusb:002:014' is a Canon LiDE 700F flatbed scanner device `genesys:libusb:002:015' is a Canon LiDE 700F flatbed scanner device `genesys:libusb:002:016' is a Canon LiDE 700F flatbed scanner device `genesys:libusb:002:SCANNER1' is a Canon LiDE 700F flatbed scanner device `genesys:libusb:002:SCANNER4' is a Canon LiDE 700F flatbed scanner device `genesys:libusb:002:SCANNER2' is a Canon LiDE 700F flatbed scanner device `genesys:libusb:002:SCANNER3' is a Canon LiDE 700F flatbed scanner when scanning for the first time (lets say calling to `genesys:libusb:002:SCANNER1' it works) but when trying to call to the rest of the scanners i get error messages like scanimage: open of device genesys:libusb:002:SCANNER2 failed: Invalid argument or scanimage: sane_start: Invalid argument that happens *manually* too. any idea? tnx alot. On Mon, Jan 27, 2014 at 3:07 PM, Richard Ryniker <ryniker at alum.mit.edu>wrote: > >Is there any way to give each scanners a persistent (and informative) > >name? > > Udev is the general mechanism for this. > https://en.wikipedia.org/wiki/Udev gives an overview. > > >does anyone have some idea why the usb numbering changes while running > >the script? (tried to run the commands manually one by one, no change in > >scanners name for this case) > > Probably a timing issue. Your script performs some USB activity, then > again before the device has completely finished. The second operation > (busy device) confuses the software, which resets to put the device into > a known state (this causes the new device number). When you execute > commands from your script manually, the extra time allows completion of > device activity and no reset occurs. > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20140129/ff54c55e/attachment.html>
