<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div style="font-family: Verdana; font-size: 12px; line-height: normal;">I could create the USB device name ('libusb:000:0000' or 'usb 0x0000 0x0000') and use sanei_usb_open() to get the device number which is used by most sanei_usb functions. But this would also not get me the device name I need for the public SANE API functions.</div>

<div style="font-family: Verdana; font-size: 12px; line-height: normal;"> </div>

<div style="font-family: Verdana; font-size: 12px; line-height: normal;">Background:</div>

<div style="font-family: Verdana; font-size: 12px; line-height: normal;"> </div>

<div style="font-family: Verdana; font-size: 12px; line-height: normal;">My application receives a scan request (addressed to a libusb_device) and I have to process and forward that request to the corresponding SANE_Device. As there are several identical devices attached via USB and the caller of my application does not know anything about SANE, I need the USB bus and address to identify the correct SANE device. My application only supports scanners attached via USB, as it will be run on an embedded system which does not provide any other ports than USB.</div>

<div style="font-family: Verdana; font-size: 12px; line-height: normal;"> </div>

<div style="font-family: Verdana; font-size: 12px; line-height: normal;">- Sven</div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Freitag, 21. März 2014 um 13:18 Uhr<br/>
<b>Von:</b> "m. allan noah" <kitno455@gmail.com><br/>
<b>An:</b> "Sven Harmstorf" <svh79@gmx.net><br/>
<b>Cc:</b> sane-devel <sane-devel@lists.alioth.debian.org><br/>
<b>Betreff:</b> Re: [sane-devel] libusb and SANE</div>

<div name="quoted-content">I think not. The call to sane_open requires a string name, which may<br/>
not be derived from the libusb name for some backends.<br/>
<br/>
allan<br/>
<br/>
On Fri, Mar 21, 2014 at 7:50 AM, Sven Harmstorf <svh79@gmx.net> wrote:<br/>
> Hi all,<br/>
><br/>
> My current application is using libusb and therefore I have libusb_device<br/>
> structs.<br/>
> Is it possible to get a SANE_Device by using those libusb structs (or vice<br/>
> versa)?<br/>
><br/>
> I looked at the sanei_usb functions, but I have not found an option to get a<br/>
> SANE_Device.<br/>
><br/>
> Any help is appreciated!<br/>
><br/>
> Kind regards,<br/>
> Sven<br/>
><br/>
> (using sane-backends 1.0.24)<br/>
><br/>
> --<br/>
> sane-devel mailing list: sane-devel@lists.alioth.debian.org<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 sane-devel-request@lists.alioth.debian.org<br/>
<br/>
<br/>
<br/>
--<br/>
"The truth is an offense, but not a sin"</div>
</div>
</div>
</div></div></body></html>