# USB Scanner and xsane

## doh

I have my HP 4100C "setup" here, but xsane doesn't seem to want and recognize it!

From `usbview`

```

usbscanner

Serial Number: 00MY87T530WG

Speed: 12Mb/s (full)

USB Version:  1.00

Device Class: 00(>ifc )

Device Subclass: 00

Device Protocol: 00

Maximum Default Endpoint Size: 8

Number of Configurations: 1

Vendor Id: 03f0

Product Id: 0101

Revision Number:  1.00

Config Number: 1

   Number of Interfaces: 1

   Attributes: 60

   MaxPower Needed:   0mA

   Interface Number: 0

      Name: usbscanner

      Alternate Number: 0

      Class: 00(>ifc ) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 3

         Endpoint Address: 81

         Direction: in

         Attribute: 2

         Type: Bulk

         Max Packet Size: 64

         Interval: 0ms

         Endpoint Address: 02

         Direction: out

         Attribute: 2

         Type: Bulk

         Max Packet Size: 16

         Interval: 0ms

         Endpoint Address: 83

         Direction: in

         Attribute: 3

         Type: Int.

         Max Packet Size: 1

         Interval: 250ms

```

I don't know where to look.  I've enabled the stuff in my kernel.  :Sad:  Any ideas?

----------

## Syntaxis

Check out this thread, http://lists.suse.com/archive/suse-linux-e/2001-Mar/1595.html.

----------

## doh

 *Syntaxis wrote:*   

> Check out this thread, http://lists.suse.com/archive/suse-linux-e/2001-Mar/1595.html.

 

that'll do it.  :Wink:  thanks

----------

## shakti

i have the same problem (with epson scanner) but the link here is not valid   :Sad: 

any other ideas?

----------

## shakti

well after a LOT of searching trying crying and screaming here is a link which should help anybody who had similar problems:

http://www.eugeneteo.net/docs/USBScanner-HOWTO.txt

easy and effective.

In case the above link breaks/does not work here it is pasted into my post.

NOTE dont just follow this step by step. read it and adapt for your system/scanner

First of all, you need a working USB subsystem. Here are the steps:

	# tar xvzf linux-2.4.3.tar.gz

	# ln -s linux-2.4.3 linux

	# make mrproper

	# make menuconfig

Choose the following options under USB Support:

	- select Support for USB (module)

	- select Preliminary USB device filesystem

	- select (use lspci -v. More info at Documentation/usb/usb.txt)

	  + UHCI (Intel PIIX4, VIA, ...) support (module) _or_

  	  + UHCI Alternate Driver (JE) support (module) _or_

	  + OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support

	- select USB Scanner support (module)

After making the necessary changes to the kernel options, exit the 

configuration menu.

	# vi /usr/src/linux/drivers/usb/scanner.h

Make the following changes:

	--- linux-BAK/drivers/usb/scanner.h      Mon Dec 11 08:49:43 2000

	+++ linux/drivers/usb/scanner.h Wed Apr 11 23:02:56 2001

	@@ -41,10 +41,10 @@

	 MODULE_DESCRIPTION("USB Scanner Driver");

	 MODULE_PARM(vendor, "i");

	-MODULE_PARM_DESC(vendor, "User specified USB idVendor");

	+MODULE_PARM_DESC(vendor, "0x04b8");

	 MODULE_PARM(product, "i");

	-MODULE_PARM_DESC(product, "User specified USB idProduct");

	+MODULE_PARM_DESC(product, "0x0103");

	 /* Enable to activate the ioctl interface.  This is mainly meant for */

If you are not sure what to put for the vendor and product, you can get 

some hints if you scroll down scanner.h, e.g.

       /* Seiko/Epson Corp. */

	{ 0x04b8, 0x0101 },     /* Perfection 636U and 636Photo */

	{ 0x04b8, 0x0103 },     /* Perfection 610 */

	{ 0x04b8, 0x0104 },     /* Perfection 1200U and 1200Photo */

After making the changes, proceed to create the kernel image and install it.

	# make-kpkg clean

	# fakeroot make-kpkg --revision=usb.1.0 \ kernel_image

	# dpkg -i /usr/src/kernel-image-2.4.3_usb.1.0_i386.deb

Do not forget to run lilo after installing the kernel. For more 

information, see 

	http://www.yolinux.com/cgi-bin/man2html?cgi_command=lilo 

	http://www.yolinux.com/cgi-bin/man2html?cgi_command=lilo.conf

If you follow the instruction closely, you should see this:

	pandemonium:/usr/src# ls -l /lib/modules/<kernel version>/usb/

	total 112

	-rw-r--r--    1 root     root         7856 Apr 11 23:03 scanner.o

	-rw-r--r--    1 root     root        24984 Apr 11 23:03 usb-uhci.o

	-rw-r--r--    1 root     root        73068 Apr 11 23:03 usbcore.o

Add the corresponding entries in /etc/modules

	alias char-major-180 usb-uhci

	pre-install usb-uhci 

	modprobe scanner vendor=0x04b8 product=0x0103

After setting up the USB subsystem, do a soft reboot to use the new 

kernel. During booting, you should be able to see these.

	usb.c: USB device number 2 default language ID 0x409

	Manufacturer: EPSON

	Product: Perfection610  

	scanner.c: probe_scanner: User specified USB scanner -- 

		Vendor:Product - 4b8:103

	usb.c: usbscanner driver claimed interface c29d4320

Type lsmod and you should be able to see the following modules loaded.

	scanner                 4784   0  (unused)

	usb-uhci               18880   0  (unused)

	usbcore                47568   0  [scanner usb-uhci]

Create the device file in /dev.

	mknod /dev/usbscanner0 c 180 48

	chmod 666 /dev/usbscanner0

Once the scanner has been set up, you can proceed to install the SANE

packages.

	# apt-get update

	# apt-get install sane	

The only thing you need to configure for SANE is to edit the epson.conf

	# vi /etc/sane.d/epson.conf

and append the following line in replace of the /dev/usbscanner0

	usb /dev/usbscanner0

----------

