HP Scan Jet Plus problems --- help!

Kipp C Cannon (kcannon@Phys.UAlberta.CA)
Tue, 27 Jul 1999 13:40:05 -0600 (MDT)

Hello. I am having trouble setting up my HP Scan Jet Plus.
Specifically, the problem is with hpscan (the device driver for the
parallel interface board). Although this isn't specifically a sane
development related question, this mail list is my last hope. I tried
sending e-mail to the address given with the source code but that was
several weeks ago and I haven't received a response so I'm assuming one
isn't coming.

I have a Red Hat 5.2 installation which makes my kernel version
2.0.36 and my compiler gcc 2.7.2.3. The hpscan site says that version
0.1.1.8 of hpscan is the version appropriate for the 2.0.x series of
kernels so that's the one I downloaded. When I try to compile it I get an
error and a warning:

hpscan.c:127: warning: suggest parentheses around comparison in operand of &
hpscan.c:511: redefinition of `kernel_version'
/usr/include/linux/module.h:95: `kernel_version' previously defined here

So, ok, line 127 of hpscan reads

if (inb_p(HPSJ_COUNT) & 0x3f != 0x2a)

The logical != operator has a higher precedence than the bitwise &
operator which makes this a very strange if() statement. I assume the
author meant to have parentheses around the bitwise & operation so I've
added them.

Line 511 is the definition of kernel_version[]:

char kernel_version[] = KERNEL_VERSION;

but this is indeed already defined in linux/module.h as

char kernel_version[]=UTS_RELEASE;

and UTS_RELEASE is in linux/version.h as

#define UTS_RELEASE "2.0.36"

Those seem reasonable to me so I've simply commented out the definition in
hpscan.c.

Having made these two corrections I can compile the code error-free. If I
then put hpscan.o into my modules directory and do a depmod -a, it returns
with the message

/lib/modules/2.0.36/misc/hpscan.o: unresolved symbol(s)

Well, having never done any device driver development myself I don't know
what this message means. I can imagine what it means but since depmod
doesn't give any details I have no idea what to do about it. If I try
"insmod hpscan" it says "create_module: Operation not permitted".

The final problem, although I'm not there yet, is how to create
/dev/hpscan. The source code says it wants to use major number 26 but it
doesn't say what minor number to use. 0? Also what kind of entry do I
create: character, block, or fifo? (I'm guessing character).

So my verdict is this thing simply does not work. If anybody *has* got
this thing to work could you please give me a hand? Thanks.

-Kipp

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