[sane-devel] Canon LIDE 220

Stef stef.dev at free.fr
Mon Jun 29 19:57:52 UTC 2015

On 23/06/2015 16:08, John Weber wrote:
> On 06/22/2015 10:40 PM, Stef wrote:
> Hi Stef,
>> Debug levels are defined like this for genesys_low:
>> genesys_low.h:#define DBG_io          6    /* io functions */
>> genesys_low.h:#define DBG_io2         7    /* io functions that are
>> called very often */
>> genesys_low.h:#define DBG_data        8    /* log image data */
>>      So if you get the problem at log level below seven, we must look at
>> DBG_data usage in genesys_low.c . But here isn't on. So try 7 and 6 as
>> debug levels. Once we know the exact kind of logging level that fix this
>> timing issue, the next step is to remove this messages one by on until
>> you find the one that makes difference. I haven't seen nothing obvious,
>> so experimenting/testing is needed.
>>      sanei_genesys_wait_for_home(), sanei_genesys_set_buffer_address()
>> and sanei_genesys_write_ahb functions() are printing messages in the
>> middle of the code and are first candidates to try, in this order.
> It works at debug level 7, but not 6. I'm not sure from the rest of 
> your answer if there's testing you want me to do, or if it's just 
> informational. I'm a retired sys admin/engineer but not much of a 
> programmer. I'm willing to test more, but I'll need more detailed 
> instructions.
> Thanks,
> John

     I was expecting something like that.

     All DBG_io2 a mere traces, and I don't see how much they slow down 
things. Since I don't have this kind of problem on my hardware, I need 
your help. I don't see no other approach than trial and error.

     1 - compile sources
     2 - set logs to 7
     3 - check that scanner is working with compiled sources and the log 
     4 - change a line where there is DBG_io2 level in DBG_data so it 
isn't traced any more, write down the line number
     5 - compile and run, if it is still working, go to step 4 and 
change one more debug trace
     6 - since it isn't working anymore, you have find where a pause 
must be set, please send it to me

     There are tutorials to build SANE from sources, one thing I like to 
do is to run the freshly compiled version without doing make install, 
when running scanimage from top source directory:

export LD_PRELOAD=backends/.libs/libsane-genesys.so

More information about the sane-devel mailing list