[sane-devel] Has anyone managed to get Snapscan backend working with FreeBSD 8.0 (which uses libusb)?

m. allan noah kitno455 at gmail.com
Tue Jan 26 14:46:52 UTC 2010


Seems like an individual backend should not need to parse the device
string. Isn't there some other way to come up with a unique semaphore,
like process id?

allan

On Tue, Jan 26, 2010 at 9:33 AM, Chris Bagwell <chris at cnpbagwell.com> wrote:
>
>
> On Tue, Jan 26, 2010 at 3:04 AM, Oliver Schwartz <Oliver.Schwartz at gmx.de>
> wrote:
>>
>> Hi all,
>>
>> On 25.01.2010, at 12:26, Torfinn Ingolfsen wrote:
>>
>>> In the meantime, another FreeBSD user found a way to fix it, it is just a
>>> one-line patch:
>>> http://lists.freebsd.org/pipermail/freebsd-usb/2010-January/008172.html
>>>
>>> With Andrew's patch, my scanner now works:
>>>  root at kg-v2# sane-find-scanner -q
>>> found USB scanner (vendor=0x03f0 [HP], product=0xc202 [Photosmart 8200
>>> series]) at libusb:/dev/usb:/dev/ugen1.2
>>> found USB scanner (vendor=0x06bd [AGFA], product=0x2061 [
>>> Snapscan1212u_2]) at libusb:/dev/usb:/dev/ugen2.2
>>> root at kg-v2# scanimage -L
>>> device `snapscan:libusb:/dev/usb:/dev/ugen2.2' is a AGFA SNAPSCAN 1212U_2
>>> flatbed scanner
>>
>>
>> Thanks for the pointer, I'll try to get this fixed in the backend. The
>> code in question was added recently to fix another problem with calculating
>> a unique identifier.
>>
>> Maybe one of the guys who's experienced with autoconf can give me a hint
>> on how to do this the best way. Should I just use "#ifdef BSD" around the
>> code in question or is there some autoconf magic that would allow me to do a
>> more advanced query?
>>
>> I also have to retest this on OS X - the code in question looks very Linux
>> specific.
>>
>> Kind regards,
>>
>> Oliver
>>
>
> I don't think there is any autoconf stuff that can help you... or perhaps
> what you need is already there.   A quick look at sanei_usb_init() and I
> think its the one generate 2 types of strings depending on if your using
> libusb 1.0 or not.
>
> So at least you should be able to reference HAVE_LIBUSB_1.0 but maybe better
> to update sanei_usb_init() code to always generate a consistent string?
>
> Chris
>
> --
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>             to sane-devel-request at lists.alioth.debian.org
>



-- 
"The truth is an offense, but not a sin"



More information about the sane-devel mailing list