[sane-devel] CPen, new backend

m. allan noah kitno455 at gmail.com
Fri Feb 20 14:14:45 UTC 2009


trial and error.

On Fri, Feb 20, 2009 at 9:12 AM, Stefan Below <stefanbelow at gmx.de> wrote:
>  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
>>
>
>
> --
> 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