[sane-devel] Canon Pixma MX435 Detection

Louis Lagendijk louis at fazant.net
Thu Sep 6 18:56:45 UTC 2012


hello list (especially Rolf and Gernot)

We had this report for detection of an MX430 not working. The log
included in the mail shows that the scanner reports itself in the bjnp
protocol as follows:

> > [pixma] Scanner identity string = MFG:Canon;CMD:MultiPass 2.1,IVEC;MDL:MX430
> > series;CLS:IMAGE;DES:Canon MX430 series;SOJ:BJNP2,BJNPe;~
> > [pixma] Scanner model = Canon MX430 series

We use the reported model name to find the matching scanner parameters
from pixma_devices. This relies on a match of the string reported as
above to the one defined in the backend. 
The MX430 is however defined in pixma_mp150.c as:
DEVICE ("Canon PIXMA MX430 Series", "MX430", MX430_PID, 1200, 0, 0, 638,
877, PIXMA_CAP_CIS | PIXMA_CAP_ADF),

As you can see, these strings do not match: the backend defines the
scanner as "Canon PIXMA MX430" and not as "Canon MX430" as repoted by
the device

I can see 2 ways around this problem:
1) change the backend so the strings match
2) remove any occurrence of "Canon" and "Pixma" from the reported model
string and look only for the "MX430 Series" part. We anyhow look only
for a match on a sub-string (see lookup_scanner() in pixma_io_sanei.c )

What do others think might be the preferred way of dealing with this
lookup? I tend to go for alternative 2, but would appreciate feedback
before I go and implement this.

Kind regards, Louis 





More information about the sane-devel mailing list