USB scanner and udev

Thursday, November 8th, 2007 by Marcin Juszkiewicz

USB scanners are quite popular today, many ‘all-in-one’ devices contains them. But if you use distribution where permissions are done ‘per group’ like it is in Debian you can get hit by lack of access to your scanner.

Solution is: write own udev rule. It may sounds scary but in reality it is quite simple.

  • Run udevmonitor (it needs root access so sudo udevmonitor).
  • Unplug and plug scanner. You will get lot of output from udev monitor — only one line is needed:
    UDEV  [1194523774.343853] add      /devices/pci0000:00/0000:00:13.0/usb1/1-1/usb_endpoint/usbdev1.7_ep00 (usb_endpoint)
    
  • Now it is time to gather more information about our device. Run udevinfo -a -p LINE_FROM_PREVIOUS_POINT and look at output. For my Epson Stylus DX4000 it shows:
    [....]
    looking at parent device '/devices/pci0000:00/0000:00:13.0/usb1/1-1':
    [....]
    SUBSYSTEMS=="usb"
    [....]
    ATTRS{manufacturer}=="EPSON"
    ATTRS{product}=="USB MFP"
    [....]
    
  • Edit (as root) one of files in /etc/udev/rules.d/ directory (best way is creating own one — scanner.rules for example) and add there something like that (of course set “manufacturer” and “product” to value shown in previous step)
    SUBSYSTEMS=="usb", ATTRS{manufacturer}=="EPSON", ATTRS{product}=="USB MFP", GROUP="scanner"
    
  • Add youself into “scanner” group: sudo addgroup YOURACCOUNTNAME scanner.
  • Unplug and plug scanner — now it should be in proper group.
  • Logout and login so system will notice that you are now also in “scanner” group.
  • Launch your favourite scanning utility — I use Kooka from KDE.

As you see whole procedure can be done in few minutes without problems.



OpenZaurus 3.5.4.2-rc2

Saturday, September 2nd, 2006 by Marcin Juszkiewicz

Today I released third testing version of OpenZaurus 3.5.4.2 version. It support only two models:

  • poodle (SL-5600/B500)
  • tosa (SL-6000)

I decided to do not ship collie (SL-5000/5500) images as they need some work (for example they lack udev) and as usual there is a problem to get OPIE/GPE images fit in this small rootfs space.

The most important changes in this release:

  • touchscreen on tosa does not show heartbeat like it was before
  • sound on poodle works — does not generate random noise

I want to mention our kernel hackers: Richard Purdie and Liam Girdwood for sound fix, Mike Arthur for touchscreen fix. Without their work this release would not happen.