<div dir="ltr"><div dir="ltr"><div>Hi,</div><div>Let's see if I can summarise what you want to do:</div><div><br></div><div>1. The scanner works locally via USB using the genesys backend and you can verify this with scanimage and the device is "genesys:libusb:002:005".</div><div><br></div><div>2. The scanner works over the network using saned/net backend which you verified also using scanimage and the device is "net:192.168.168.245:genesys:libusb:002:005".<br></div></div><div><br></div><div>This is where I start to lose track of things because you are changing udev settings, although you already state that you can access the scanner locally and via the NET protocol.</div><div><br></div><div>What is it that you are trying to do?<br></div><div><br></div><div>Cheers,</div><div>Ralph<br></div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 6, 2021 at 9:51 AM Heinz Rohde <<a href="mailto:5420108@mailbox.org">5420108@mailbox.org</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">Dear Ralph,<br>
<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, 07:43 -0700 schrieb Ralph Little:<br>
> Hi,<br>
> <br>
> On 2021-08-04 1:44 p.m., Heinz Rohde via sane-devel 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>
> The argument to -d is not a device file in the Unix sense, it is a <br>
> backend-specific string. The format of that string is determined by<br>
> the <br>
> backend itself and can vary widely.<br>
> This is because backends can provide services that are not from a<br>
> local <br>
> device, such as the many devices that can be accessed through<br>
> ethernet <br>
> or WiFi. Another example would be the test backend which is not <br>
> associated with any backend. For the test backend, the device would<br>
> be <br>
> "test:0" or "test:1".<br>
> <br>
> The common way to determine the device name is to run scanimage -L<br>
> which <br>
> will probe for available devices and list them out.<br>
> <br>
> Can you tell us which model of device you are trying to scan from?<br>
> <br>
> Cheers,<br>
> Ralph<br>
> <br>
<br>
<br>
</blockquote></div></div>