[sane-devel] libusb doesn't seem to work

Gene Heskett gene.heskett@verizon.net
Fri, 26 Dec 2003 13:47:19 -0500


On Friday 26 December 2003 04:30, Henning Meier-Geinitz wrote:
>Hi,
>
>On Thu, Dec 25, 2003 at 11:04:35PM -0500, Gene Heskett wrote:
>> I just rebooted to a 2.6.0-mm1 kernel, rebuilt without
>> drivers/usb/scanner.
>>
>> Its my understanding from copying the mail here that this should
>> force the use of libusb since the scanner in the kernel usb stuff
>> is being deprecated.
>
>You are right.
>
>> And, I've tried to install the tar.gz if libusb-0.1.7 but do not
>> know if its complete since the make bailed out for lack of
>> docbook stuff on this machine.  But a make install immediately
>> after didn't bail.  And I ran ldconfig after the install.
>
>That should work. I thought the docbook bug was fixed meanwhile, but
>it doesn't matter.
>
>> Now the scanner isn't registered in dmesg like it was before when
>> scanner.ko was a piece of the kernel, not a module.
>
>When you plug it in, there should be at least a message about a
> device nor bound to any driver. Maybe that depends on the debug
> level enabled in the USB system?

Its never unplugged, or at least very rarely.

>> xsane cannot find it now.
>
>If you have never used libusb before, you must rebuild sane-backends
>(and probably the frontends to use it). However, you seem to have
> done that or sane was already build with libusb support (see
> below).
>
>> But, this is what I get from the usual suspects.
>> -------------------------------
>> [root@coyote root]# sane-find-scanner
>>
>>   # No SCSI scanners found. If you expected something different,
>> make sure that # you have loaded a SCSI driver for your SCSI
>> adapter.
>>
>> found USB scanner (vendor=0x046d, product=0x0900) at
>> libusb:003:005 found USB scanner (vendor=0x1453, product=0x4026)
>> at libusb:003:004 found USB scanner (vendor=0x04b8 [EPSON],
>> product=0x010f [EPSON Scanner 010F]) at libusb:002:002
>
>Looks like sane-backends was built with support for libusb.
>
>> [root@coyote root]# scanimage -L
>> device `v4l:/dev/video0' is a Noname BT878 video (Hauppauge
>> (bt878)) virtual device device `v4l:/dev/bttv0' is a Noname BT878
>> video (Hauppauge (bt878)) virtual device [root@coyote root]#
>> -----------------
>> So where am I still miss-configured vis-a-vis using
>> libusb?
>
>I'm assumimng you use the plustek backend: Does
>"SANE_DEBUG_PLUSTEK=255 scanimage -L" print anything useful?

later, I tried this:
SANE_DEBUG_EPKOWA=255 scanimage -L, and got this:
[sanei_debug] Setting debug level of epkowa to 255.
[epkowa] sane_init: iscan 1.0.6
[epkowa] sane_init, ># epkowa.conf<
[epkowa] sane_init, >#<
[epkowa] sane_init, ># examples for how to configure the SANE EPSON 
KOWA Backend<
[epkowa] sane_init, >#<
[epkowa] sane_init, ># SCSI scanner:<
[epkowa] sane_init, ># scsi EPSON<
[epkowa] sane_init, >#<
[epkowa] sane_init, ># Parallel port scanner:<
[epkowa] sane_init, >#pio 0x278<
[epkowa] sane_init, >#pio 0x378<
[epkowa] sane_init, >#pio 0x3BC<
[epkowa] sane_init, >#<
[epkowa] sane_init, ># USB scanner - only enable this if you have an 
EPSON scanner. It could<
[epkowa] sane_init, >#               otherwise block your non-EPSON 
scanner from being<
[epkowa] sane_init, >#               recognized.<
[epkowa] sane_init, >#usb /dev/usb/scanner0<
[epkowa] sane_init, >[usb]<
[epkowa] sane_init, >[usb]<
[epkowa] attach([usb])
[epkowa] SANE EPSON KOWA Backend 1.5.2 - 2003-06-13
[epkowa] attach([usb])
[epkowa] attach: opening [usb]
[epkowa] attach: open failed: Invalid argument
[epkowa] sane_init, ><
[epkowa] sane_get_devices()
device `v4l:/dev/video0' is a Noname BT878 video (Hauppauge (bt878)) 
virtual device
device `v4l:/dev/bttv0' is a Noname BT878 video (Hauppauge (bt878)) 
virtual device
device `test:0' is a Noname frontend-tester virtual device
device `test:1' is a Noname frontend-tester virtual device
device `plustek:libusb:002:002' is a Epson Perfection 1250/Photo USB 
flatbed scanner
----------------
 that was after putting a 
[usb]
 in the epkowa.conf

> Maybe
> you have fixed device files in your plustek.conf (like
> /dev/usb/scanner0). Remove them and use automatic configuration.

That was the magic twanger!  I removed the /dev/usb/scanner0 from the 
plustek.conf and it works.  Ditto for the epkowa.conf?  Lemme check, 
brb.  Took the device out, put in a [usb], but that didn't help.  And 
the [usb] apparently doesn't mean anything to iscan, it still cannot 
find it.  Even with the device line active, no go for the iscan front 
end.  Sp presently, the only way to see the iscan backend (epkowa) is 
to go back to useing the kernels usb scanner module.  And then its 
only the iscan frontend that can find it.

>dll.conf contains "plustek"?

Yes, as well as net, leo, epkowa, plustek, test, v4l and I just added 
v4l2.  Don't think there is a .conf for that though. Nope. :(  Has 
one of those been written yet?

Now, in xsane's opening menu of devices, the v4l stuff shows up at the 
top of the list as usual, and the pair of test backends, and plustek 
at the bottom, but no epkowa.  Sounds like I need to rebuild iscan 
with some sort of a "use libusb" option?
I'll look that possibility over again.

I rm'd config.status and reran this:

./configure --with-libusb=yes

But the configure output made no mention of libusb, including in the 
resultant Makefiles.  So I didn't make it again.  Wrong arument 
syntax maybe?

Olaf M.?  I think I need a bit of help here...  Again, says he, 
plaintively. :(

>> Plz note that the first two items listed above in the
>> sane-find-scanner output are not scanners, so there is a bit
>> of ambiguity there.
>
>Which kind of devices are they? sane-find-scanner prints everything
>that doesn't identify itsself as printer, disc, keyboard etc.
> because there is no "scanner" class.

I see.  libusb doesn't use the header scanner.h from the kernel 
sources?  That seems like a worthwhile file move to me...  Its a 
pretty extensive listing of scanners vs vendor/prod numbers.

One is a Logitek ClickSmart 310 usb camera, which I keep hopeing 
someone will do a driver for, its some sort of an elcheepo spc 
chipset, and there is a Radio Shack sourced PL-2303 usb-seriel 
convertor, whose driver they say is solid, but which I'm having 
serious flow control and or parity problems with, not sure which.  
And attempted sz to an automatic but slower rz target dumps the first 
kilobyte and dies trying to correct errors.  Not really germain to 
this problem anyway.

Happy Holidays, Henning.

-- 
Cheers, Gene
AMD K6-III@500mhz 320M
Athlon1600XP@1400mhz  512M
99.22% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2003 by Maurice Eugene Heskett, all rights reserved.