====== Scanners ====== Configuration of scanners in PLD ===== Installing packages ===== Main packages: poldek:/all-avail> install sane-backends xsane ===== Configuration of scanners on USB bus ===== ==== Finding scanner device ==== Display devices currently on USB bus (use sudo or make sure user in is usb group): /usr/sbin/lsusb Plug in scanner, check ///var/log/kernel// for sth similar to: Apr 15 10:34:27 laptop-hp kernel: [ 8122.892835] usb 2-1: new full speed USB device using ohci_hcd and address 4 Apr 15 10:34:27 laptop-hp kernel: [ 8123.078105] usb 2-1: New USB device found, idVendor=055f, idProduct=021b Apr 15 10:34:27 laptop-hp kernel: [ 8123.078115] usb 2-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0 Apr 15 10:34:27 laptop-hp kernel: [ 8123.078122] usb 2-1: Product: USB Scanner Apr 15 10:34:27 laptop-hp kernel: [ 8123.078422] usb 2-1: configuration #1 chosen from 1 choice or run lsusb again and notice new device. ==== Testing if sane recognizes scanner ==== Run (first from user account and later via sudo) sane-find-scanner One should see: found USB scanner (vendor=0x055f, product=0x021b, chip=GT-6816?) at libusb:002:004 If there is also information libusb couldn't open USB device /dev/bus/usb/002/004: Permission denied. libusb requires write access to USB device nodes. meaning there is privilages problem ==== Solving /dev/bus/usb/*/* privilages problem ==== If device being scanner has root:root privilates: crw-rw-r-- 1 root root 189, 131 Apr 15 10:43 /dev/bus/usb/002/004 regular users will not be able to use scanner device. Option is adding new udev rule to file ///etc/udev/rules.d/41-libsane-local.rules// which will deal with adding scanner device. Selection criteria can be found from issuing command (after using proper usb bus numbers 2.4 in example): udevadm info -a --name /dev/usbdev2.4 or monitoring udev events (with properties display) during device plugin udevadm monitor --property Most likely criteria would be SYSFS{idVendor}== and SYSFS{idProduct} so rule migh look like: SYSFS{idVendor}=="055f", SYSFS{idProduct}=="021b", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes" Reload udev rules: udevadm control --reload-rules and unplug, plug device or trigger all rules again: udevadm trigger and verify results. Note that we here try to use non-existing in PLD group 'scanner' but somehow rule works for me (udev-151, kernel-2.6.32.8) and something (TODO: what? by what criteria ?) adding currenly logged in on Xconsole user ? to device acl, so 'getfacl /dev/bus/usb/003/009' returns: # file: 003/009 # owner: root # group: root user::rw- user:matkor:rw- group::rw- mask::rw- other::r-- and device is accesible (rw) for user 'matkor'. Of course if above does not work, one can select any group 'usb', 'users' etc to be added for device. ==== Firmware files needed for scanner models ==== Sometimes firmware file must be loaded to scanner before using it but required file(s) are not included with sane and must be downloaded from drivers/webpages. Run xsane from console and observere which files seems be needed for given scanner device. ==== Clients: xsane ====