[sane-devel] /lib/udev/rules.d/60-libsane.rules : making EPSON GT-10000 working for standard user

Laurent Despeyroux laurent.despeyroux at free.fr
Sun Jan 25 11:06:11 UTC 2015


Hi,

I recently acquire a A3 Epson GT-10000 scanner for a moderated price but 
have many trouble making it work. One of them is having non-root user 
accessing it. It was done by adding the next two lines to the 
/lib/udev/rules.d/60-libsane.rules file :

# Epson GT-10000
KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", 
ATTRS{model}=="SCANNER GT-10000", ENV{libsane_matched}="yes"

For your information (sg1 is my GT-10000) :
root at debian-2013:/lib/udev/rules.d# udevadm info -a -p 
/sys/class/scsi_generic/sg1

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

   looking at device 
'/devices/pci0000:00/0000:00:1e.0/0000:04:02.0/host0/target0:0:4/0:0:4:0/scsi_generic/sg1':
     KERNEL=="sg1"
     SUBSYSTEM=="scsi_generic"
     DRIVER==""

   looking at parent device 
'/devices/pci0000:00/0000:00:1e.0/0000:04:02.0/host0/target0:0:4/0:0:4:0':
     KERNELS=="0:0:4:0"
     SUBSYSTEMS=="scsi"
     DRIVERS==""
     ATTRS{device_blocked}=="0"
     ATTRS{type}=="3"
     ATTRS{scsi_level}=="3"
     ATTRS{vendor}=="EPSON   "
     ATTRS{model}=="SCANNER GT-10000"
     ATTRS{rev}=="1.08"
     ATTRS{state}=="running"
     ATTRS{timeout}=="0"
     ATTRS{iocounterbits}=="32"
     ATTRS{iorequest_cnt}=="0x50"
     ATTRS{iodone_cnt}=="0x50"
     ATTRS{ioerr_cnt}=="0x1"
     ATTRS{evt_media_change}=="0"
     ATTRS{queue_depth}=="1"
     ATTRS{queue_type}=="none"

   looking at parent device 
'/devices/pci0000:00/0000:00:1e.0/0000:04:02.0/host0/target0:0:4':
     KERNELS=="target0:0:4"
     SUBSYSTEMS=="scsi"
     DRIVERS==""

   looking at parent device 
'/devices/pci0000:00/0000:00:1e.0/0000:04:02.0/host0':
     KERNELS=="host0"
     SUBSYSTEMS=="scsi"
     DRIVERS==""

   looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:04:02.0':
     KERNELS=="0000:04:02.0"
     SUBSYSTEMS=="pci"
     DRIVERS=="tmscsim"
     ATTRS{vendor}=="0x1022"
     ATTRS{device}=="0x2020"
     ATTRS{subsystem_vendor}=="0x0000"
     ATTRS{subsystem_device}=="0x0000"
     ATTRS{class}=="0x010000"
     ATTRS{irq}=="18"
ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003"
     ATTRS{local_cpulist}=="0-1"
     ATTRS{numa_node}=="-1"
     ATTRS{dma_mask_bits}=="32"
     ATTRS{consistent_dma_mask_bits}=="32"
     ATTRS{enable}=="1"
     ATTRS{broken_parity_status}=="0"
     ATTRS{msi_bus}==""

   looking at parent device '/devices/pci0000:00/0000:00:1e.0':
     KERNELS=="0000:00:1e.0"
     SUBSYSTEMS=="pci"
     DRIVERS==""
     ATTRS{vendor}=="0x8086"
     ATTRS{device}=="0x244e"
     ATTRS{subsystem_vendor}=="0x1462"
     ATTRS{subsystem_device}=="0x7758"
     ATTRS{class}=="0x060401"
     ATTRS{irq}=="0"
ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003"
     ATTRS{local_cpulist}=="0-1"
     ATTRS{numa_node}=="-1"
     ATTRS{dma_mask_bits}=="32"
     ATTRS{consistent_dma_mask_bits}=="32"
     ATTRS{enable}=="1"
     ATTRS{broken_parity_status}=="0"
     ATTRS{msi_bus}=="1"

   looking at parent device '/devices/pci0000:00':
     KERNELS=="pci0000:00"
     SUBSYSTEMS==""
     DRIVERS==""

root at debian-2013:/lib/udev/rules.d# uname -a
Linux debian-2013 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u1 x86_64 
GNU/Linux
root at debian-2013:/lib/udev/rules.d# cat /etc/debian_version
7.8
root at debian-2013:/lib/udev/rules.d# 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.

found SCSI scanner "Color FlatbedScanner_9 0062" at /dev/sg0
found SCSI processor "EPSON SCANNER GT-10000 1.08" at /dev/sg1
   # Your SCSI scanner was detected. It may or may not be supported by 
SANE. Try
   # scanimage -L and read the backend's manpage.

found USB scanner (vendor=0x1083, product=0x161b) at libusb:003: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.
root at debian-2013:/lib/udev/rules.d# wodim --scanbus
scsibus0:
     0,0,0      0) *
     0,1,0      1) *
     0,2,0      2) 'Color   ' 'FlatbedScanner_9' '0062' Scanner
     0,3,0      3) *
     0,4,0      4) 'EPSON   ' 'SCANNER GT-10000' '1.08' Processor
     0,5,0      5) *
     0,6,0      6) *
     0,7,0      7) *
scsibus3:
     3,0,0    300) 'MITBISHI' 'LS-120 F200   08' '0220' Removable Disk
     3,1,0    301) 'Optiarc ' 'DVD RW AD-7170A ' '1.03' Removable CD-ROM
     3,2,0    302) *
     3,3,0    303) *
     3,4,0    304) *
     3,5,0    305) *
     3,6,0    306) *
     3,7,0    307) *
scsibus4:
     4,0,0    400) 'ATA     ' 'ST4000DM000-1F21' 'CC52' Disk
     4,1,0    401) *
     4,2,0    402) *
     4,3,0    403) *
     4,4,0    404) *
     4,5,0    405) *
     4,6,0    406) *
     4,7,0    407) *
scsibus5:
     5,0,0    500) 'HL-DT-ST' 'BD-RE  BH16NS40 ' '1.01' Removable CD-ROM
     5,1,0    501) *
     5,2,0    502) *
     5,3,0    503) *
     5,4,0    504) *
     5,5,0    505) *
     5,6,0    506) *
     5,7,0    507) *


Have a nice day !
Best Regards,
Laurent Despeyroux.



More information about the sane-devel mailing list