<div dir="ltr"><div>Hello Heinz,</div><div><br></div><div>thank you for your detailed answer. If I understand correctly the whole issue is caused by the fact that  Windows driver/software is hardwiring the current bus/device ID during installation.</div><div><br></div><div>-d genesys:libusb:/dev/myLide60 <br></div><div><br></div><div>This trick did not work for me either - perhaps libusb always needs bus and device ID and does not take any names. Tried symbolic links, tried making character device but with the same results. I am beginning to think that this would need a code change (not sure about the complexity). Perhaps it would be simpler to try and port xsane to windows again :-/</div><div><br></div><div>Cheers, jose<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 6, 2021 at 6:59 PM Kelly Price <<a href="mailto:strredwolf@gmail.com">strredwolf@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I think the Sane-devel list would know more than what I do.<br>
<br>
On Fri, Aug 6, 2021 at 12:50 PM Heinz Rohde <<a href="mailto:5420108@mailbox.org" target="_blank">5420108@mailbox.org</a>> wrote:<br>
><br>
> Dear Kelly,<br>
><br>
><br>
> Hello,<br>
><br>
> I am very sorry for beeing so short with my detailed information.<br>
><br>
><br>
> Here we go:<br>
><br>
> - The Scanner is a Canon CanoScan LiDE 60<br>
> - The Scanner is<br>
> connected to an ols ThinkPad r60e via USB (All USB ports are USB 2.0)<br>
> -<br>
> The Scanner is handeled by genesys backend.<br>
> - The OS is Debian Buster 64<br>
> bit, all updates installed.<br>
> - The IP number of the Thinkpad is<br>
> 192.168.168.245<br>
><br>
> - The scanner works locally<br>
> hr@r60e:~$ sudo scanimage -L<br>
> d<br>
> evice `genesys:libusb:002:005' is a Canon LiDE 60 flatbed scanner<br>
><br>
><br>
> - The<br>
> scanner works over the network, my 2nd laptop is a Dell E6440 running<br>
> Debian Buster<br>
> hr@e6440:~$ scanimage -L<br>
> device<br>
> `net:192.168.168.245:genesys:libusb:002:005' is a Canon LiDE 60 flatbed<br>
> scanner<br>
><br>
><br>
> - This is my udev-rule in /usr/lib/udev/rules.d<br>
><br>
> less 90-<br>
> scanner.rules<br>
><br>
> # change device file permission to group scanner for sane<br>
> access<br>
> ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="221c",<br>
> SUBSYSTEMS=="usb", ACTION=="add", MODE="0664", GROUP="scanner",<br>
> SYMLINK+="MyLide60"<br>
><br>
> but this does not work - it creates no symlink in<br>
> /dev<br>
><br>
><br>
><br>
> - This does work and is my udev-rule in /etc/udev/rules.d<br>
><br>
> less 83-<br>
> scanner.rules<br>
><br>
> SUBSYSTEM=="usb", ATTR{product}=="CanoScan",<br>
> ATTR{idProduct}=="221c", ATTR{idVendor}=="04a9", SYMLINK+="myLide60"<br>
> GROUP+="scanner"<br>
><br>
> It creates a symlink in /dev/<br>
> lrwxrwxrwx  1 root root<br>
> 15 Aug  6 18:18 myLide60 -> bus/usb/002/005<br>
><br>
><br>
> It's hardly possilbe to<br>
> document here all the links I visited during the last 5 days, but tere<br>
> are Links that suggested to use<br>
> hr@r60e:~$ sudo scanimage -d<br>
> /dev/myLide60<br>
><br>
> which obv iously does not work, because a UNIX Device is<br>
> not to be used within the backend systax.<br>
><br>
> A invocation like<br>
> hr@r60e:~$<br>
> sudo scanimage -d genesys:libusb:/dev/myLide60 results also in an<br>
> error, though it was recommended in a forum blogpost by someone more or<br>
> less savvy.<br>
><br>
><br>
> The reason for this is, that I have some windows 10 clients<br>
> in my network.<br>
> They can be used with sane-Scanning-Solution via NAPS2<br>
> Scanning Software and the windows WIA-Sane driver<br>
> <a href="https://github.com/mback2k/wiasane/wiki/Downloads" rel="noreferrer" target="_blank">https://github.com/mback2k/wiasane/wiki/Downloads</a><br>
><br>
> But one need to<br>
> configure the scanning device by hand. Unfortunatly the scanner will be<br>
> assigned deviating USB Bus and Device numbers if the scanner is<br>
> unplugged and replugged or if the scanserver is rebootet. You cannot<br>
> rely on the persistence of USB bus/device number assignment.<br>
><br>
> That leads<br>
> to the situation, that the users of the windows clients won't be able<br>
> to scan at a certain day or hour noone can predict.<br>
> To assign the then<br>
> valid usb bus / device numbers, you'll have to reinstall the WIA-Sane<br>
> driver each time it is necessary.<br>
><br>
> Therefore I'd like to have the option<br>
> to configure the windows WIA Sane Driver to the symbolic link.<br>
><br>
> But until<br>
> today this endeavour was not successful.<br>
><br>
><br>
> Important to know:<br>
> SCSI-<br>
> Scanners seem to behave other than USB-Scanners.<br>
> SCSI-Scanners for<br>
> example may have a /dev/sg1, which is a UNIX-Device.<br>
> For SCSI-Scanners<br>
> the symlink may work. I unfortunatly cannot try this out, but several<br>
> postings do claim that.<br>
><br>
><br>
> I am now looking for a method to get a<br>
> persistent USB device enumeration for my scanner.<br>
><br>
> A already tried the<br>
> ALIASES option via dll.aliases.<br>
><br>
> I wrote this script, which updates the<br>
> dll.aliases in /dev/sane.d<br>
><br>
> -----<br>
> #!/bin/bash<br>
><br>
> ALIASFILE=/etc/sane.d/dll.ali<br>
> ases<br>
><br>
> lsusb | grep LiDE | awk '{ print "alias MyLiDE<br>
> genesys:libusb:"$2":"$4}' | sed 's/.$//' > $ALIASFILE<br>
> -----<br>
><br>
> The scanner<br>
> then is recognised by its alias, but the windows clients cannot make<br>
> use of it.<br>
> All that the windows WIA Sane Driver sees by autotetection is<br>
> the genesys:libusb:002:005 which I can select as only Option during<br>
> WIA-Sane Setup.<br>
><br>
><br>
><br>
> This is the long version, perhaps you have ideas how I<br>
> should proceed.<br>
><br>
> THX,<br>
> Heinz<br>
><br>
> Am Freitag, den 06.08.2021, 08:50 -0400 schrieb Kelly Price:<br>
> > First, run:  sudo sane-find-scanner<br>
> ><br>
> > That'll check if the scanner is identified or not under the current<br>
> > SANE version you have.<br>
> ><br>
> > If that doesn't work, check that your scanner is supported and you're<br>
> > on the latest SANE version (you may need to use the PPA in Ubuntu).<br>
> ><br>
> > If that does work, then the permissions are not set to allow the<br>
> > regular user to use the scanner.<br>
> ><br>
> > Usually you don't need to symlink to the scanner if you're using<br>
> > xsane, so I'd remove your udev rule and see if that helps.  Xsane<br>
> > will<br>
> > scan for your scanner, and if it's the only one, uses it (it'll<br>
> > prompt<br>
> > you otherwise).<br>
> ><br>
> > On Fri, Aug 6, 2021 at 8:37 AM Heinz Rohde via sane-devel<br>
> > <<a href="mailto:sane-devel@alioth-lists.debian.net" target="_blank">sane-devel@alioth-lists.debian.net</a>> wrote:<br>
> > > Hello,<br>
> > ><br>
> > > I created a symlink via udev rule calles MyScanner and points to<br>
> > > /dev/bus/001/002 (for example)<br>
> > ><br>
> > > I cannot get genesys to use this link, or in other words, scanimage<br>
> > > -d<br>
> > > /dev/MyScanner resukts in an error.<br>
> > ><br>
> > > Any Ideas?<br>
> > ><br>
> > > Thank you,<br>
> > > Heinz<br>
> > ><br>
> > ><br>
> ><br>
> ><br>
><br>
><br>
<br>
<br>
-- <br>
Kelly "STrRedWolf" Price<br>
<a href="http://redwolf.ws" rel="noreferrer" target="_blank">http://redwolf.ws</a><br>
<br>
</blockquote></div><br clear="all"><br></div>