# sane not recognizing scanner

## rajendra82

I have a UMAX Astra 3400 USB scanner, and I cannot seem to get sane to recognize it at all.  I have compiled USB Scanner support into the kernel and set the Preliminary USB filesystem on.  I have also compiled UHCI support into the kernel.  All my USB devices are recognized just fine.

```

cat /proc/bus/usb/devices

```

shows 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=1606 ProdID=0060 Rev= 1.00

S:  Manufacturer=UMAX

S:  Product=USB SCANNER

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

I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none)

E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=16ms

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

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

...

```

cat /proc/bus/usb/drivers

```

shows this:

         usbdevfs

         hub

 96-111: hiddev

         hid

 48- 63: usbscanner

In order to get /dev/usbscanner0 and /dev/usbscanner to be present I have done:

```

mknod /dev/usbscanner0 c 180 48

ln -s /dev/usbscanner0 /dev/usbscanner

chgrp scanner /dev/usbscanner0

chgrp scanner /dev/usbscanner

chmod 666 /dev/usbscanner0

```

and in /etc/devfsd.conf I've added the lines:

REGISTER        ^usb/scanner0$   CFUNCTION GLOBAL symlink usb/scanner0 usbscanner0

UNREGISTER      ^usb/scanner0$   CFUNCTION GLOBAL unlink usbscanner0

I've emerged sane-frontends, sane-backends, and xsane.  The sane documentation shows that the plus tek backend supports my scanner.  In /etc/sane.d/plustek.conf, I've added the following:

...

[usb] 0x1606 0x0060

...

device /dev/usbscanner

In /etc/modules.d I've added a file with the following line:

options scanner vendor=0x1606 product=0x60

so that it is processed and added to my /etc/modules.conf (and checked that it is actually there).

With all this work sane should be recognizing my scanner.  But when I do:

```

sane-find-scanner -v

```

I get:

...

sane-find-scanner: checking /dev/usbscanner... failed to open (Invalid argument)

sane-find-scanner: checking /dev/usbscanner0... failed to open (Invalid argument)

...

And the scanner never works.  When in Windows XP The scanner works, so it is not the hardware.  Please help as I am at a loss as to the next step.

----------

## rommel

well after reading this i unpacked an epson scanner i had ordered and had never used adn plugged it in.

i did nothing that you have done , only had usb scanner support in the kernel and sane-backend installed.

when i run the  

```
sane-find-scanner -v
```

 it finds the scanner as scanner0 and then i get the invalid argument failed to open from scanner 1 on down (obviously because i only have the single scanner)

so with it being this easy for me to get it recognized it makes me first wonder if the scanner you have is listed as one supported by sane?...did you check this

sorry if this seems stupid but i didnt notice mention of it in your post

edit: well now i have a problem when running scanimage, sane-find-scanner finds the scanner while scanimage says there is no sane scanner attached....lol

re-edit: two things....for my issue uncommenting the usb line in the /etc/sane.d/epson.conf did the trick , now scanimage sees the scanner.

secondly i looked at sanes supported scanner page and the umax astra you have was not listed....so you might want to search google for that specifically?

----------

## rajendra82

UMAX Astra 3400 USB is listed as supported using the plustek backend.

http://www.mostang.com/sane/man/sane-plustek.5.html

I have edited the /etc/sane.d/plustek.conf file properly as indicated in my post.  But my scanner still is unrecognized.

I have a question for you.  When you type in:

```

cat /proc/bus/usb/devices

```

Under the listing for your scanner what does it say under the category Driver.  Mine says none.  I am beginning to wonder if a driver has to claim the scanner before sane sees it.

----------

## rommel

well here is what i get 

```
D:  Ver= 1.10 Cls=ff(vend.) Sub=ff Prot=ff MxPS= 8 #Cfgs=  1

P:  Vendor=04b8 ProdID=0110 Rev= 3.02

S:  Manufacturer=EPSON

S:  Product=EPSON Scanner

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA

I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbscanner

```

are you sure you have usb scanner support compiled into the kernel...and what kernel are you running...i am using the 2.4.19 vanilla kernel.

----------

## rajendra82

I do have USB Scanner support enabled in the kernel.  I am using the gentoo sources kernel though.  I can try using the vanilla kernel to see if usbscanner claims the scanner.

----------

## ronmon

With devfs there is no need to run 'mknod', it will create the devices dynamically. Besides, the one that you made is wrong. It should be in the usb subdirectory of /dev, i.e. /dev/usb/scanner0. As a rule it is best to make your usb drivers as modules so you might want to do that too.

----------

## rajendra82

I compiled the USB scanner support as a module and now the scanner works fine.  I am still using the gentoo-sources kernel, so that was not the problem.

----------

## rommel

glad you got it working.....i have the usb scanner and print drivers compiled into the kernel so i am not sure why one way will work for you and the other for me but , as long as it is working its all good.

----------

## f.kater

Hi, I have got an UMAX 3400, too and the same problem. Unfortunatelly compiling scanner support as a module doesn't help!

(1)

The output of

```
cat /proc/bus/usb/device

cat /proc/bus/usb/driver
```

is ok.

But there is no scanner in /dev/usb/.

(2) kernel

I have tried a lot of diffrerent kernel compilations now (all usb things as module, then all as kernel ...).

More people seem to recommend modules. With this I couldn't load usbcore as module. modprobe usbcore was asking for 'hotplug' - but even with this in the kernel (and also with emerge hotplug) I couldn't load it. modules-update said something like "missing symbols in usbcore.o".

So I tried it like recommended above: Everything directly into kernel (that is: usb, prelim. usb device filesystem, uhci/intel, input-core-support, usb human int. dev, hotplug support) except for the scanner module. Having done this I don't get any error messages at boot time, lsmod shows the scanner module ('unused' though) but there is nothing in /dev/usb/ (like descibed above (1)).

btw: I am not using an usb mouse or keyboard but the scanner only. So I tried without input-core-support also. No success.

(3) installed libraries, programs

I made a full xsane installation, finally also libusb, usbuilts and hotplug (don't know if this may block something?). But sane-find-scanner -v still can't find anything because there is nothing in /dev/usb/.

(4) fstab

I've added the following line to fstab:

usbdevfs /proc/bus/usb/ usbdevfs noauto 0 0

It seems that it's nearly done - but something is still blocking it!

Do you have any idea how I make my scanner appear in /dev/usb/?

Thanks for reading this long story!

----------

