Re: HP 5200C -- segfaults and "inappropriate ioctl for device"

From: Claus Ladekjær Wilson (clw@get2net.dk)
Date: Sun May 13 2001 - 11:51:14 PDT

  • Next message: Henning Meier-Geinitz: "Re: Hope you don't mind a HELP-ME! post?"

    scanimage has an option missing in xsane and xscanimage telling which the
    device to use. I use this command. This produces a rather large file which
    can afterwards be edited of course.
    scanimage -d hp:/dev/usb/scanner0 --mode Color --format TIFF --verbose
    --brightness 50 > /home/claus/work/claus-scan.tiff

    Den onsdag 09 Maj 2001 18:16 skrev du:
    > Anyone get this thing working with USB? It's driving me nuts. I think
    > it's configured correctly, but scanimage segfaults. Below is the last part
    > of the strace for scanimage, and hopefully it will help someone know what's
    > going on here.
    >
    > Config info:
    >
    > [root@eclipse /dev]# l *scanner
    > lrwxrwxrwx 1 root root 10 May 4 20:41 scanner ->
    > usbscanner crw-rw-rw- 1 root root 180, 48 May 4 19:54
    > usbscanner
    >
    > [root@eclipse /dev]# cat /etc/sane.d/hp.conf
    > /dev/usbscanner
    > option connect-device
    >
    > My kernel is the Red Hat 7.1 kernel, which is 2.4.2+"bugfixes". I have the
    > usbcore, usb-uhci, and scanner modules loaded. The kernel does see the
    > scanner and it shows up in usbview, however one strange thing is that
    > reading the list of SCSI devices (with usbview or by catting
    > /proc/bus/usb/devices) is VERY slow whenever the scanner is plugged in.
    > Like, it takes 10-20 seconds. When the scanner is not plugged in, it's
    > instantaneous. My SanDisk SDDR-31 USB CompactFlash reader works great, and
    > there is no delay accessing info while it is plugged in without the
    > scanner.
    >
    > Also, the sample program in the scanner.txt file in the kernel does seem to
    > work, but it also takes a long time before the scanning starts.
    >
    > I've tried SANE versions 1.0.3 shipped with Ximian GNOME and 1.0.4 compiled
    > from source. Both do the same thing.
    >
    > [micah@eclipse micah]$ strace scanimage -L
    > [...]
    > open("/proc/sys/kernel/sg-big-buff", O_RDONLY) = -1 ENOENT (No such file or
    > directory)
    > open("/dev/scanner", O_RDWR|O_EXCL) = 6
    > ioctl(6, TIOCSCCINI, 0xbfffe254) = -1 ENOTTY (Inappropriate ioctl
    > for device)
    > ioctl(6, TIOCGKISS, 0x401dead0) = -1 ENOTTY (Inappropriate ioctl
    > for device)
    > brk(0x8055000) = 0x8055000
    > brk(0x805a000) = 0x805a000
    > rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
    > rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    > rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
    > write(6, "*\0\0\0)\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 42) =
    > 42 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    > select(7, [6], NULL, NULL, NULL) = 1 (in [6])
    > rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
    > read(6, "", 41) = 0
    > rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    > --- SIGSEGV (Segmentation fault) ---
    > +++ killed by SIGSEGV +++
    >
    > Notice the "inappropriate ioctl for device" messages. That indicates to me
    > that there's a bug in scanimage.
    >
    > Any ideas? Anything else I can do to try to debug this? Is there a
    > hardware problem?
    >
    > Finally, does anyone know a way to convert the "out.dat" file that the
    > example in the kernel source produces into something useful? It would sure
    > be nice to get some scans in right now.
    >
    > Thanks!
    > Micah
    >
    >
    > --
    > Source code, list archive, and docs: http://www.mostang.com/sane/
    > To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

    -- 
    Greetings
    Claus Ladekjær Wilson
    Ny Adresse: Kirkedammen 19 2. tv
    8000 Århus C
    Nyt Tlf.nr.: 86112234
    hjem.get2net.dk/clw
    clw@get2net.dk
    fax 75828072
    running Linux Mandrake 7.2
    kernel 2.2.17
    

    -- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com



    This archive was generated by hypermail 2b29 : Sun May 13 2001 - 09:39:23 PDT