[sane-devel] Support for CanoScan 9000F and others: splitting pixma_mp150.c into two drivers

Gernot Hassenpflug aikishugyo at gmail.com
Sun Dec 18 15:52:00 UTC 2011


More updates:

Compiled latest SANE from git successfully and tested MP810 as example
device. Worked fine at 4800 dpi in TPU mode.

I am attaching the diffs  (diff -u <current git file> <modified file>
) for all the files that were modified to create and support the new
sub-driver, which I call pixma_mp810.c after the lowest-named device
it supports.

The attached file is a RARed file which expands into a sub-directory
named sub-driver-pixma_mp810.
It an be un-compressed using:

unrar x pixma_mp810.rar

The new or modified files are (all in /backend sub-directory):

Makefile.am
pixma_rename.h
pixma_common.c
pixma.h
pixma.c
pixma_mp150.c
pixma_mp810.c

More below.

On Sun, Dec 18, 2011 at 11:49 PM, Gernot Hassenpflug
<aikishugyo at gmail.com> wrote:
> Update:
>
> I am attaching a patch for pixma_mp750.c to implement grayscale. This
> was I believe submitted quite awhile ago, not sure if it got lost, but
> I am submitting it again since it is part of my customizations.
>
> On Sun, Dec 18, 2011 at 12:12 PM, Gernot Hassenpflug
> <aikishugyo at gmail.com> wrote:
>>
>> TODO:
>>
>> 1) I still need to test the MP810 and Canoscan 8800F.
>
> Done.
>
>> 2) Then I need to use the latest SANE code again to confirm that the changes
>> to the other pixma files work properly.

Done. Diffs are attached.

Testing process:

1) place new and modified files into /backend directory
pixma_rename.h
pixma_common.c
pixma.h
pixma.c
pixma_mp150.c
pixma_mp810.c

2) edit backend/Makefile.am to add pixma_mp810.c

3) autoconf && automake
This sets up backend/Makefile.am to contain references to the new
pixma_mp810 sub-driver

4) BACKENDS="pixma epson2" ./configure
(I did not wish to compile with all backends, just the 2 I use).
This sets up backend/Makefile to contain references to the new
pixma_mp810 sub-driver

5) make
This does the compilation

6) edit backend/Makefile to remove the "-g $(LOCKPATH_GROUP)" from the
install-lockpath command, which for some reason is not understood by
my 32-bit Debian system and therefore breaks "make install":

install-lockpath:
#       $(mkinstalldirs) -m 775 -g $(LOCKPATH_GROUP) $(DESTDIR)$(locksanedir)
        $(mkinstalldirs) -m 775 $(DESTDIR)$(locksanedir)

7) make install
This installs the new libsane libraries in /usr/local/lib/

8) modify xsane to test the new libsane
Note: for Debian, ldd `which xsane` shows that libsane is linked from
an entry in /usr/lib/i386-linux-gnu/:
libsane.so.1 => /usr/lib/i386-linux-gnu/libsane.so.1 (0xb76bf000)

So create links to the new libsane:
cd /usr/lib/i386-linux-gnu
ln -s /usr/local/lib/libsane.so.1.0.23 .
ln -sf libsane.so.1.0.23 libsane.so.1

Now xsane will see libsane.so.1.0.23 when it uses the link libsane.so.1

9) run xsane from command line and test scanner operation
First, set debug mode to see what is going on (3 is fine, 4 would
include some specific pixma debug statements):
export SANE_DEBUG_PIXMA=4
xsane

Done!

>> 3) Lastly I need to update documentation.
>
> Still to do.

Regards,
Gernot Hassenpflug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixma_mp810.rar
Type: application/rar
Size: 21733 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20111219/017cf71a/attachment-0001.rar>


More information about the sane-devel mailing list