# EPSON Scanner (one more) but probably usb - SOLVED

## tom_bxl

Hi Everyone,

since a couple of weeks, I'm trying to get my EPSON Perfection 2450 photo scanner to work but all my attemps have failed so far. I first blamed myself then sane then libusb but I'm now not sure where the problem is. Here is the full story:

I checked my usb controllers:

```

zorglub ~ # lspci | grep USB

00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)

```

so I used the following options in the kernel:

```

Kernel configuration - as per http://www.gentoo.org/doc/en/usb-guide.xml

SCSI disk support - CONFIG_BLK_DEV_SD - Built-in

Support for Host-side USB - CONFIG_USB - As module

   USB device filesystem - CONFIG_USB_DEVICEFS

EHCI HCD (USB 2.0) support - CONFIG_USB_EHCI_HCD

UHCI HCD (most Intel and VIA) support - CONFIG_USB_UHCI_HCD

USB Mass Storage support - CONFIG_USB_STORAGE

USB Human Interface Device (full HID) support - CONFIG_USB_HID:

   HID input layer support - CONFIG_USB_HIDINPUT

USB Monitor - CONFIG_USB_MON

```

After a reboot, all modules are loaded OK:

```

zorglub usb # lsmod | grep usb

usbcore                95808  5 ohci_hcd,ehci_hcd,spca5xx,uhci_hcd

```

After updating the configuartion files of sane "dll.conf" epson or epkowa (both have the same type of problem) and epson.conf or epkowa.conf I get:

```

zorglub ~ # sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the

  # result is different from what you expected, first make sure your

  # scanner is powered up and properly connected to your computer.

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

  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04b8 [EPSON], product=0x0112 [EPSON Scanner]) at libusb:005:012

found USB scanner (vendor=0x041e [Creative Labs  ], product=0x4036 [WebCam Live!   ]) at libusb:004:003

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

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

  # Not checking for parallel port scanners.

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

  # can't be detected by this program.

```

so the scanner is detected properly. I then try scanimage -L and I get:

```

zorglub ~ # scanimage -L

device `epkowa:libusb:005:012' is a Epson Perfection 2450 flatbed scanner

```

Finally, I try iscan (similar problem with xsane) as root since I want to keep the permissions problems for later   :Very Happy:  . I get the error "Could not send command to scanner. Check the scanner's status." Nothing in dmseg. Using epson drivers I get a similar error message about an error in I/O.

OK, after triple-checking the configuration files. I started suspecting something was wrong with my hardware so I tried to plug-in my camera (in PTP mode) and I got:

```

zorglub junk # gphoto2 -P

Downloading 'curve.ntc' from folder '/special'...

File curve.ntc exists. Overwrite? [y|n] y

Saving file as curve.ntc

Downloading '_DSC1022.JPG' from folder '/store_00010001/DCIM/184ND200'...

*** Error ***

PTP Protocol error, response expected

*** Error (-1: 'Unspecified error') ***

```

Turning on the debug option this gives:

```

<snip>

16.498729 PTP2/library.c(2): PTP: gp_port_* function returned 0xffffffdd         -35

16.498822 context(0): PTP I/O error

*** Error ***

PTP I/O error

16.498867 gphoto2-port(2): Closing port...

16.499167 context(0): An error occurred in the io-library ('Unspecified error'): Could not query kernel driver of device.

*** Error ***

An error occurred in the io-library ('Unspecified error'): Could not query kernel driver of device.

*** Error (-1: 'Unspecified error') ***

<snip>

```

I was then pretty sure that something was wrong with my usb hardware, switching from controller to controller always gave the same problems.  To confirm this, I tried an usb pendrive and... it worked. I then changed the camera mode to mass storage instead of PTP and it also worked like a charm.

I'm now kind of stuck since I guess the usb hardware and kernel configuration is working OK but how come both camera PTP mode and scanner return I/O error.

Any help is appreciated.

Thanks,

ThomasLast edited by tom_bxl on Sat Apr 28, 2007 6:56 am; edited 1 time in total

----------

## tom_bxl

I found the difference between mass storage and scanner/ptp. In mass storage I guess that only the kernel modules are used, libusb is bypassed. I downloaded the trial edition of VueScan and the scanner worked as well.

So the problem seems to be related to libusb. I tried re-emerging both stable (0.1.11) and unstable (0.1.12) version but still get the same I/O problems.

I came across a couple of posts where usbutils seems to be causing a conflict with libusb, tried unmerging usbutils, re-ermeging libusb but still no success

Thomas

----------

## tom_bxl

Don't know why, I feel so lonely  :Laughing:  . Keep on posting my monologue, could be that it's usefull to someone.

Next finding, unpluging all usb devices except the scanner, removing spca5xx module for the webcam (that works OK by the way; lsusb gives

```

zorglub ~ # lsusb

Bus 005 Device 007: ID 04b8:0112 Seiko Epson Corp. Perfection 2450

Bus 005 Device 001: ID 0000:0000

Bus 004 Device 001: ID 0000:0000

Bus 003 Device 001: ID 0000:0000

Bus 001 Device 001: ID 0000:0000

Bus 002 Device 001: ID 0000:0000

```

running scanimage with all debuging option:

```

zorglub ~ # SANE_DEBUG=255 USB_DEBUG=255 scanimage -T

usb_set_debug: Setting debugging level to 255 (on)

usb_os_init: Found USB VFS at /dev/bus/usb

usb_os_find_busses: Found 005

usb_os_find_busses: Found 004

usb_os_find_busses: Found 003

usb_os_find_busses: Found 001

usb_os_find_busses: Found 002

usb_os_find_devices: Found 007 on 005

usb_os_find_devices: Found 001 on 005

error obtaining child information: Inappropriate ioctl for device

usb_os_find_devices: Couldn't open /dev/bus/usb/004/002

usb_os_find_devices: Found 001 on 004

usb_os_find_devices: Found 001 on 003

usb_os_find_devices: Found 001 on 001

usb_os_find_devices: Found 001 on 002

scanimage: sane_start: Error during device I/O

```

No idea why I get the "Inappropriate ioctl for device"; is this related? Next step, unplugged all devices and plug the camera in PTP mode, lsusb returns:

```

zorglub ~ # lsusb

Bus 005 Device 008: ID 04b0:0410 Nikon Corp.

Bus 005 Device 001: ID 0000:0000

Bus 004 Device 001: ID 0000:0000

Bus 003 Device 001: ID 0000:0000

Bus 001 Device 001: ID 0000:0000

Bus 002 Device 001: ID 0000:0000

```

when trying to donwload the pictures:

```
zorglub brol # USB_DEBUG=255 gphoto2 -P

usb_set_debug: Setting debugging level to 255 (on)

usb_os_init: Found USB VFS at /dev/bus/usb

usb_os_find_busses: Found 005

usb_os_find_busses: Found 004

usb_os_find_busses: Found 003

usb_os_find_busses: Found 001

usb_os_find_busses: Found 002

usb_os_find_devices: Found 009 on 005

usb_os_find_devices: Found 001 on 005

error obtaining child information: Inappropriate ioctl for device

usb_os_find_devices: Couldn't open /dev/bus/usb/004/002

usb_os_find_devices: Found 001 on 004

usb_os_find_devices: Found 001 on 003

usb_os_find_devices: Found 001 on 001

usb_os_find_devices: Found 001 on 002

usb_set_debug: Setting debugging level to 255 (on)

usb_os_init: Found USB VFS at /dev/bus/usb

usb_os_find_busses: Found 005

usb_os_find_busses: Found 004

usb_os_find_busses: Found 003

usb_os_find_busses: Found 001

usb_os_find_busses: Found 002

usb_os_find_devices: Found 009 on 005

usb_os_find_devices: Found 001 on 005

error obtaining child information: Inappropriate ioctl for device

usb_os_find_devices: Couldn't open /dev/bus/usb/004/002

usb_os_find_devices: Found 001 on 004

usb_os_find_devices: Found 001 on 003

usb_os_find_devices: Found 001 on 001

usb_os_find_devices: Found 001 on 002

usb_set_debug: Setting debugging level to 255 (on)

usb_os_init: Found USB VFS at /dev/bus/usb

usb_os_find_busses: Found 005

usb_os_find_busses: Found 004

usb_os_find_busses: Found 003

usb_os_find_busses: Found 001

usb_os_find_busses: Found 002

usb_os_find_devices: Found 009 on 005

usb_os_find_devices: Found 001 on 005

error obtaining child information: Inappropriate ioctl for device

usb_os_find_devices: Couldn't open /dev/bus/usb/004/002

usb_os_find_devices: Found 001 on 004

usb_os_find_devices: Found 001 on 003

usb_os_find_devices: Found 001 on 001

usb_os_find_devices: Found 001 on 002

usb_set_debug: Setting debugging level to 255 (on)

usb_os_init: Found USB VFS at /dev/bus/usb

usb_os_find_busses: Found 005

usb_os_find_busses: Found 004

usb_os_find_busses: Found 003

usb_os_find_busses: Found 001

usb_os_find_busses: Found 002

usb_os_find_devices: Found 009 on 005

usb_os_find_devices: Found 001 on 005

error obtaining child information: Inappropriate ioctl for device

usb_os_find_devices: Couldn't open /dev/bus/usb/004/002

usb_os_find_devices: Found 001 on 004

usb_os_find_devices: Found 001 on 003

usb_os_find_devices: Found 001 on 001

usb_os_find_devices: Found 001 on 002

USB error: could not get bound driver: No data available

Downloading 'curve.ntc' from folder '/special'...

Saving file as curve.ntc

Downloading '_DSC1050.NEF' from folder '/store_00010001/DCIM/184ND200'...

Segmentation fault

```

Great, it seems to move!!! I progressed from I/O errors to a segfault   :Laughing:  . Happy happy joy joy

----------

## tom_bxl

OK, I was finally able to fix all my USB problems   :Razz:  . Just by removing the USB 2 module ehci_hcd. In this case, both scanner and camera in PTP mode worked.

The downside is that I get these devises to work at high speed and not full speed. By removing this module, you can still plug you high speed devices into the high speed ports.

----------

## cotcot

[quote="tom_bxl"]Don't know why, I feel so lonely  :Laughing:  . Keep on posting my monologue, could be that it's usefull to someone.

Well, at least know that your 'monologue' is interesting me. I am trying to get an Epson RX 640 working and get the same error for iscan.

----------

## tom_bxl

Cotcot,

does removing ehci_hcd also fixes the problem in your case? When googling on this topic, I came across a couple of similar issues with VIA USB 2 cards?

----------

## cotcot

I still have ehci-hcd enabled and my problem is solved. The scanner part of RX640 works fine. The problem is that I do not know how i managed it. I have used the http://gentoo-wiki.com/HARDWARE_EPSON_USB_Scanner_with_epkowa

 First it did not worked. I emerged xsane. I fiddled somewhat, but I do not remember exactly what. Xsane gave the error that it could not send a command to the printer.  One day later i staretd xsane again and i had it working.  I have  amd64x2.

----------

## tom_bxl

I got everything working perfectly since I upgraded to kernel 2.6.20.

----------

