<div dir="ltr">Using lsusb -t I get this feedback:<div><div><br></div><div>pi@raspberrypi ~ $ lsusb -t</div><div>/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M</div><div> |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/3p, 480M</div>
<div> |__ Port 1: Dev 3, If 0, Class=vend., Driver=smsc95xx, 480M</div><div> |__ Port 3: Dev 11, If 0, Class=vend., Driver=usbfs, 480M</div></div><div><br></div><div class="gmail_extra">I do notice how sane-find-scanner returns the bus/port data:</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">sudo sane-find-scanner</div><div class="gmail_extra"><br></div><div class="gmail_extra"> # sane-find-scanner will now attempt to detect your scanner. If the</div>
<div class="gmail_extra"> # result is different from what you expected, first make sure your</div><div class="gmail_extra"> # scanner is powered up and properly connected to your computer.</div><div class="gmail_extra">
<br></div><div class="gmail_extra"> # No SCSI scanners found. If you expected something different, make sure that</div><div class="gmail_extra"> # you have loaded a kernel SCSI driver for your SCSI adapter.</div><div class="gmail_extra">
# Also you need support for SCSI Generic (sg) in your operating system.</div><div class="gmail_extra"> # If using Linux, try "modprobe sg".</div><div class="gmail_extra"><br></div><div class="gmail_extra">found USB scanner (vendor=0x04a9 [Canon], product=0x1908 [CanoScan]) at libusb:001:011</div>
<div class="gmail_extra">found USB scanner (vendor=0x0424, product=0xec00) at libusb:001:003</div><div><br></div></div><div class="gmail_extra">How would I use the libusb:001:011 identifier for the 9000f with scanimage? If I try to tell scanimage to use one of those with the -device option, I get this feedback:</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">pi@raspberrypi ~/sambashare $ sudo LD_LIBRARY_PATH=/usr/lib/:/lib scanimage --progress --verbose --batch --format=tiff --resolution=2400 -x 240 -y 135 <b>-d libusb:001:011</b> --batch-start=110000 > /home/pi/sambashare/myco%5d.tif</div>
<div class="gmail_extra">scanimage:<b> open of device libusb:001:011 failed: Invalid argument</b></div><div class="gmail_extra">pi@raspberrypi ~/sambashare $ sudo LD_LIBRARY_PATH=/usr/lib/:/lib scanimage --progress --verbose --batch --format=tiff --resolution=2400 -x 240 -y 135 <b>-d libusb:001:003</b> --batch-start=110000 > /home/pi/sambashare/myco%5d.tif</div>
<div class="gmail_extra">scanimage:<b> open of device libusb:001:003 failed: Invalid argument</b></div><div><br></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">- Joel<br><br><div class="gmail_quote">
On Thu, Feb 20, 2014 at 5:33 PM, Olaf Meeuwissen <span dir="ltr"><<a href="mailto:olaf.meeuwissen@avasys.jp" target="_blank">olaf.meeuwissen@avasys.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><br>
m. allan noah writes:<br>
<br>
> Some scanners have a serial number which can be seen by software. Some<br>
> sane backends use that serial as part of the device name. If your<br>
> scanners or the pixma backend don't support this, you will have to<br>
> find another way. Perhaps forcing the device name using udev or<br>
> whatever Linux is using this week.<br>
<br>
</div>It just so happens that I've been looking at this about three weeks ago<br>
for a third party backend. The scanners this backend should support<br>
have varying degrees of serial number support:<br>
<br>
- not at all<br>
- at the USB level only<br>
- at the device protocol level only<br>
- at both USB and device protocol level only<br>
<br>
I wanted/needed to be able to support all of the above, even the case<br>
where there is *no* serial number support at all. With libusb-1.0 this<br>
is possible (at least on a recent enough Linux system) using the<br>
<br>
libusb_get_bus_number()<br>
<br>
and<br>
<br>
libusb_get_device_address()<br>
<br>
API. When using libusb-1.0.12 or later you can also use<br>
<br>
libusb_get_port_number()<br>
<br>
With a USB device hooked up to my machine, lsusb -t shows:<br>
<br>
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M<br>
|__ Port 5: Dev 26, If 0, Class=Vendor Specific Class, Driver=, 480M<br>
<br>
Inserting a USB hub between the two, this changes to:<br>
<br>
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M<br>
|__ Port 5: Dev 27, If 0, Class=Hub, Driver=hub/4p, 480M<br>
|__ Port 4: Dev 28, If 0, Class=Vendor Specific Class, Driver=, 480M<br>
<br>
The device number (Dev) changes every time you reconnect the USB cable<br>
(or power cycle the device) but bus and port numbers don't change (but<br>
they might upon a reboot).<br>
<div class=""><br>
> On Thu, Feb 20, 2014 at 1:47 AM, Joel Penner <<a href="mailto:joelcpenner@gmail.com">joelcpenner@gmail.com</a>> wrote:<br>
>> I have two CanoScan 9000f scanners that I'm using for a time-lapse scanner<br>
>> photography project. How do I tell two instances of scanimage to each use<br>
>> their own 9000f scanner on the same raspberry pi using the -device flag?<br>
>> Using sane-find-scanner to find an ID of connected scanners generates the<br>
>> same ID for both, non-surprisingly.<br>
<br>
</div>Hope this helps,<br>
<span class=""><font color="#888888">--<br>
Olaf Meeuwissen, LPIC-2 FLOSS Engineer -- AVASYS CORPORATION<br>
FSF Associate Member #1962 Help support software freedom<br>
<a href="http://www.fsf.org/jf?referrer=1962" target="_blank">http://www.fsf.org/jf?referrer=1962</a><br>
</font></span><div class=""><div class="h5"><br>
--<br>
sane-devel mailing list: <a href="mailto:sane-devel@lists.alioth.debian.org">sane-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel</a><br>
Unsubscribe: Send mail with subject "unsubscribe your_password"<br>
to <a href="mailto:sane-devel-request@lists.alioth.debian.org">sane-devel-request@lists.alioth.debian.org</a><br>
</div></div></blockquote></div><br></div></div>