Announcement

Collapse
No announcement yet.

Ho to get work HP ScanJet 5p SCSI scanner?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ho to get work HP ScanJet 5p SCSI scanner?

    My distro is Kubuntu 6.06 and made all current updates and I also have KDE 3.5.4, amarok 1.4.1 and KOffice 1.5.2 installed (all from kubuntu.org/packages).
    My kernel is:
    Code:
    $ uname -r
    2.6.15-26-386
    In Edubuntu 5.10 this scanner and SCSI adapter worked after I used these instructions - http://ubuntuforums.org/showthread.p...jet+5p+scanner
    But now are udev changed and these suggestions does not have effects

    According to sane-project web page this scanner should have complete support to Linux:
    http://sane-project.org/sane-mfgs.ht...EWLETT-PACKARD

    I have HP ScanJet 5p SCSI scanner and Initio 9100 SCSI controller (kernel module initio loaded).
    dmesg output:

    Code:
    [17179572.500000] ACPI: PCI Interrupt 0000:02:02.0[A] -> GSI 17 (level, low) -> IRQ 169
    [17179572.552000] i91u: PCI Base=0xB800, IRQ=169, BIOS=0xFF000, SCSI ID=7
    [17179572.552000] i91u: Reset SCSI Bus ...
    [17179582.556000] scsi0 : Initio INI-9X00U/UW SCSI device driver; Revision: 1.04a
    [17179583.064000]  Vendor: HP    Model: C5110A      Rev: 3701
    [17179583.064000]  Type:  Processor             ANSI SCSI revision: 02
    I found different system as it was in Ubuntu 5.10 which is described here:
    http://ubuntuforums.org/showthread.p...jet+5p+scanner

    Currently there is:
    Code:
    $ ls -l /etc/udev/rules.d/
    -rw-r--r-- 1 root root  262 2006-05-22 17:25 00-init.rules
    lrwxrwxrwx 1 root root  22 2006-08-23 11:22 025_logitechmouse.rules -> ../logitechmouse.rules
    -rw-r--r-- 1 root root 2264 2006-05-22 17:25 20-names.rules
    -rw-r--r-- 1 root root  190 2006-05-22 17:25 25-iftab.rules
    -rw-r--r-- 1 root root 3048 2006-05-22 17:25 40-permissions.rules
    -rw-r--r-- 1 root root 47992 2006-08-22 21:11 45-libgphoto2.rules
    -rw-r--r-- 1 root root 28466 2006-08-25 10:43 45-libsane.rules
    -rw-r--r-- 1 root root 28262 2006-08-25 10:24 45-libsane.rules_original
    -rw-r--r-- 1 root root 1451 2006-05-22 22:59 45-logitechmouse.rules
    -rw-r--r-- 1 root root 1306 2006-05-22 17:25 60-symlinks.rules
    -rw-r--r-- 1 root root 2585 2006-05-22 17:25 65-persistent-disk.rules
    -rw-r--r-- 1 root root  385 2006-05-22 17:25 80-programs.rules
    -rw-r--r-- 1 root root  171 2006-05-29 15:03 85-alsa.rules
    -rw-r--r-- 1 root root  208 2006-05-22 18:09 85-hal.rules
    -rw-r--r-- 1 root root  81 2006-01-04 13:13 85-hdparm.rules
    -rw-r--r-- 1 root root  126 2006-05-16 04:43 85-hwclock.rules
    -rw-r--r-- 1 root root  657 2006-01-30 15:40 85-ifupdown.rules
    -rw-r--r-- 1 root root  937 2006-03-23 22:40 85-pcmcia.rules
    -rw-r--r-- 1 root root  82 2006-05-22 18:09 90-hal.rules
    -rw-r--r-- 1 root root 2534 2006-05-22 17:25 90-modprobe.rules
    -rw-r--r-- 1 root root  75 2006-05-22 17:25 99-udevmonitor.rules
    ... and:
    Code:
    $ ls -l /etc/udev/
    -rw-r--r-- 1 root root 1502 2006-08-03 13:25 logitechmouse.rules
    drwxr-xr-x 2 root root 816 2006-08-25 10:24 rules.d
    -rw-r--r-- 1 root root 226 2006-05-22 17:25 udev.conf
    Also checked loaded modules:
    Code:
    $ lsmod | grep sg
    sg           37920 0
    scsi_mod       139496 5 sbp2,sg,sr_mod,libata,initio
    Also some information about SCSI device /dev/sg0:
    Code:
    $ scsi_info /dev/sg0
    SCSI_ID="0,2,0"
    HOST="0"
    MODEL="HP C5110A"
    FW_REV="3701"
    Also proc is showing it:
    Code:
    $ cat /proc/scsi/scsi
    Attached devices:
    Host: scsi0 Channel: 00 Id: 02 Lun: 00
     Vendor: HP    Model: C5110A      Rev: 3701
     Type:  Processor            ANSI SCSI revision: 02

    First I run:
    Code:
    $ sudo 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 processor "HP C5110A 3701" at /dev/sg0
     # Your SCSI scanner was detected. It may or may not be supported by SANE. Try
     # scanimage -L and read the backend's manpage.
    
     # No USB scanners found. If you expected something different, make sure that
     # you have loaded a kernel driver for your USB host controller and have setup
     # the USB system correctly. See man sane-usb for details.
    
     # Not checking for parallel port scanners.
    
     # Most Scanners connected to the parallel port or other proprietary ports
     # can't be detected by this program.
    Just for case I checked permissions and group membership:
    Code:
    $ ls -l /dev/sg0
    crw-rw---- 1 root scanner 21, 0 2006-08-25 13:03 /dev/sg0
    Then I run:
    Code:
    $ sudo udevinfo -a -p /sys/class/scsi_generic/sg0
    
    udevinfo starts with the device the node belongs to and then walks up the
    device chain, to print for every device found, all possibly useful attributes
    in the udev key format.
    Only attributes within one device section may be used together in one rule,
    to match the device for which the node will be created.
    
    device '/sys/class/scsi_generic/sg0' has major:minor 21:0
     looking at class device '/sys/class/scsi_generic/sg0':
      KERNEL=="sg0"
      SUBSYSTEM=="scsi_generic"
      SYSFS{dev}=="21:0"
    
    follow the "device"-link to the physical device:
     looking at the device chain at '/sys/devices/platform/host0/target0:0:2/0:0:2:0':
      BUS=="scsi"
      ID=="0:0:2:0"
      DRIVER=="unknown"
      SYSFS{device_blocked}=="0"
      SYSFS{iocounterbits}=="32"
      SYSFS{iodone_cnt}=="0x472"
      SYSFS{ioerr_cnt}=="0x1"
      SYSFS{iorequest_cnt}=="0x472"
      SYSFS{model}=="C5110A     "
      SYSFS{queue_depth}=="1"
      SYSFS{queue_type}=="none"
      SYSFS{rev}=="3701"
      SYSFS{scsi_level}=="3"
      SYSFS{state}=="running"
      SYSFS{timeout}=="0"
      SYSFS{type}=="3"
      SYSFS{vendor}=="HP   "
    
     looking at the device chain at '/sys/devices/platform/host0/target0:0:2':
      BUS==""
      ID=="target0:0:2"
      DRIVER=="unknown"
    
     looking at the device chain at '/sys/devices/platform/host0':
      BUS==""
      ID=="host0"
      DRIVER=="unknown"
    
     looking at the device chain at '/sys/devices/platform':
      BUS==""
      ID=="platform"
      DRIVER=="unknown"
    Then I tried change the file /etc/udev/rules.d/45-libsane.rules and added the following rows at the end of this file:

    Code:
    SUBSYSTEM!="scsi_device", ACTION!="add", GOTO="libsane_rules_end"
    # Hewlett-Packard|ScanJet 5p
    SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="C5110A", MODE="664", GROUP="scanner"
    LABEL="libsane_rules_end"
    But I had to remove those lines from /etc/udev/rules.d/45-libsane.rules because my nVidia MX4000 graphics card 3D acceleration did not work. When I removed those lines - 3D acceleration works again.

    I also checked, that user is in group scanner.

    But XSane 0.97 still does not find nothing. It just waiting forever.

    Also if I run command
    Code:
    scanimage --list-devices
    then also it will wait forever...

    I tried also xscanimage but it also wait forever.

    Tried to make symlink:
    Code:
    sudo ln -s /dev/sg0 /dev/scanner
    ... but it didn't help...

    Did I make some mistake? Any ideas....?

    Also some other forum threads about this:
    http://ubuntuforums.org/showthread.php?t=197067
    http://ubuntuforums.org/showthread.php?p=1421275
    http://ubuntuforums.org/showthread.php?p=1420881

    and bug about this (with all my sane and udev configuration):
    https://launchpad.net/bugs/57743

    #2
    Re: Ho to get work HP ScanJet 5p SCSI scanner?

    This is also here written - http://ubuntuforums.org/showthread.php?p=1433047

    I added from Edgy Eft repository:
    xsane-common_0.99+0.991-1ubuntu1_all.deb
    xsane_0.99+0.991-1ubuntu1_i386.deb

    I installed them just using sudo apt-get install and also tried to build them using sudo apt-get -b source xsane and then installed using sudo dpkg -i command but it did not help.

    I also installed sane 1.0.18 and added to the file /etc/udev/rules.d/20-names.rules the following row:

    BUS="scsi", SYSFS{model}="C5110A", NAME="%k", MODE="0666"

    But still no help. This row was in file /etc/udev/udev.rules in Edubuntu 5.10 and then it worked. But it seems like in Kubuntu 6.06 it does not work Also does Kubuntu 6.06 not have such file like /etc/udev/udev.rules
    But I checked and found, that /etc/udev/rules.d/20-names.rules has similar structure and I wrote this row there, made restart to PC - still nothing

    So I have xsane 0.991, sane 1.0.18 and this row in /etc/udev/rules.d/20-names.rules and still nothing...

    Comment


      #3
      Re: Ho to get work HP ScanJet 5p SCSI scanner?

      Hi,

      I have the same scanner and the same issue, but on Mepis6.

      Could you try :

      scanimage -d hp:/dev/scanner --help

      or better :

      scanimage -d hp:/dev/scanner > image.pnm

      It works for me now ... but only from the command-line.

      With xsane it only worked once. It was running as root ... and I could not repeat it.

      ... why is xsane still looking for devices if you start it with the device it should look for ?

      Cheers, Ben

      Comment


        #4
        Re: Ho to get work HP ScanJet 5p SCSI scanner?

        And that's what I have or did to get there :

        Xsane is version 0.97, sane is 1.0.14-1.

        1) I defined in /etc/udev/rules.d/50-mepis-overrides.rules :

        # hp scanner
        BUS="scsi", SYSFS{model}="C5110A*", KERNEL="sg*", NAME="%k", SYMLINK="scanner", MODE="0666"

        2) In /etc/modules :

        sym53c416


        In the meantime, xsane is at 0.991 but that did not help either.

        Cheers, Ben

        Comment


          #5
          Re: Ho to get work HP ScanJet 5p SCSI scanner?

          Hi again,

          I have now xsane working with the HP Scanjet 5P.

          As the problem is with the searching after scanning devices, I tried the following : limit the search for devices. Adding the scanner to the cmdline does not seem to limit the search.

          So,

          -> edit /etc/sane.d/dll.conf, so it only contains now one entry :

          hp

          -> edit /etc/sane.d/hp.conf, it only contains :

          /dev/scanner

          -> removed (or rename) the directory /etc/sane.d/dll.d


          After this :

          $ scanimage -L
          device `hp:/dev/sg1' is a Hewlett-Packard C5110A flatbed scanner
          device `hp:/dev/scanner' is a Hewlett-Packard C5110A flatbed scanner



          Cheers, Ben

          Comment

          Working...
          X