[sane-devel] canon630u 'Device busy' - Sane 1.0.9, Xsane 0.90, Mandrake 9.0

Andrew Kovacs atkova at isa.mim.com.au
Tue Jan 7 06:10:42 GMT 2003


Hi all,

Whenever I try to use my Canon FB630 USB scanner, with either scanimage or
xsane, it returns a 'Device busy' message.

I'm new to Linux.  I started three months ago, and I've tried RH 7.3 (I
upgraded to sane 1.0.8 - RH rpm), RH 8.0 and now Mandrake 9.0.  In each case
I haven't been able to get my scanner working under Linux.  It works fine
with MS windows.

I'm sticking with Mandrake until I've exhausted all possibilities.  This is
the only distribution I've put all this effort into, so if this fails, I can
still go back and retry one of the other distributions.
I'm hoping someone out there can suggest some reason my scanner doesn't work
(returns the 'Device busy' message).


sane-find-scanner now finds it OK, and both scanimage and xsane correctly
identify it as the canon630u usb scanner, but claim it is busy and so won't
scan an image.

I've read all the relevant (usb, canon, etc...) postings from November 2002
till today, and tried most of what's been suggested, but with little
success.

The scanner did work once with the sane 1.0.8 supplied with Mandrake 9.0,
and then no more (after I rebooted).

To get this to work in the first place, I had to:

modprobe scanner vendor=0x04a9 product=0x2204 (I've since added this to the
rc.local file)

which got the 'driver=usbscanner' to appear in /proc/bus/usb/devices.

Edit the canon630u.conf backend to include both:

usb vendor=0x04a9 product=0x2204
/dev/usb/scanner0

dll.conf was OK, but just to be sure to eliminate conflicts, I commented out
(# in front of) all statements except 'canon630u'.  I uncommented 'net' to
see if it had any effect, but it didn't.

I have tried editing 'canon630u.conf' to have only one of either
'/dev/usb/scanner0', 'device /dev/usb/scanner0' or 'usb vendor=0x04a9
product=0x2204', and then all combinations of all three, but to no effect.
I even tried '/dev/usbscanner', but to no effect.

I have checked my scanner permissions to ensure that I get crw-rw-rw for
/dev/usb/scanner0, and this is correct.
A clue to the problem may be that every time I boot up, the system changes
this back to crw-------.  I don't know where this is set.

Eventually I came to the conclusion that the problem might be with
Mandrake's implementation of sane 1.0.8, so I used gurpmi to uninstall it,
downloaded the sane 1.0.9 backends and xsane 0.90 sources from their
relevant home sites, untarred them into their own directories as user, and
did the './configure', then 'make', then 'make install'.  I did the 'make
install' as root, in case there might be a permissions problem.  I used
KDE's find file tool and searched for *sane* starting from / and did not
find any other instances of sane or xsane.

I have provided the following file listings and command outputs, as I have
noticed that these are the most requested information by those 'in the know'
(and that's definitely not me!).



This is my existing canon630u.conf file.
[root at localhost root]# cat /usr/local/etc/sane.d/canon630u.conf
# Options for the canonusb backend

# Autodetect the Canon CanoScan FB630u
usb 0x04a9 0x2204

# device list for non-linux-systems (enable if autodetect fails):
#/dev/scanner
/dev/usb/scanner0


This is my existing rc.local file.  It's standard Mandrake 9.0 except for
the last two lines.  It may be useful?
[root at localhost root]# cat /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

[ -f /etc/sysconfig/msec ] && source /etc/sysconfig/msec
[ -z "$SECURE_LEVEL" ] && SECURE_LEVEL=3

# Source functions
. /etc/init.d/functions

if [ -f /etc/mandrake-release -a $SECURE_LEVEL -lt 4 ]; then
    R=$(cat /etc/mandrake-release)

    arch=$(uname -m)
    a="a"
    case "_$arch" in
            _a*) a="an";;
            _i*) a="an";;
    esac

    NUMPROC=`egrep -c "^cpu[0-9]+" /proc/stat`
    if [ "$NUMPROC" -gt "1" ]; then
        SMP="$NUMPROC-processor "
        [ "$NUMPROC" = "2" ] && \
        SMP="Dual-processor "
        if [ "$NUMPROC" = "8" -o "$NUMPROC" = "11" ]; then
            a="an"
        else
            a="a"
        fi
    fi

    # This will overwrite /etc/issue at every boot.  So, make any changes
you
    # want to make to /etc/issue here or you will lose them when you reboot.

    if [ -x /usr/bin/linux_logo ];then
        /usr/bin/linux_logo -c -n -f | sed -e 's|\\|\\\\|g' > /etc/issue
        echo "" >> /etc/issue
    else
        > /etc/issue
    fi
    echo "$R" >> /etc/issue
    echo "Kernel $(uname -r) on $a $SMP$(uname -m) / \l" >> /etc/issue

    if [ "$SECURE_LEVEL" -le 3 ];then
        echo "Welcome to ${HOST}" > /etc/issue.net
        echo "$R" >> /etc/issue.net
        echo "Kernel $(uname -r) on $a $SMP$(uname -m)" >> /etc/issue.net
    else
        echo "Welcome to Mandrake Linux" > /etc/issue.net
        echo "-------------------------" >> /etc/issue.net
    fi
elif [ $SECURE_LEVEL -ge 4 ]; then
    rm -f /etc/issue /etc/issue.net
fi

touch /var/lock/subsys/local

# This turns on the scanner kernel module with the Canon FB630U scanner.

modprobe scanner vendor=0x04a9 product=0x2204





My existing /proc/bus/usb/drivers file.
[root at localhost root]# cat /proc/bus/usb/drivers
         usbdevfs
         hub
 96-111: hiddev
         hid
  0- 15: usblp
 48- 63: usbscanner



My existing /proc/bus/usb/devices file.  I believe Driver=usbscanner is the
critical line (along with correct vendor and product ids).
[root at localhost root]# cat /proc/bus/usb/devices
T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=d800
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=d400
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=1.5 MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=046d ProdID=c207 Rev= 1.04
S:  Manufacturer=Logitech Inc.
S:  Product=WingMan Extreme Digital 3D
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 20mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=hid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=04a9 ProdID=2204 Rev= 0.01
S:  Product=CanoScan FB630U
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=10(unk. ) Sub=01 Prot=00 Driver=usbscanner
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
 

My existing /proc/bus/usb/dll.conf file.
[root at localhost root]# cat /usr/local/etc/sane.d/dll.conf
# enable the next line if you want to allow access through the network:
#net
#abaton
#agfafocus
#apple
#avision
#artec
#as6e
#bh
#canon
canon630u
#canon_pp
#coolscan
#coolscan2
#dc25
#dc210
#dc240
#dmc
#epson
#fujitsu
#hp
#hpsj5s
#leo
#matsushita
#microtek
#microtek2
#mustek
#mustek_pp
#mustek_usb
#nec
#pie
#pint
#plustek
#pnm
#qcam
#ricoh
#s9036
#sceptre
#sharp
#sm3600
#snapscan
#sp15c
#st400
#tamarack
#teco1
#teco2
#teco3
#test
#umax
#umax_pp
#umax1220u
#v4l
#
# The following backends are not included in the sane-backends distribution
# If you want to use them, download them from their webpages and read their
# documentation
#
# HP OfficeJet backend homepage: http://hpoj.sf.net/
# Uncomment the following line if hpoj is installed:
#hpoj
#
# gt68xx backend homepage: http://www.meier-geinitz.de/sane/gt68xx-backend/
# Uncomment the following line if gt68xx is installed:
#gt68xx


My /dev/usb/scanner0 device permissions, as found and...
[root at localhost root]# ls /dev/usb/scanner0 -l
crw-------    1 root     root     180,  48 Jan  1  1970 /dev/usb/scanner0

After I've modified them.  I have to chmod to this state after every boot
up.
[root at localhost root]# ls /dev/usb/scanner0 -l
crw-rw-rw-    1 root     root     180,  48 Jan  1  1970 /dev/usb/scanner0


The output of the sane-find-scanner command (after modprobe and setting up
the .conf files).
[root at localhost root]# sane-find-scanner

  # No SCSI scanners found. If you expected something different, make sure
that
  # you have loaded a SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04a9, product=0x2204) at /dev/usb/scanner0
  # Your USB scanner was detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Scanners connected to the parallel port or other proprietary ports can't
be
  # detected by this program.


 
The output of various scanimage commands.
[root at localhost root]# scanimage -L
device `canon630u:/dev/usb/scanner0' is a CANON Canoscan FB630U flatbed
scanner

[root at localhost root]# scanimage --version
scanimage (sane-backends) 1.0.9; backend version 1.0.9

[root at localhost root]# scanimage
scanimage: sane_start: Device busy

[root at localhost root]# scanimage -d canon630u:/dev/usb/scanner0
scanimage: sane_start: Device busy



Finally, the output of lsmod, and as a last resort, the scanimage debug
command.  I don't understand that one, so I entered it as I thought it
should be from various posts and the scanimage man page.
[root at localhost root]# lsmod
Module                  Size  Used by    Tainted: P
sg                     31276   0  (autoclean)
scanner                 9140   0
parport_pc             21672   1  (autoclean)
lp                      6720   0  (autoclean)
parport                23936   1  (autoclean) [parport_pc lp]
agpgart                31840   3  (autoclean)
printer                 6944   0  (unused)
nvidia               1469056  10  (autoclean)
snd-seq-midi            3680   0  (autoclean) (unused)
snd-emu10k1-synth       4220   0  (autoclean) (unused)
snd-emux-synth         25532   0  (autoclean) [snd-emu10k1-synth]
snd-seq-midi-emul       4880   0  (autoclean) [snd-emux-synth]
snd-seq-virmidi         2888   0  (autoclean) [snd-emux-synth]
snd-seq-oss            26176   0  (unused)
snd-seq-midi-event      3208   0  [snd-seq-midi snd-seq-virmidi snd-seq-oss]
snd-seq                33264   2  [snd-seq-midi snd-emux-synth
snd-seq-midi-emul snd-seq-virmidi snd-seq-oss snd-seq-midi-event]
snd-pcm-oss            36932   0
snd-mixer-oss           9016   0  [snd-pcm-oss]
snd-emu10k1            56592   0  [snd-emu10k1-synth]
snd-pcm                55808   0  [snd-pcm-oss snd-emu10k1]
snd-timer               9964   0  [snd-seq snd-pcm]
snd-util-mem            1280   0  [snd-emux-synth snd-emu10k1]
snd-rawmidi            12864   0  [snd-seq-midi snd-seq-virmidi snd-emu10k1]
snd-seq-device          3836   0  [snd-seq-midi snd-emu10k1-synth
snd-emux-synth snd-seq-oss snd-seq snd-emu10k1 snd-rawmidi]
snd-ac97-codec         25508   0  [snd-emu10k1]
snd-hwdep               3840   0  [snd-emu10k1]
snd                    24804   0  [snd-seq-midi snd-emux-synth
snd-seq-virmidi snd-seq-oss snd-seq-midi-event snd-seq snd-pcm-oss
snd-mixer-oss snd-emu10k1 snd-pcm snd-timer snd-util-mem snd-rawmidi
snd-seq-device snd-ac97-codec snd-hwdep]
soundcore               3780   0  [snd]
nfsd                   66576   0  (autoclean)
lockd                  46480   0  (autoclean) [nfsd]
sunrpc                 60188   0  (autoclean) [nfsd lockd]
ppp_async               7456   0  (unused)
ppp_generic            20064   0  [ppp_async]
slhc                    5072   0  [ppp_generic]
af_packet              13000   0  (autoclean)
joydev                  5632   0  (unused)
keybdev                 1920   0  (unused)
mousedev                4116   0  (unused)
ip_vs                  74328   0  (autoclean)
hid                    18340   0  (unused)
input                   3456   0  [joydev keybdev mousedev hid]
nls_iso8859-15          3356  14  (autoclean)
nls_cp850               3580  14  (autoclean)
vfat                    9588  14  (autoclean)
fat                    31864   0  (autoclean) [vfat]
ide-cd                 28712   0
cdrom                  26848   0  [ide-cd]
ide-scsi                8212   0
scsi_mod               90372   2  [sg ide-scsi]
usb-uhci               21676   0  (unused)
usbcore                58304   1  [scanner printer hid usb-uhci]
rtc                     6560   0  (autoclean)
ext3                   74004   1
jbd                    38452   1  [ext3]




[root at localhost root]# SANE_DEBUG_CANON630U=255 scanimage -d
canon630u:/dev/usb/scanner0
[sanei_debug] Setting debug level of canon630u to 255.
[canon630u] sane_init: version_code != 0, authorize != 0
[canon630u] sane_init: SANE Canon630u backend version 1.0.1 from
sane-backends-1.0.9
[canon630u] reading configure file canon630u.conf
[canon630u] attach_matching_devices(usb 0x04a9 0x2204)
[canon630u] attach_scanner: /dev/usb/scanner0
[canon630u] attach_scanner: opening /dev/usb/scanner0
[canon630u] CANON_open_device: `/dev/usb/scanner0'
[canon630u] CANON_close_device:
[canon630u] attach_matching_devices(/dev/usb/scanner0)
[canon630u] attach_scanner: /dev/usb/scanner0
[canon630u] finished reading configure file
[canon630u] sane_open
[canon630u] sane_open: devicename=/dev/usb/scanner0
[canon630u] CANON_open_device: `/dev/usb/scanner0'
[canon630u] sane_control_option: handle=0x80507f0, opt=0, act=0,
val=0xbffff2f0, info=(nil)
[canon630u] sane_control_option: handle=0x80507f0, opt=0, act=0,
val=0xbffff278, info=(nil)
[canon630u] sane_get_option_descriptor: option = 0
[canon630u] sane_get_option_descriptor: option = 1
[canon630u] sane_get_option_descriptor: option = 2
[canon630u] sane_get_option_descriptor: option = 3
[canon630u] sane_get_option_descriptor: option = 4
[canon630u] sane_get_option_descriptor: option = 5
[canon630u] sane_control_option: handle=0x80507f0, opt=5, act=0,
val=0x8050418, info=(nil)
[canon630u] sane_get_option_descriptor: option = 6
[canon630u] sane_control_option: handle=0x80507f0, opt=6, act=0,
val=0x805041c, info=(nil)
[canon630u] sane_control_option: handle=0x80507f0, opt=3, act=0,
val=0xbffff274, info=(nil)
[canon630u] sane_control_option: handle=0x80507f0, opt=4, act=0,
val=0xbffff274, info=(nil)
[canon630u] sane_control_option: handle=0x80507f0, opt=3, act=0,
val=0xbffff2ec, info=(nil)
[canon630u] sane_get_option_descriptor: option = 5
[canon630u] sane_control_option: handle=0x80507f0, opt=5, act=1,
val=0xbffff2e8, info=0xbffff278
[canon630u] sane_control_option: handle=0x80507f0, opt=4, act=0,
val=0xbffff2ec, info=(nil)
[canon630u] sane_get_option_descriptor: option = 6
[canon630u] sane_control_option: handle=0x80507f0, opt=6, act=1,
val=0xbffff2e8, info=0xbffff278
[canon630u] sane_start
[canon630u] CANON_set_scan_parameters:
[canon630u] gray  = 0 (ignored)
[canon630u] res   = 75
[canon630u] gain  = 1
[canon630u] in 600dpi pixels:
[canon630u] left  = 0, top    = 0
[canon630u] right = 1199, bottom = 1199
[canon630u] CANON_start_scan called
[canon630u] write_byte(fd, 0x42, 0x06);
[canon630u] write_byte(fd, 0x0b, 0x0d);
[canon630u] write_byte(fd, 0x0c, 0x4c);
[canon630u] write_byte(fd, 0x0d, 0x2f);
[canon630u] read_byte(fd, 0x0b, &result); /* got 0d */
[canon630u] read_byte(fd, 0x0c, &result); /* got 4c */
[canon630u] read_byte(fd, 0x0d, &result); /* got 2f */
[canon630u] write_byte(fd, 0x70, 0x73);
[canon630u] init: 5
[canon630u] read_byte(fd, 0x02, &result); /* got 20 */
[canon630u] CANON_finish_scan:
[canon630u] removing temp file /tmp/scan.Gjfjmf
scanimage: sane_start: Device busy
[canon630u] sane_cancel: handle = 0x80507f0
[canon630u] sane_cancel: cancelling is unsupported in this backend
[canon630u] sane_close
[canon630u] CANON_close_device:
[canon630u] sane_exit

My machine is a normal desktop unit, not connected to a network (except
occaisonally as an Internet client :-))

Motherboard		Soltek SL75KV
Processor		AMD Duron 1.2Ghz
RAM			448 Mb 133 Mhz RDRAM
Video			Leadtek GeForce2 MMX 400 32 Mb
Sound			SoundBlaster Value Live
Printer			HP Deskjet 1220C USB


I apologise for the extremely long-winded post and all the outputs, but I've
only included what I think might help, based on what I've tried and what
I've read in other posts.

Thanks on advance to anyone who's taken the time to go through this, and for
any solutions offered.

Regards,
Andrew Kovacs


**********************************************************************
The information contained in this e-mail is confidential and is
intended only for the use of the addressee(s).
If you receive this e-mail in error, any use, distribution or
copying of this e-mail is not permitted. You are requested to
forward unwanted e-mail and address any problems to the
MIM Holdings Limited Support Centre.
For general enquires:	++61 7 3833 8000
Support Centre e-mail:	supportcentre at mim.com.au
Support Centre phone:  	Australia 1800500646
        				International ++61 7 38338042
**********************************************************************




More information about the sane-devel mailing list