[sane-devel] Re: canon_pp on FreeBSD 5-STABLE

Rob Pollock Rob Pollock <rob.pollock@gmail.com>
Sun, 10 Apr 2005 17:35:17 +1200


whoops forgot to send this to sane-devel (sorry)
Hi matt,

thanks very much for getting back to me and for your suggestions.
Still no joy, but here is the (rather long) debug output (level 200)
Maybe there is some indication of where the problem is??

[sanei_debug] Setting debug level of canon_pp to 200.
[canon_pp] >> sane_init(0xbfbf677c, 0x8049200): sane-backends 1.0.15
[canon_pp] sane_init: >> ieee1284_find_ports
[canon_pp] sane_init: 0 << ieee1284_find_ports
[canon_pp] sane_init: 3 parallel port(s) found.
[canon_pp] sane_init: port 0x278
[canon_pp] >> init_device
[canon_pp] init_device: [configuring options]
...
[canon_pp] init_device: done opts
[canon_pp] << init_device
[canon_pp] sane_init: port 0x378
[canon_pp] >> init_device
[canon_pp] init_device: [configuring options]
...
[canon_pp] init_device: done opts
[canon_pp] << init_device
[canon_pp] sane_init: port 0x3bc
[canon_pp] >> init_device
[canon_pp] init_device: [configuring options]
...
[canon_pp] init_device: done opts
[canon_pp] << init_device
...
[canon_pp] sane_init: >ieee1284 0x378<
[canon_pp] sane_init: Successfully parsed default scanner.
...
[canon_pp] sane_init: >calibrate ~/.sane/canon_pp-calibration-pp0 0x378<
[canon_pp] sane_init: calibrate line, calibrate
~/.sane/canon_pp-calibration-pp0 0x378
[canon_pp] sane_init: Finding scanner on port '0x378'
[canon_pp] sane_init: Found!

...that's interesting!

[canon_pp] sane_init: Parsed cal, for port '0x378', weight file is
'~/.sane/canon_pp-calibration-pp0'.
[canon_pp] sane_init: ><

[canon_pp] sane_init: >#force_nibble<

commented out (force nibble doesn't help, I tried)

[canon_pp] sane_init: ><
...
[canon_pp] sane_init: >init_mode FB630P 0x378<
[canon_pp] sane_init: Parsed init.
...
[canon_pp] detect_mode: Opening port 0x3bc
[canon_pp] detect_mode: Claiming port.
[canon_pp] detect_mode: Port supports ECP-S.
[canon_pp] detect_mode: Using ECP-S Mode
[canon_pp] sane_init: >> initialise
[canon_pp] Scanner not ready (0xf). Attempting to reset...
[canon_pp] Timeout:
...
[canon_pp] Timeout: Reply 2 (0x0c in 0x1f) - Status = 0x0f
[canon_pp] initialise: could not wake scanner
[canon_pp] sane_init: << 1 initialise
[canon_pp] sane_init: Couldn't contact scanner on port 0x3bc. Probably
no scanner there?
[canon_pp] detect_mode: Opening port 0x378
[canon_pp] detect_mode: Claiming port.
[canon_pp] detect_mode: Port supports ECP-S.
[canon_pp] detect_mode: Using ECP-S Mode
[canon_pp] sane_init: >> initialise
[canon_pp] Scanner not ready (0xf). Attempting to reset...
[canon_pp] Timeout: ...
...
[canon_pp] Timeout: Reply 2 (0x0c in 0x1f) - Status = 0x0f
[canon_pp] initialise: could not wake scanner
[canon_pp] sane_init: << 1 initialise
[canon_pp] sane_init: Couldn't contact scanner on port 0x378. Probably
no scanner there?
[canon_pp] detect_mode: Opening port 0x278
[canon_pp] detect_mode: Claiming port.
[canon_pp] detect_mode: Port supports ECP-S.
[canon_pp] detect_mode: Using ECP-S Mode
[canon_pp] sane_init: >> initialise
[canon_pp] Scanner not ready (0xf). Attempting to reset...
[canon_pp] Timeout:
...
[canon_pp] Timeout: Reply 2 (0x0c in 0x1f) - Status = 0x0f
[canon_pp] initialise: could not wake scanner
[canon_pp] sane_init: << 1 initialise
[canon_pp] sane_init: Couldn't contact scanner on port 0x278. Probably
no scanner there?
[canon_pp] << sane_init
[canon_pp] >> sane_get_devices (0xbfbf67b0, 0)
[canon_pp] << sane_get_devices
scanimage: no SANE devices found
[canon_pp] >> sane_exit
[canon_pp] << sane_exit

Not working yet.  Surely it must be possible.

I installed libieee1284 from ports (it's a fairly new port).  Is there
any way to
get debugging output from this library?  

Thanks for your help
Rob Pollock

On Thu, 7 Apr 2005 17:03:37 +1000, Matthew Duggan <stauff@guarana.org> wrote:
> On Wed, Apr 06, 2005 at 08:47:46PM +1200, Rob Pollock wrote:
> > Hi,
> > 
> 
> Hi!
> 
> > I am trying to set up my scanner to work via my old laptop on which I
> > have installed
> > FreeBSD 5-STABLE (started with 5.3, then cvsuped source and rebuilt).
> > 
> > I am running sane-backends 1.0.15 and trying to get it to work with a
> canon 640P
> > scanner.
> > 
> > This is what I get when I run scanimage (as root btw)
> 
> Good good.. non-root parport access isn't really supported on FreeBSD.
> > 
> > [sanei_debug] Setting debug level of canon_pp to 4.
> [more stuff]
> > scanimage: no SANE devices found
> > [canon_pp] >> sane_exit
> > [canon_pp] << sane_exit
> > 
> > This is very strange, it's exactly the same as when the device isn't
> > plugged in (and it _is_ plugged in, I checked), or in fact when it
> > isn't even connected to the parallel port.
> 
> Could you set the debug a bit higher for me (say, 200)?  I have a
> feeling I know what it will say (just a bunch of timeouts), but it might
> be worth trying
>  
> > The port/scanner itself works fine, under Windows no problemo.  The
> > settings from Windows' device manager are:
> > ECP printer port; IRQ 07; I/O 0x0378-0x037B; DMA 0
> > 
> > dmesg under FreeBSD shows:
> > 
> > ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
> > ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode
> ...
> 
> Unfortunately the ppc interface doesn't do what libieee1284 needs, so it
> resorts to direct io port access (via /dev/io).  That's why you're
> seeing the three ports.  I lied above.. you can use it as non-root by
> modifying the permissions on that file.
> 
> > libieee1284 is installed, if you run the test utility you get:
> > 
> > Found 3 ports:
> >   0x278: 
> >   0x378: 
> >   0x3bc: 
> ...
> > Anyway, I am really quite keen to get this working, anyone able to help
> out??
> 
> Try specifying the port that you know you have (0x378) in your
> canon_pp.conf file, that makes the driver default to trying that port
> first.  Otherwise, I'm not sure what might be wrong.  The libieee1284
> FreeBSD support was written a while back and I've never been very happy
> with it.  I think it requires the time of a more knowledgable FreeBSD
> person than myself.
> 
> > Thanks heaps,
> > 
> > Rob Pollock.
> 
> Cheers,
> 
> - Matthew Duggan
>