[sane-devel] sanei_usb problems when using libusb_1.0 with hp3670

stef stef.dev at free.fr
Mon Jul 11 20:38:51 UTC 2011


Le lundi 11 juillet 2011 22:28:00 stef, vous avez écrit :
> 	Hello,
> 
> 	I have a scanner with only one usb configuration. Using
> usb_set_configuration on it will result on a failed usb call. So to avoid
> problem I moved all the usb_set_configuration and the result testing within
> the case where dev->descriptor.bNumConfigurations > 1 . Then if I move the
> libusb_set_configuration in the if, I still have problems,
> libusb_control_transfer fails (retrun code -99 : other error) line 2508 in
> sanei_usb.c.
> 
> 	So if I use libusb1.0, the HP3670 fails, when other devices need this
> version. Any idea ?
> 
> Bus 005 Device 004: ID 03f0:1405 Hewlett-Packard ScanJet 3670
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               1.10
>   bDeviceClass          255 Vendor Specific Class
>   bDeviceSubClass       255 Vendor Specific Subclass
>   bDeviceProtocol       255 Vendor Specific Protocol
>   bMaxPacketSize0         8
>   idVendor           0x03f0 Hewlett-Packard
>   idProduct          0x1405 ScanJet 3670
>   bcdDevice            1.00
>   iManufacturer           1
>   iProduct                2
>   iSerial                12
>   bNumConfigurations      1
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength           39
>     bNumInterfaces          1
>     bConfigurationValue     1
>     iConfiguration          0
>     bmAttributes         0xc0
>       Self Powered
>     MaxPower               48mA
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        0
>       bAlternateSetting       0
>       bNumEndpoints           3
>       bInterfaceClass       255 Vendor Specific Class
>       bInterfaceSubClass    255 Vendor Specific Subclass
>       bInterfaceProtocol    255 Vendor Specific Protocol
>       iInterface              0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0040  1x 64 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x02  EP 2 OUT
>         bmAttributes            2
>           Transfer Type            Bulk
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0040  1x 64 bytes
>         bInterval               0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x83  EP 3 IN
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0001  1x 1 bytes
>         bInterval               8
> Device Status:     0x0690
>   (Bus Powered)
> 
> 
> sanei_usb log:
> [genesys] sane_open: start (devicename = `libusb:005:004')
> [genesys] sane_open: found `hewlett-packard-scanjet-3670c' in devlist
> [sanei_usb] sanei_usb_open: trying to open device `libusb:005:004'
> [sanei_usb] sanei_usb_open: configuration nr: 0
> [sanei_usb] sanei_usb_open:     interface nr: 0
> [sanei_usb] sanei_usb_open:   alt_setting nr: 0
> [sanei_usb] sanei_usb_open: endpoint nr: 0
> [sanei_usb] sanei_usb_open: direction: 128
> [sanei_usb] sanei_usb_open: address: 1 transfertype: 2
> [sanei_usb] sanei_usb_open: found bulk-in endpoint (address 0x01)
> [sanei_usb] sanei_usb_open: we already have a bulk-in endpoint (address:
> 0x81), ignoring the new one
> [sanei_usb] sanei_usb_open: endpoint nr: 1
> [sanei_usb] sanei_usb_open: direction: 0
> [sanei_usb] sanei_usb_open: address: 2 transfertype: 2
> [sanei_usb] sanei_usb_open: found bulk-out endpoint (address 0x02)
> [sanei_usb] sanei_usb_open: we already have a bulk-out endpoint (address:
> 0x02), ignoring the new one
> [sanei_usb] sanei_usb_open: endpoint nr: 2
> [sanei_usb] sanei_usb_open: direction: 128
> [sanei_usb] sanei_usb_open: address: 3 transfertype: 3
> [sanei_usb] sanei_usb_open: found interrupt-in endpoint (address 0x03)
> [sanei_usb] sanei_usb_open: we already have a int-in endpoint (address:
> 0x83), ignoring the new one
> [sanei_usb] sanei_usb_open: opened usb device `libusb:005:004' (*dn=0)
> [genesys] init_options: start
> [genesys] init_options: exit
> [sanei_debug] Setting debug level of genesys_low to 255.
> [sanei_debug] Setting debug level of genesys_gl646 to 255.
> [genesys_gl646] gl646_init: start
> [sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 12, value = 131,
> index = 0, len = 1
> [sanei_usb] 000 41                                              A
> libusb:warning [libusb_control_transfer] unrecognised status code 1
> [sanei_usb] sanei_usb_control_msg: libusb complained: Other error
> [genesys_low] sanei_genesys_read_register (0x41, 0x00): failed while
> setting register: Invalid argument
> [genesys] sane_exit: start
> [genesys] sane_exit: exit
> 
> 
> 
> Regards,
> 	Stef

	Well,

	it doesn't work with libus either. 

Regards,
	Stef



More information about the sane-devel mailing list