# Can't mount usb as usbdevfs (and hp5400 scanner troubles)

## Wes

I've read some instructions for usb scanners, and it appears that I need to have /proc/mnt/usb mounted as a type usbdevfs filesystem.  This does not happen automatically - not even when I put the following line in /etc/fstab:

none /proc/bus/usb usbdevfs defaults 0 0

And when I enter

mount -t usbdevfs none /proc/bus/usb

I get this:

mount: unknown filesystem type 'usbdevfs'

I'm running a gentoo development kernel - 2.6.10-r7. Here's how the relevant part of my kernel configuration file reads.

#

# USB support

#

CONFIG_USB=y

CONFIG_USB_DEBUG=y

##

CONFIG_USB_DEVICEFS=y

# CONFIG_USB_BANDWIDTH is not set

# CONFIG_USB_DYNAMIC_MINORS is not set

# CONFIG_USB_SUSPEND is not set

# CONFIG_USB_OTG is not set

CONFIG_USB_ARCH_HAS_HCD=y

CONFIG_USB_ARCH_HAS_OHCI=y

#

# USB Host Controller Drivers

#

CONFIG_USB_EHCI_HCD=y

# CONFIG_USB_EHCI_SPLIT_ISO is not set

# CONFIG_USB_EHCI_ROOT_HUB_TT is not set

CONFIG_USB_OHCI_HCD=y

CONFIG_USB_UHCI_HCD=y

All my usb devices other than the scanner work fine.

lsusb gives me this:

Bus 003 Device 001: ID 0000:0000  

Bus 002 Device 001: ID 0000:0000  

Bus 001 Device 008: ID 03f0:1005 Hewlett-Packard ScanJet 5400c

Bus 001 Device 007: ID 0488:0020 Cirque Corp. 

Bus 001 Device 006: ID 04cc:1521 Philips Semiconductors USB 2.0 Hub

Bus 001 Device 001: ID 0000:0000  

I'm trying to get the HP5400C scanner running.  I have installed libusb and sane-backends.  /dev/usbscanner does not automatically appear.  I did a mknod, so that in dev I have

crw-r--r--  1 root root 180, 48 Mar  3  2005 /dev/usbscanner

Once I had done that, find-sane-scanner finds my scanner.  Here is the output.

found USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x1005 [HP Scanjet 5400C Series]) at libusb:001:008

I have these lines in /etc/sane.d/hp5400.conf:

usb 0x03F0 0x1005

/dev/usbscanner

But scanimage -L finds nothing.  

Any suggestions?

----------

## NeddySeagoon

Wes,

The scanner driver has been removed from the kernel and been replaced with libusb, so there is no /dev/file for usb scanners any more.

Your usbfs shouldl be mounted automatically. Look in /proc/bus/usb/devices If that file is there, your usbfs is mounted. It should also contain you scanner. Thats how usblib finds it.

----------

## SerfurJ

wes,

you need to set up your config file correctly before scanimage -L finds anything.  here's what i have in my /etc/sane.d/epson.conf

```
usb libusb:001:003
```

let me know if you find a way to get a usb scanner device node under /dev/usb/scanner0.  i've been trying myself:

https://forums.gentoo.org/viewtopic-t-301916-highlight-.html

----------

## NeddySeagoon

SerfurJ,

With the scanner driver being removed from the kernel there is no /dev/usb/scanner0 any more.

Nor is it needed.

----------

## SerfurJ

NeddySeagoon,

did you see my thread?

 *Quote:*   

> every time i plug in a new usb device, load a module, etc.. the usb devices get renumbered, and i have to edit /etc/sane.d/epson.conf

 

a /dev/usb/scanner0 device node would be handy there.  if you have other ideas, please reply to the thread..  i don't know how to do what the zion1459 suggested.

----------

## sickthing

If you say

none /proc/bus/usb usbfs defaults 0 0

instead of

none /proc/bus/usb usbdevfs defaults 0 0

in /etc/fstab, mounting should be fine. I think somewhen "usbdevfs" changed to "usbfs" ...

But as already said, I don't think mounting /proc/bus/usb is needed anymore for scanner access ...

By the way, since libusb is used for scanner access, my scanner has become unusable on my AMD machine: Previews are okay, but when I try to actually scan the image, I get an I/O error. This seems to be a bug in libusb specific to AMD (or the OHCI subsystem?), as I learned from other threads about this topic.

So I'm accessing my scanner through the "net" driver, my scanner is now attached to my Intel P4 machine.

Regards,

Andrea

----------

## Wes

Thanks for all the suggestions.  I finally got this thing working.  The trick, under the latest 2.6 kernels, appears to be the following.

emerge libusb

USE="usb" emerge sane-backends hotplug

(I had to re-emerge them.)

I added the lines recommended to /etc/sane.d/hp5400.conf

As people told me, usbdevfs isn't needed.  Neither is /dev/usbscanner or /dev/usbscanner0.  libusb and the backend do it all.

And now it works.

----------

