# sane-find-scanner doesn't see usb scanner

## SerfurJ

i'm having trouble getting my scanner working in gentoo.  it was working fine with slackware using libsane.  first, i have to get sane-find-scanner to see it.  

the result of the following two commands seems inconsistant.  why does sane-find-scanner not see my scanner, yet it's listed in /proc?

```

$ 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.

  # No USB scanners found. If you expected something different, make sure that

  # you have loaded a driver for your USB host controller and have installed a

  # kernel scanner module.

  # Scanners connected to the parallel port or other proprietary ports can't be

  # detected by this program.

  # You may want to run this program as root to find all devices. Once you

  # found the scanner devices, be sure to adjust access permissions as

  # necessary.

$ cat /proc/bus/usb/devices 

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3

B:  Alloc= 11/900 us ( 1%), #Int=  1, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.5-gentoo ohci_hcd

S:  Product=Silicon Integrated Systems [SiS] USB 1.0 Controller (#2)

S:  SerialNumber=0000:00:02.3

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

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=1.5 MxCh= 0

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

P:  Vendor=046d ProdID=c00e Rev=11.10

S:  Manufacturer=Logitech

S:  Product=USB-PS/2 Optical Mouse

C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 98mA

I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=hid

E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=10ms

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

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

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

S:  Manufacturer=hp

S:  Product=deskjet 5550

S:  SerialNumber=MY26K1R2V92L

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

I:  If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp

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

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

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

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=(none)

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

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

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3

B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0

D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=0000 ProdID=0000 Rev= 2.06

S:  Manufacturer=Linux 2.6.5-gentoo ohci_hcd

S:  Product=Silicon Integrated Systems [SiS] USB 1.0 Controller

S:  SerialNumber=0000:00:02.2

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

I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

```

----------

## Mark Clegg

Have you edited /etc/sane.d/epson.conf to enable the usb option? - Also for >2.6.3 kernels you'll need to use libusb because kernel scanner support has been removed.

Do a search there's something in here about it all somewhere.....

----------

## SerfurJ

i have the following in my /etc/sane.d/epson.conf file:

```

usb 0x4b8 0x110

```

(i have an epson perfection 1650)  i've followed the directions here:

http://www.freecolormanagement.com/sane/libusb.html

but first i need to get sane-find-scanner to see my scanner.

----------

## SerfurJ

i think i'm having this problem because i'm using udev.  the reason sane-find-scanner is failing is because there are no scanner device nodes.

i had sane working with devfs and libusb before.  has anyone gotten sane to work with udev and libusb?

thanks

----------

## Mark Clegg

Yes - it does all work with udev and libusb.

I do remember though having to make some tweaks to get it working - they are documented somewhere is these forums, but the gist of it is....

1: Create /etc/hotplug/usb/scanner

```

#!/bin/bash

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]

then

  chown root "${DEVICE}"

  chgrp scanner "${DEVICE}"

  chmod 660 "${DEVICE}"

fi

```

2: Add...

```

scanner          0x0003 0x04b8 0x010c 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0

```

to /etc/hotplug/usb.usermap, replacing 0x04b8 0x010c with the correct vendor/product id's for your scanner

----------

## SerfurJ

mark,

i had something similar to that already, but i replaced it with your settings (modified for my scanner model).  still nothing.  so what is the output of sane-find-scanner on your computer?  

thanks

----------

## Mark Clegg

```
$ 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.

  # Also you need support for SCSI Generic (sg) in your operating system.

  # If using Linux, try "modprobe sg".

found USB scanner (vendor=0x04b8 [EPSON], product=0x010c [Perfection640  ]) at libusb:001:009

found USB scanner (vendor=0x0403, product=0x6001, chip=GT-6816?) at libusb:001:008

  # Your USB scanner was (probably) detected. It may or may not be supported by

  # SANE. Try scanimage -L and read the backend's manpage.

  # Scanners connected to the parallel port or other proprietary ports can't be

  # detected by this program.

  # You may want to run this program as root to find all devices. Once you

  # found the scanner devices, be sure to adjust access permissions as

  # necessary.

$ scanimage -L

device `epson:libusb:001:009' is a Epson Perfection640 flatbed scanner

```

----------

## Mark Clegg

Also...

What have you got in your USE flags?

If you haven't got usb in there, you'll need to add it and re-emerge sane-backends

----------

## SerfurJ

well that was it!  i was getting ready to give up on udev.  thanks a lot for your help.

----------

## jay

Thanks. Was missing the usb flag too.

----------

