[sane-devel] Canon_pp errors with Sane 1.0.9

Emil Soleyman-Zomalan Emil Soleyman-Zomalan <emil@nishra.com>
Thu, 24 Oct 2002 18:07:15 -0700


Hi folks,

I've been having problems scanning with the current SANE release. I've
exported SANE_DEBUG_CANON_PP=100 value and then ran xsane to see what
might be going wrong.

The first half of the output shows that the scanner is at parport0 and
correctly detects port options. Once the scanner is awakened, the xsane
control panel comes up and I then choose either "acquire preview" or
"scan". If you look at the output, you can see that IEEE transfer starts
to decrement from 63600 down to 62 bytes once the scanner is in motion. 
When IEEE transfer gets down to 62 bytes, it just stops dead in its 
tracks.

I don't know what's really going wrong here. I'd be willing to help
track this problem down.

Thanks,
Emil Soleyman-Zomalan



FULL OUTPUT:

[sanei_debug] Setting debug level of canon_pp to 100.
[canon_pp] >> sane_init(0xbfffe5c4, 0x8056da8): Canon Parallel SANE
Backend $Rev
ision: 1.10 $
[canon_pp] sane_init: >> ieee1284_find_ports
[canon_pp] sane_init: 0 << ieee1284_find_ports
[canon_pp] sane_init: 1 parallel port(s) found.
[canon_pp] sane_init: port parport0
[canon_pp] >> init_device
[canon_pp] init_device: [configuring options]
[canon_pp] init_device: configuring opt: num_options
[canon_pp] init_device: configuring opt: resolution
[canon_pp] init_device: configuring opt: colour mode
[canon_pp] init_device: configuring opt: bit depth
[canon_pp] init_device: configuring opt: tl-x
[canon_pp] init_device: configuring opt: tl-y
[canon_pp] init_device: configuring opt: br-x
[canon_pp] init_device: configuring opt: br-y
[canon_pp] init_device: configuring opt: calibrate
[canon_pp] init_device: done opts
[canon_pp] << init_device
[canon_pp] sane_init: ># Define which port to use if one isn't specified
- you should only have<
[canon_pp] sane_init: ># one of these lines!<
[canon_pp] sane_init: ># This is the default port to be used - others
will be detected<
[canon_pp] sane_init: >ieee1284 parport0<
[canon_pp] sane_init: Successfully parsed default scanner.
[canon_pp] sane_init: ><
[canon_pp] sane_init: ><
[canon_pp] sane_init: ># Define the location of our pixel weight file,
can begin with ~/ if needed.<
[canon_pp] sane_init: ># You can have as many of these as you like -
lines with ports that don't exist<
[canon_pp] sane_init: ><
[canon_pp] sane_init: ># will be ignored.<
[canon_pp] sane_init: >#<
[canon_pp] sane_init: ># Parameters are:<
[canon_pp] sane_init: ># calibrate /path/to/calibration-file port-name<
[canon_pp] sane_init: >#<
[canon_pp] sane_init: ># The format of port-name is dependant on your
OS version .<
[canon_pp] sane_init: >#<
[canon_pp] sane_init: ># If a file isn't speficied, the default name
will be<
[canon_pp] sane_init: ># ~/.sane/canon_pp-calibration-[port-name]<
[canon_pp] sane_init: ><
[canon_pp] sane_init: >calibrate ~/.sane/canon_pp-calibration-pp0
parport0<
[canon_pp] sane_init: calibrate line, calibrate
~/.sane/canon_pp-calibration-pp0 parport0
[canon_pp] sane_init: calibrate line is for unknown port!
[canon_pp] sane_init: ><
[canon_pp] sane_init: ># calibrate /etc/sane/my_calibration parport1<
[canon_pp] sane_init: ><
[canon_pp] sane_init: ><
[canon_pp] sane_init: ># Enable the next line if you're having trouble
 with ECP mode such as I/O<
[canon_pp] sane_init: ># errors.  Nibble mode is slower, but more
reliable.<
[canon_pp] sane_init: ><
[canon_pp] sane_init: >#force_nibble<
[canon_pp] sane_init: ><
[canon_pp] sane_init: ># Set a default initialisation mode for each
port.  Valid modes are:<
[canon_pp] sane_init: ># AUTO           (attempts to automatically
detect by trying both methods)<
[canon_pp] sane_init: ># FB620P (10101010 style.. also works for
 FB320P)< 
[canon_pp] sane_init: ># FB630P (11001100 style.. also works for
FB330P, N340P, N640P)<
[canon_pp] sane_init: ><
[canon_pp] sane_init: >init_mode AUTO parport0<
[canon_pp] sane_init: init_mode line is for unknown port!
[canon_pp] sane_init: ># init_mode FB620P parport0<
[canon_pp] sane_init: ># init_mode FB630P parport0<
[canon_pp] detect_mode: Opening port parport0
[canon_pp] detect_mode: Claiming port.
[canon_pp] detect_mode: Port supports ECP-H.
[canon_pp] detect_mode: Port supports interrupts.
[canon_pp] detect_mode: Port supports DMA.
[canon_pp] detect_mode: Using ECP-H Mode
[canon_pp] sane_init: >> initialise
[canon_pp] Scanner not ready (0xb). Attempting to reset...
[canon_pp] Timeout: Scanner wakeup reply 1 (0x03 in 0x1f) - Status = 0x1f
[canon_pp] Timeout: Scanner wakeup reply 2 (0x03 in 0x1f) - Status = 0x1f
[canon_pp] Timeout: Scanner wakeup reply 1 (0x03 in 0x1f) - Status = 0x1f
[canon_pp] Timeout: Scanner wakeup reply 2 (0x03 in 0x1f) - Status = 0x1f
[canon_pp] Had to reset scanner, waiting for the head to get back.
[canon_pp] initialise: >> scanner_init
[canon_pp] NEW Send Command (length 10):
[canon_pp] << write[canon_pp] -> ieee_transfer(2) *
[canon_pp] IEEE transfer (2 bytes)
[canon_pp] <- (2)
[canon_pp] NEW Send Command (length 10):
[canon_pp] << write[canon_pp] -> ieee_transfer(2) *
[canon_pp] IEEE transfer (2 bytes)
[canon_pp] <- (2)
[canon_pp] initialise: << scanner_init
[canon_pp] NEW Send Command (length 10):
[canon_pp] << write[canon_pp] -> ieee_transfer(2) *
[canon_pp] IEEE transfer (2 bytes)
[canon_pp] <- (2)
[canon_pp] -> ieee_transfer(38) *
[canon_pp] IEEE transfer (38 bytes)
[canon_pp] <- (38)
[canon_pp] NEW Send Command (length 10):
[canon_pp] << write[canon_pp] -> ieee_transfer(2) *
[canon_pp] IEEE transfer (2 bytes)
[canon_pp] <- (2)
[canon_pp] -> ieee_transfer(12) *
[canon_pp] IEEE transfer (12 bytes)
[canon_pp] <- (12)
[canon_pp] sane_init: << 0 initialise
[canon_pp] sane_init: And back to sleep again
[canon_pp] NEW Send Command (length 10):
[canon_pp] << write[canon_pp] -> ieee_transfer(2) *
[canon_pp] IEEE transfer (2 bytes)
[canon_pp] <- (2)
[canon_pp] fix_weights_file: Calibration file is good for opening!
[canon_pp] << sane_init
[canon_pp] >> sane_get_devices (0xbfffe614, 0)
[canon_pp] << sane_get_devices
[canon_pp] >> sane_open (h=0xbffff470, name="parport0")
[canon_pp] sane_open: >> initialise
[canon_pp] initialise: >> scanner_init
[canon_pp] NEW Send Command (length 10):
[canon_pp] << write[canon_pp] -> ieee_transfer(2) *
[canon_pp] IEEE transfer (2 bytes)
[canon_pp] <- (2)
[canon_pp] NEW Send Command (length 10):
[canon_pp] << write[canon_pp] -> ieee_transfer(2) *
[canon_pp] IEEE transfer (2 bytes)
[canon_pp] <- (2)
[canon_pp] initialise: << scanner_init
[canon_pp] NEW Send Command (length 10):
[canon_pp] << write[canon_pp] -> ieee_transfer(2) *
[canon_pp] IEEE transfer (2 bytes)
[canon_pp] <- (2)
[canon_pp] -> ieee_transfer(38) *
[canon_pp] IEEE transfer (38 bytes)
[canon_pp] <- (38)
[canon_pp] NEW Send Command (length 10):
[canon_pp] << write[canon_pp] -> ieee_transfer(2) *
[canon_pp] IEEE transfer (2 bytes)
[canon_pp] <- (2)
[canon_pp] -> ieee_transfer(12) *
[canon_pp] IEEE transfer (12 bytes)
[canon_pp] <- (12)
[canon_pp] sane_open: << 0 initialise
[canon_pp] sane_open: >>
load_weights(/home/emil/.sane/canon_pp-calibration-parp
ort0, 0x8113b4c)
[canon_pp] sane_open: << 0 load_weights
[canon_pp] sane_open: loadweights successful, uploading gamma profile...
[canon_pp] NEW Send Command (length 10):
[canon_pp] << write[canon_pp] NEW Send Command (length 32):
[canon_pp] << write[canon_pp] -> ieee_transfer(2) *
[canon_pp] IEEE transfer (2 bytes)
[canon_pp] <- (2)
[canon_pp] sane_open: after adjust_gamma Status = 0
[canon_pp] << sane_open

...

[canon_pp] << 0 init_scan
[canon_pp] << sane_start
[canon_pp] >> sane_get_parameters (h=0x81139a8, params=0x815c7d4)
[canon_pp] get_params: bytes_per_line=636, pixels_per_line=636,
lines=876
max_res=600, res=75, max_height=877, br_y=297, tl_y=0,
mm_per_in=25.400000
[canon_pp] << sane_get_parameters
[canon_pp] >> sane_set_io_mode (0x81139a8, 1) (not really supported)
[canon_pp] << sane_set_io_mode
[canon_pp] >> sane_read (h=0x81139a8, buf=0xbfffc8a8, maxlen=8192)
[canon_pp] sane_read: Here's what we're sending read_segment:
[canon_pp] scanner setup: shw=5104 xres=3 yres=3 0 0 id=CANON
IX-06075E       
1.00
[canon_pp] scan_params->: width=636, height=876, xoffset=0, yoffset=0
        xresolution=0, yresolution=0, mode=0, (lines=80)
[canon_pp] >> read_segment(0xbfffc7f4, 0x8113b4c, 0x8113c14, 80,
1, 876)

--- REPEATED 15 TIMES -------------

[canon_pp] NEW Send Command (length 10):
[canon_pp] << write[canon_pp] -> ieee_transfer(2) *
[canon_pp] IEEE transfer (2 bytes)

-----------------------------------

[canon_pp] -> ieee_transfer(4) *
[canon_pp] IEEE transfer (4 bytes)
[canon_pp] <- (4)
[canon_pp] -> ieee_transfer(63600) *
[canon_pp] IEEE transfer (63600 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(62576)
[canon_pp] IEEE transfer (62576 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(61552)
[canon_pp] IEEE transfer (61552 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(60528)
[canon_pp] IEEE transfer (60528 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(59504)
[canon_pp] IEEE transfer (59504 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(58480)
[canon_pp] IEEE transfer (58480 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(57456)
[canon_pp] IEEE transfer (57456 bytes)

...

[canon_pp] -> ieee_transfer(12400)
[canon_pp] IEEE transfer (12400 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(11376)
[canon_pp] IEEE transfer (11376 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(10352)
[canon_pp] IEEE transfer (10352 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(9328)
[canon_pp] IEEE transfer (9328 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(8304)
[canon_pp] IEEE transfer (8304 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(7280)
[canon_pp] IEEE transfer (7280 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(6256)
[canon_pp] IEEE transfer (6256 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(5232)
[canon_pp] IEEE transfer (5232 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(4208)
[canon_pp] IEEE transfer (4208 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(3184)
[canon_pp] IEEE transfer (3184 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(2160)
[canon_pp] IEEE transfer (2160 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(1136)
[canon_pp] IEEE transfer (1136 bytes)
[canon_pp] <- (1024)
[canon_pp] -> ieee_transfer(112)
[canon_pp] IEEE transfer (112 bytes)
[canon_pp] <- (50)
[canon_pp] -> ieee_transfer(62)
[canon_pp] IEEE transfer (62 bytes)