[sane-devel] Writing a backend for the Canon CanoScan D1250U2

Roger rogerx.oss at gmail.com
Sat Sep 17 17:56:07 UTC 2016


> On Sat, Sep 17, 2016 at 11:21:36AM +0200, Maxime Lecoq wrote:
>   Hi,
>   I intend to write a backend for the Canon CanoScan D1250U2 that is
>   currently not supported by sane.
>   Some people have been working on that scanner as we can see on
>   its [1]device page information.
>   Chipset has been partly identified.
>   Discussion about the development can be found here : [2]2003,
>   January and [3]2003, May.
>   Norbert Bataille seems [4]to succeed in getting it to produce BMP files.
>   A brother of the D1250U, the CanoScan D660U is supported.
>   I***m a C++ programmer but I have no idea how a scanner works.
>   I did not ever write a driver nor a backend.
>   I***m not familiar at all with hardware programmation.
>   Any piece of advice would be appreciated.
>   Regards,
>   Maxime Lecoq.

For writing drivers for a chip interface, you really need the chip 
specifications; pretty much the same or opposite of writing a user interface 
according to user specifications or required user actions.

I'm a little bit lazy (like most) and I will wait for chip specifications to be 
published, versus trying to completely reverse-engineer something.  Reverse 
engineering from nothing is usually extremely more difficult.  (You'll likely 
find such an adventure is carried-out by multiple people, instead of just one 
person alone.)

Another easier method for reverse engineering is to snoop the (USB) protocol 
used, and apply your driver code to the functions performed by each captured 
session of snooped packets. (ie. scan, power-off, ...)  I believe an example of 
one Linux driver written by capturing or snooping the USB protocol is the Linux 
kernel "pvrusb2 driver" by Mike Isely, for Hauppauge PVRUSB2/HVR-1950 USB TV 
cards.

If I were taking up this task, I would probably focus on a more recently 
published piece of hardware.  And the more recent Canon 9000f hardware seems to 
be very well supported already by open source drivers, including being 
competitative with Epson photo scanners.

-- 
Roger
http://rogerx.freeshell.org/



More information about the sane-devel mailing list