# udev rules for usbscanner kernel 3.1.6

## gcyoung

I have lost recognition of my Mustek Bearpaw 2448TA  Pro Scanner after a few updates and an upgrade to kernel 3.1.6. All worked perfectly prior to this.

I have therefore attempted to understand the way udev rules are formatted since I suspect the non-recognition is due to a need for some rules. However: --all the information I have found on the Internet and gentoo doc pages seems to be out of date. The scanner is listed in "/etc/hotplug/usb/libsane.usermap".  Can anyone recommend an up to date article on forming udev rules?

Sane-find-scanner finds my scanner as follows:

found USB scanner (vendor=0x2040 [Hauppauge], product=0x8400 [WinTV Nova-DT]) at usb \

libusb:002:002

found USB scanner (vendor=0x055f [Hewlett-Packard.        ], product=0x0409 [USB2.0 \

Scanner] chip=SQ113) at libusb:001:003

#

(Irritatingly it thinks my TV card is a scanner, and did at one time try to use it with xsane!).

xsane command from the console produces the following:

Gtk-Message: Failed to load module "gnomesegvhandler"

no scanner is listed under directory "/dev", which I assume is my problem.

Any help or advice would be appreciated.

----------

## PaulBredbury

Forget about /etc/hotplug/ - hotplug is very much deprecated.

See thread.

I use in /etc/udev/rules.d/91-local.rules

```
SUBSYSTEM=="usb", ATTRS{product}=="CanoScan", GROUP="usb", MODE="0660", SYMLINK+="lide25"
```

----------

## gcyoung

Thanks Paul, for your reply. I am aware that hotplug is deprecated. Your example configuration is helpful. My wish, however, is chiefly to find (not just for a scanner), from an up to date source, where the "matches" can be found. 

The problem is that everything seems to be changing all the time! The thread you mention refers to the command "udevinfo". It took me a whiile find out that it is now redundant, although it is given in the latest "Writing udev rules" by Daniel Drake which is referenced by Gentoo.  Again, an article I read suggests a match "BUS=="usb" but I find that is also considered redundant; we must use "SUBSYSTEM". The lack of consistency makes it all very confusing!

Anyway, I think the reference you have given will be useful. I just need to find out the "product" for my scanner  which, if I can discover how all the parameters work, I should be able to do from "udevadm". I tried a rule with ENV{idProduct}, but it seems either  SYSFS{product} or ATTRS{product} is the one I need.

----------

## PaulBredbury

"man udev" shows the up-to-date commands.

Useful commands:

Plug in the scanner, then find it in /dev/:

ls -ltr /dev | tail

Show the attributes, e.g.:

udevadm info -a --name /dev/usbdev5.3_ep00

----------

## gcyoung

Yes, I used udevadm  and wrote the following rules:

 SUBSYSTEM=="usb",ATTR{product}=="USB2.0 Scanner",ATTR{idVendor}=="055f",ATTR{idProduct}=="0409",GROUP="scanner",MODE="664",SYMLINK="usbscanner"

( Written on one line.  The idVendor and id Product might seem a little superfluous but I added them since a program error message stated they could not be found ).

This produces /dev/usbscanner and sane-find-scanner recognised my scanner. However, neither scanimage -L nor xsane can find the scanner, so it looks as if the problem lies elsewhere.

I have SANE_BACKENDS="sane-mustek-usb2" in my make.conf file which calls for a plustek backend although I managed to get the scanner to work with SANE_BACKENDS="plustek Mustek BearPaw 2448TA Pro" previously.

It is extremely annoying that I can't get the scanner working, since I was  forced to install a Windows program just to use the scanner, and the Windows  Mustek program is nowhere as good as xsane.

----------

## cjmayo

If using Gnome 3 and colord do see this post. User needs to be in group colord.

----------

## gcyoung

No I'm not using gnome-- I try to avoid both gnome and kde:--I use Enlightenment (e16), although bits of gnome and kde creep in!

Nevertheless, I tried adding myself to the colord group. This made no difference. I am currently running my scanner on  Windows XP  via  VirtualBox. Crazy isn't it!  I don't use Windows, or Virtualbox for anything else.

Sane-find-scanner recognises my scanner, lsusb -v gives all the details, it is listed in libusb rules, but I can't get xsane to find it.

----------

