[sane-devel] CPen, new backend

Stefan Below stefanbelow at gmx.de
Fri Feb 20 14:12:34 UTC 2009


  m. allan noah schrieb:
> 2009/2/20 Stefan Below <stefanbelow at gmx.de>:
>   
>> Hello,
>>
>> i have a nice little pen scanner (C-Pen 10) and i would like to write a
>> driver for this device.  I have already captured some data with usbsnoop and
>> converted it with the perlscript. replaying is working fine.
>> My onlz problem is, that i am comming from the java world and i have zero
>> experience with C. Nevertheless i will give it a try. I think it should
>> quite easy, because the pen scanner has no switches etc. My first question
>> is, how can i write the output i received with my generated driver into a
>> file?
>>     
>
> fopen, fwrite, fclose they have man pages.
>
> you might also want to write a pnm header to it first, but you can do
> that afterwards with a good editor like vim.
>
>   

ok, now i have the raw data in my file, but i still have problems with 
the header. I have now idea how to determine the width and height...

This is the only spec i found:

Image resolution: approx. 400 dpi
Focal tolerance: 2 mm
Reading speed: 15 cm/s
Character size: 5-22 pt
Field of view: 7,2 x 5,5 mm

how can i determine the correct header?

>> Here are the log file and the "generated driver"
>>     
>
> wow, that does look simple. the only problem i see from sane side is
> that it uses multiple interrupt endpoints. the sanei_usb support lib
> might need some updates to support that.
>
> allan
>   




More information about the sane-devel mailing list