DragonFly users List (threaded) for 2008-06
DragonFly BSD
DragonFly users List (threaded) for 2008-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Help getting Canon LiDE 30 USB scanner to work


From: Vincent Stemen <vince.dragonfly@xxxxxxxxxxx>
Date: Tue, 10 Jun 2008 22:52:45 -0500

New information:

It still does not work, but I appear to be a step closer.

I compiled a new kernel without uscanner.  Same result as before with or
without uscanner.ko loaded.

Compiled and installed a new libusb-0.1.12nb2 package from pkgsrc.
Same result.

Compiled and installed a new sane-backends-1.0.18 package from pkgsrc.
Now it recognizes the scanner
    # scanimage -L 
    device `plustek:libusb:/dev/usb1:/dev/ugen0' is a Canon N1240U/LiDE30 
    USB flatbed scanner

However, it always thinks the device is busy.

    # scanimage > zzz.pnm 
    scanimage: sane_start: Device busy

Here is the strange thing.

I uninstalled the new sane-backends and re-installed the original
package to confirm if the original one was linked with libusb.  It was.
However, now the original package also sees the scanner with "scanimage
-L".  Before installing the new one I compiled, scanimage would never
see the scanner at all.  Both packages now always think the device is
busy though, so it still does not work.

I traced it with truss.  It successfully opened /dev/usb[0-3].

It also had several successful opens of /dev/ugen0, getting a busy
status on the final open.  Here is the truss output relating to
/dev/ugen0.

===========================================================
open("/dev/ugen0",0x0,00)                        = 6 (0x6)
fcntl(0x6,0x3,0x0)                               = 0 (0x0)
ioctl(6,USB_GET_DEVICE_DESC,0xbfbfe0d0)          = 0 (0x0)
fstat(6,0xbfbfdfc0)                              = 0 (0x0)
fcntl(0x6,0x3,0x0)                               = 0 (0x0)
fcntl(0x6,0x4,0x0)                               = 0 (0x0)
close(6)                                         = 0 (0x0)
. ..
open("/dev/ugen0",0x2,00)                        = 3 (0x3)
fcntl(0x3,0x3,0x0)                               = 2 (0x2)
ioctl(3,USB_SET_TIMEOUT,0xbfbfe1cc)              = 0 (0x0)
ioctl(3,USB_DO_REQUEST,0xbfbfe170)               = 0 (0x0)
ioctl(3,USB_SET_TIMEOUT,0xbfbfe1cc)              = 0 (0x0)
ioctl(3,USB_DO_REQUEST,0xbfbfe170)               = 0 (0x0)
fstat(3,0xbfbfe1a0)                              = 0 (0x0)
fcntl(0x3,0x3,0x0)                               = 2 (0x2)
fcntl(0x3,0x4,0x2)                               = 0 (0x0)
close(3)                                         = 0 (0x0)
. ..
open("/dev/ugen0",0x2,00)                        = 3 (0x3)
fcntl(0x3,0x3,0x0)                               = 2 (0x2)
ioctl(3,USB_SET_CONFIG,0xbfbfdf74)               = 0 (0x0)
open("/dev/ugen0.3",0x2,00)                      ERR#6 'Device not
configured'
open("/dev/ugen0.3",0x1,00)                      = 6 (0x6)
fcntl(0x6,0x3,0x0)                               = 1 (0x1)
ioctl(6,USB_SET_TIMEOUT,0xbfbfde40)              = 0 (0x0)
extpwrite(0x6,0xbfbfdea8,0x4,0x80000,0xffffffff,0xffffffff) = 4 (0x4)
open("/dev/ugen0.2",0x2,00)                      ERR#6 'Device not
configured'
open("/dev/ugen0.2",0x0,00)                      = 7 (0x7)
fcntl(0x7,0x3,0x0)                               = 0 (0x0)
. ..
Then it does a bunch of ioctl's on file descriptors 6 and 7.
. ..
fstat(7,0xbfbfe160)                              = 0 (0x0)
fcntl(0x7,0x3,0x0)                               = 0 (0x0)
fcntl(0x7,0x4,0x0)                               = 0 (0x0)
close(7)                                         = 0 (0x0)
fstat(6,0xbfbfe160)                              = 0 (0x0)
fcntl(0x6,0x3,0x0)                               = 1 (0x1)
fcntl(0x6,0x4,0x1)                               = 0 (0x0)
close(6)                                         = 0 (0x0)
fstat(3,0xbfbfe160)                              = 0 (0x0)
fcntl(0x3,0x3,0x0)                               = 2 (0x2)
fcntl(0x3,0x4,0x2)                               = 0 (0x0)
close(3)                                         = 0 (0x0)
. ..
open("/usr/pkg/etc/sane.d/genesys.conf",0x0,00)  = 3 (0x3)
fcntl(0x3,0x3,0x0)                               = 0 (0x0)
fstat(3,0xbfbfe6a0)                              = 0 (0x0)
extpread(0x3,0x2827e000,0x4000,0x80000,0xffffffff,0xffffffff) = 624
(0x270)
open("/dev/ugen0",0x2,00)                        = 6 (0x6)ff) = 624
(0x270)
fcntl(0x6,0x3,0x0)                               = 2 (0x2)
ioctl(6,USB_SET_CONFIG,0xbfbfe664)               = 0 (0x0)
extpread(0x3,0x2827e000,0x4000,0x80000,0xffffffff,0xffffffff) = 0 (0x0)
fstat(3,0xbfbfe730)                              = 0 (0x0)ff) = 0 (0x0)
fcntl(0x3,0x3,0x0)                               = 0 (0x0)
fcntl(0x3,0x4,0x0)                               = 0 (0x0)
close(3)                                         = 0 (0x0)
. ..

*******
This appears to be where the problem is.  The last open used fd #6 but
I never saw a close(6) before trying to open "/dev/ugen0 again below.
*******
. ..
open("/usr/pkg/var/lock/sane/LCK..libusb:_dev_usb1:_dev_ugen0",0xa01,0644) = 3 (0x3)
fcntl(0x3,0x3,0x0)               = 1 (0x1)
getpid()                     = 5531 (0x159b)
extpwrite(0x3,0xbfbfe240,0x11,0x80000,0xffffffff,0xffffffff) = 17 (0x11)
fstat(3,0xbfbfe180)              = 0 (0x0)
fcntl(0x3,0x3,0x0)               = 1 (0x1)
fcntl(0x3,0x4,0x1)               = 0 (0x0)
close(3)                     = 0 (0x0)
open("/dev/ugen0",0x2,00)            ERR#16 'Device busy'
open("/dev/ugen0",0x0,00)            ERR#16 'Device busy'
. ..
open("/dev/ugen0",0x2,00)                        ERR#16 'Device busy'
open("/dev/ugen0",0x0,00)                        ERR#16 'Device busy'
unlink(0xbfbfe4e0)                               = 0 (0x0)
scanimage: sane_start: Device busy
extpwrite(0x2,0xbfbfe200,0x23,0x80000,0xffffffff,0xffffffff) = 35 (0x23)
fstat(1,0xbfbfec20)                              = 0 (0x0)
fcntl(0x1,0x3,0x0)                               = 1 (0x1)
fcntl(0x1,0x4,0x1)                               = 0 (0x0)
close(1)                                         = 0 (0x0)
. ..
===========================================================

Am I on the right track?  Does this look like a potential Dragonfly
problem or a libusb problem?




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]