[sane-devel] canoscan 300 scsi scanner not detected

m. allan noah kitno455 at gmail.com
Thu Oct 28 17:32:00 UTC 2010


On Thu, Oct 28, 2010 at 1:27 PM, Denis Prost <denis.prost at wanadoo.fr> wrote:
>  Yes Allan, with just that line, it works !
>
> Denis

Well, I think that is the best solution then. (though the backend
should still be fixed)

allan

>
> Le 28/10/2010 16:57, m. allan noah a écrit :
>>
>> Several comments:
>>
>> 1. the backend should be changed to look at multiple rows of its config
>> file.
>>
>> 2. The canon backend code does this:
>>
>>  if (ibuf[0] != 6
>>       || strncmp ((char *) (ibuf + 8), "CANON", 5) != 0
>>       || strncmp ((char *) (ibuf + 16), "IX-", 3) != 0)
>>     {
>> DBG (1, "attach: device doesn't look like a Canon scanner\n");
>> .....
>>
>> So the apple machine must respond as a canon too.
>>
>> 3. The sanei_scsi code appears to use strncmp with the length of the
>> string from the config, so this should work:
>>
>> scsi CANON IX
>>
>> Denis- can you put only that line in your config file, and verify that
>> the scanner still appears?
>>
>> allan
>>
>> On Thu, Oct 28, 2010 at 10:35 AM, Johannes Meixner<jsmeix at suse.de>  wrote:
>>>
>>> Hello,
>>>
>>> On Oct 28 09:52 m. allan noah wrote:
>>>>
>>>> I would need to check the code, but I think the canon backend mostly
>>>> supports machines who's model name starts with 'IX' so the best
>>>> solution might be:
>>>>
>>>> scsi CANON IX*
>>>>
>>>> or some such?
>>>
>>> I do not have a scanner which is supported by the "canon" backend
>>> so that all what I write here is only based upon what I read
>>> somewhere.
>>>
>>> According to what I read in "man sane-scsi"
>>> ---------------------------------------------------------------
>>>    scsi VENDOR MODEL TYPE BUS CHANNEL ID LUN
>>>
>>> ... a field's value can be replaced with an asterisk
>>> symbol (``*'').  An asterisk has the effect that any
>>> value is allowed for that particular field.
>>> ---------------------------------------------------------------
>>> so that it seems it is not possible to replace only a part
>>> of a particular field with an asterisk.
>>>
>>> According to
>>> http://www.sane-project.org/sane-backends.html#S-CANON
>>> the "canon" backend supports at least one non-CANON scanner,
>>> the "Apple Color OneScanner 600/27".
>>> I have no idea how this device shows up at the SCSI
>>> but I assume Apple made sure that "their device" shows up
>>> at the SCSI under a manufacturer name like "APPLE".
>>>
>>> According to my tests in
>>> http://lists.alioth.debian.org/pipermail/sane-devel/2006-May/016922.html
>>> it seems it is not possible to have something like
>>> -------------------------------------------------------------------
>>> #canon.conf
>>> scsi CANON
>>> scsi APPLE
>>> -------------------------------------------------------------------
>>> because it seems only the last entry "scsi APPLE" is used then.
>>>
>>> According to my tests in
>>> http://lists.alioth.debian.org/pipermail/sane-devel/2006-May/016922.html
>>> it seems not to cause problems if devices are probed
>>> which are no scanners so that in the end our patch results
>>> an unrestricted plain "scsi" by default in /etc/sane.d/canon.conf
>>> -------------------------------------------------------------------
>>> # canon.conf
>>> #
>>> # Activate exactly one of the following choices:
>>> #
>>> # Probe on all /dev/sg* devices:
>>> scsi
>>> #
>>> # Probe for "CANON" on all /dev/sg* devices:
>>> #scsi CANON
>>> #
>>> # Probe only on one fixed device:
>>> #/dev/sg0
>>> -------------------------------------------------------------------
>>>
>>> We have this since July 2006 and at least I noticed no bug reports
>>> or user complaints because of this - but I have no idea how many
>>> users use scanners which are supported by the "canon" backend.
>>>
>>> By default we have all backends in /etc/sane.d/dll.conf disabled
>>> (to avoid that a SANE frontend lets various backends start up
>>> and do needless probing for devices which do not exist)
>>> so that the "canon" backend only runs for those users which
>>> actually use a matching scanner.
>>>
>>>
>>> Kind Regards
>>> Johannes Meixner
>>> --
>>> SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
>>> AG Nuernberg, HRB 16746, GF: Markus Rex
>>>
>>> --
>>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>>> http://lists.alioth.debian.org/mailman/listinfo/sane-devel
>>> Unsubscribe: Send mail with subject "unsubscribe your_password"
>>>            to sane-devel-request at lists.alioth.debian.org
>>>
>>
>>
>
>
>



-- 
"The truth is an offense, but not a sin"



More information about the sane-devel mailing list