# Linux 2.6.3 and HP 6300 Scanner

## geir

Hello, I hope somebody can be kind enough and help me with this one as I am completely lost.

Linus has in his infinate wisdom removed the USB scanner module from the kernel in the 2.6 series. Before 3, it was there as obsolete, but in 2.6.3 it has now completely gone.

This has finally got me. I cannot seem to get libusb to work. Even being used to reading instructions and stuff, libusb is still a mystery. This is partly due to the complete lack of proper information on the libusb site.

So, to the problem:

My scanner is found in /proc/bus/usb but that's about as far as I have been able to get. How do I get it from there into a device with libusb?

/dev/usb is empty

I have no /dev/usbscanner

I have the following option in hp.conf:

device libusb:002:001

I have to say, I am a little miffed that Thorvalds has removed the usb scanner module from the kernel altogether. Especially since it on some sites seems to indicate that the HP 6300 is not supported by libusb and sane.

libusb needs to get some decent documentation at least, as it is, it is hardly of any use.

Sorry about the rants, but I am getting very frustrated about this. There is no excuse for bad documentation.

Hope somebody can help me.

-Geir

----------

## geir

Oh, I forgot to add, when I run scanimage -L it does not find any scanners, nor does sane-find-scanner, not even if I run them as root.

My /proc/bus/usb/devices relevant section looks like this:

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxCh= 0

D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=03f0 ProdID=0601 Rev= 1.00

S:  Manufacturer=Hewlett-Packard

S:  Product=HP ScanJet 6300C

S:  SerialNumber=SG9B3170GYPE

C:* #Ifs= 1 Cfg#= 1 Atr=60 MxPwr=  0mA

I:  If#= 0 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=(none)

E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=02(O) Atr=02(Bulk) MxPS=  16 Ivl=0ms

E:  Ad=83(I) Atr=03(Int.) MxPS=   1 Ivl=250ms

Anything more needed? I am running on a 2.6.3 kernel.

-Geir

----------

## geir

Hi again, I actually managed to fix it in the end.

Here is how (might be helpful to somebody):

In /etc/fstab, I added the line:

none            /proc/bus/usb   usbfs defaults,devmode=0666  0  0

Then I unemerged libusb, xsane AND sane-backed-tools (which I think is where I might have gone wrong before)

In /etc/make.conf I added "usb" to my use flags

Then I emerged xsane, which did libusb and sane-backend-tools

And Hey presto, Bob's your uncle and May's your aunt, tickety boo, lickety split, "scanimage -L" found the scanner and everything was working.

Wunderbar.

-Geir

----------

## geir

Ok, so I spoke prematurely, the scanner is found, recognized and Sane starts up fine. But then it starts getting device I/O errors, and I am getting this in my messages file:

Feb 22 12:04:20 geir usb.agent[18515]: ... no modules for USB product 3f0/601/100

Feb 22 12:04:21 geir kernel: usb 1-1: control timeout on ep0in

I have both USB 1 and USB 2 in my box, and I get the same problem with both.

Sometimes it manages to aquire a preview, but scanning just simply does not work.

Anybody with some good ideas?

-Geir

----------

## geir

Just figured this would be interesting for somebody who knows, this is (some of) my dmesg output

usb 1-1: control timeout on ep0in

usbfs: USBDEVFS_CONTROL failed cmd usbmodules dev 2 rqt 128 rq 6 len 18 ret -110

usb 1-1: usb_disable_device nuking non-ep0 URBs

usb 1-1: unregistering interface 1-1:1.0

drivers/usb/core/usb.c: usb_hotplug

usb 1-1: control timeout on ep0in

usbfs: USBDEVFS_CONTROL failed cmd usbmodules dev 2 rqt 128 rq 6 len 18 ret -110

I wonder if this is a kernel bug of some kind.

----------

## richo123

OK so I have an almost identical problem with 2.6.3 and an epson 1660 photo scanner.

The error messages are almost the same as that reported above. I also noted the following:

1) xsane seems to work the first time after a reboot and not after that

2) Occasionally it will work after this but only after a considerable wait and the error messages.

3) The commercial product vuescan works perfectly which is odd. If xsane is called enough however vuescan stops working as well.

Look like this has become a critical bug...

----------

## thinkb5

I am having similar problems with an Acer 620U and kernel 2.6.3.

Dmesg shows..

 *Quote:*   

> usbfs: USBDEVFS_BULK failed dev 7 ep 0x81 len 8 ret -110
> 
> usbfs: USBDEVFS_BULK failed dev 7 ep 0x2 len 6 ret -110
> 
> Unable to handle kernel NULL pointer dereference at virtual address 00000004
> ...

 

 *Quote:*   

> usbfs: USBDEVFS_BULK failed dev 7 ep 0x81 len 8 ret -110
> 
> usbfs: USBDEVFS_BULK failed dev 7 ep 0x2 len 6 ret -110
> 
> Unable to handle kernel NULL pointer dereference at virtual address 00000004
> ...

 

----------

