[sane-devel] Mustek Paragon 600 II N and OpenBSD 3.2 problems

Henning Meier-Geinitz henning@meier-geinitz.de
Fri, 11 Apr 2003 18:18:51 +0200


Hi,

On Fri, Apr 11, 2003 at 01:30:27PM +0200, rabbit wrote:
> I'm trying to get a Mustek Paragon 600 II N scanner to work on an OpenBSD
> 3.2/i386 pc. The scanner is supported by SANE, and works on Linux, but
> isn't detected on OpenBSD.
> I think it has something to do with how raw IO port access is handled on
> the different operating systems,

Most probably, yes.

> but my programming skills aren't good enough to solve the problem
> myself ;) (yup, it's that scanner with that funky ISA-card ;) )

There are not many people with this scanner out there and as far as I
know you are the first one using OpenBSD trying it :-)

> I have tried changing all FreeBSD ifdefs to OpenBSD in
> sanei/sanei_ab306.c, to force FreeBSD-style IO port access, but that
> didn't help out.

Does the access to i/o ports work in OpenBSD like in FreeBSD?

> SANE compiles fine, everything seems to run just fine, only the scanner
> isn't found.
> Note: I have tried different ports in the configuration file, but I doubt
> that's the problem.
> 
> $ scanimage --version
> scanimage (sane-backends) 1.0.11; backend version 1.0.11
> $ cat /usr/local/etc/sane.d/mustek.conf
> #-------------------------- 600 II N ----------------------------------
> 0x2eb
>                                 # For the 600 II N try one of 0x26b, 0x2ab,
>                                 # 0x2eb, 0x22b, 0x32b, 0x36b,  0x3ab, 0x3eb.

Looks fine.

> # option linedistance-fix       # only neccessary with firmware 2.x

Most probably not necessary. If you really have firmware 2.0, you
should give your scanner to a museum because it's that seldom :-)

> $ export SANE_DEBUG_MUSTEK=5

export SANE_DEBUG_SANEI_AB306=255

> $ sudo scanimage -L
> Password:
> [sanei_debug] Setting debug level of mustek to 5.
> [mustek] SANE mustek backend version 1.0 build 130 from sane-backends
> 1.0.11
> [mustek] sane_init: authorize != null
> [mustek] sane_init: using sanei_scsi_open_extended
> [mustek] sane_init: reading config file `mustek.conf'
> [mustek] sane_init: config file line 1: ignoring comment line
> [mustek] sane_init: config file line 2: trying to attach `0x2eb'
> [mustek] attach: trying device 0x2eb
> [mustek] dev_open 0x2eb
> [mustek] dev_open: Invalid argument: can't open 0x2eb as a SCSI device
> [mustek] dev_open: Error during device I/O: can't open 0x2eb as an AB306N device

Looks like this code in sanei_ab306_get_io_privilege fails:

      if (dev_io_fd == 0)
      	 dev_io_fd = open ("/dev/io", O_RDONLY);

Maybe there is no /dev/io in OpenBSD or its name is different?

Bye,
  Henning