# [SOLVED] USB Scanner (Perfection 2400) not working

## Gentoo-Ed

Hi all. I'm busy conencting my scanner. I emerged libusb and sane-backend. When I give the command xsane to see if everything works it does nothing but say command unkown. I can't figure out what I'm doing wrong today.

 :Embarassed:   I forgot to emerge xsane. I did that and now it gives no device found.Last edited by Gentoo-Ed on Thu May 12, 2005 8:34 am; edited 3 times in total

----------

## NeddySeagoon

Gentoo-Ed,

You need hotplug running to detect the scanner and usbfs to put the information into /proc/bus/usb/devices for libusb to use.

I have a feeling there is a script for hotplug too.

----------

## Gentoo-Ed

I didn't have usbfs (Which I discovered is usb file system) in the kernel. So I put it in and going to play around again.

 :Confused: 

Still not working. The command sane-find-scanner gives:

```
  # 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".

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

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports

  # can't be detected by this program.

```

The configuration files are alle edited like required (well that's what I think).

----------

## polle

did you already try it as root?

----------

## Gentoo-Ed

At the moment I am always root for I'm setting up the system

----------

## NeddySeagoon

Gentoo-Ed,

Do you have libusb ?

Thats essential too. 

Whats in your /etc/sane/....conf  file (for your scanner)

----------

## Gentoo-Ed

levusb is emerged.

the config file is:

```
# epson.conf

#

# here are some examples for how to configure the EPSON backend

#

# SCSI scanner:

#scsi EPSON

#

# Parallel port scanner:

#pio 0x278

#pio 0x378

#pio 0x3BC

#

# USB scanner:

# There are two different methods of configuring a USB scanner: libusb and the kernel module

# For any system with libusb support (which is pretty much any recent Linux distribution) the

# following line is sufficient. This however assumes that the connected scanner (or to be more

# accurate, it's device ID) is known to the backend. 

usb

# For libusb support for unknown scanners use the following command

# usb <product ID> <device ID>

# e.g.:

# usb 0x4b8 0x110

usb 0x4b8 0x011b

# And for the scanner module, use the following configuration:

#usb /dev/usbscanner0

#usb /dev/usb/scanner0

```

Besides that the command "cat /proc/bus/usb/devices" contains:

```
T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=480 MxCh= 0

D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1

P:  Vendor=04b8 ProdID=011b Rev= 1.00

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=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

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

```

I can't do the command "etcat -u sane-backends" for then it wil say command not found. Sane-backends is emerged.

----------

## NeddySeagoon

Gentoo-Ed.

The first uncommented line in your epson.conf 

```
usb
```

should not be there. Just the 

```
usb 0x4b8 0x011b
```

Do you have the hotplug and coldplug daemons running?

----------

## Gentoo-Ed

Okay I edited the file. This didn't result in any changes. I have scanner support enabled in the kernel (not as module but "baked in"). I have hotplug emerged, not coldplug. Is this needed? Is there anything else I did wrong?

Maybe of use:

lsusb gives as result:

cannot open /proc/usb/usb, No such file or directory (2)

----------

## polle

 *Quote:*   

> #usb /dev/usbscanner0 
> 
> #usb /dev/usb/scanner0

 

shouldn't you uncomment one of thes lines?

----------

## Gentoo-Ed

Silly me.

I booted in the wrong kernel.

lsusb does list my scanner.

Which has to be uncommented?

----------

## polle

Maybe just trial and error? (there are only two possibilities)

----------

## Gentoo-Ed

Unfortunatly no results.

I followed the manual https://forums.gentoo.org/viewtopic-t-210616-highlight-usb+scanner.html but one thing there. My file /etc/hotplug/usb.usermap contains the comment line and then libusbscanner. Nothing more. The scanner is listed with lsusb on Bus 001 Device 002: ID 04b8:011b Seiko Epson Corp. Perfection 2400 Photo.

----------

## polle

you looked here:

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

----------

## Gentoo-Ed

It doesn't seem to help.

Here are my files:

/etc/sane.d/epson.conf:

```
# epson.conf

#

# here are some examples for how to configure the EPSON backend

#

# SCSI scanner:

#scsi EPSON

#

# Parallel port scanner:

#pio 0x278

#pio 0x378

#pio 0x3BC

#

# USB scanner:

# There are two different methods of configuring a USB scanner: libusb and the kernel module

# For any system with libusb support (which is pretty much any recent Linux distribution) the

# following line is sufficient. This however assumes that the connected scanner (or to be more

# accurate, it's device ID) is known to the backend. 

#usb

# For libusb support for unknown scanners use the following command

# usb <product ID> <device ID>

# e.g.:

# usb 0x4b8 0x110

usb 0x4b8 0x011b

# And for the scanner module, use the following configuration:

#usb /dev/usbscanner0

#usb /dev/usb/scanner0

```

/etc/group:

```
...

nobody:x:65534:

rpc:x:111:

scanner:x:407:root

```

/etc/hotplug/usb/epson_scanner:

```
#!/bin/bash

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

then

   chown root "${DEVICE}"

   chgrp scanner "${DEVICE}"

   chmod 660 "${DEVICE}"

fi

```

/ect/hotplug/usg.usermap:

```
# usb module         match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info

epson_scanner   0x0003   0x04b8   0x011b   0x0000   0x0000   0x00   0x00   0x00   0x00   0x00   0x00   0x00000000

```

----------

## Gentoo-Ed

Sigh...

Did some more stuff and tried other ports. Still not working. My command "sane-find-scanner -v" gives when checking USB scanners:

checking /dev/usb... failed to open (invalid argument)

libusb not available

Maybe that's wrong??

----------

## NeddySeagoon

Gentoo-Ed,

Thats certianly wrong.

The /etc/sane.d/.... file should tell it to use libusb and it should never look in /dev for your scanner.

Did you emerge libusb ?

----------

## Gentoo-Ed

I dubble checked the epson.conf file (mentioned above) and it seems alright. i'm getting the feeling it's useing a different file, only which?

[edit]

I changed the fstab file and removed the scanner line from it. This due to the fact that this was not going to work because of a kernel bug (?). I found this on the site http://www.linuxmanpages.com/man5/sane-usb.5.php#lbAF section libusb. Only what to do to get it working??

----------

## Gentoo-Ed

 :Razz: 

I solved it!

I unmerged sane-backends. Emerged it with use usb flag. Stopped hotplug. Changed /etc/hotplug/usb.usermap so it only contains libusbscanner. Started hotplug and hey presto it works.

----------

