[sane-devel] Generate C source code from a USBSnoopy log

Thomas Soumarmon soumarmt@nerim.net
Fri, 24 Jan 2003 13:30:02 +0100

Hi everybody,

I have been playing around with my HP5470c scanner for some days without =
good results. I tried to handwrite C code corresponding to USBSnoopy logs=
got before as the logs are a bit long and tough, it never worked fully. S=
o I=20
decided to replay the log with usb-robot. Logs did not fit with the expec=
syntax... annoying.
So I decided to write an awk program that would write for me the C source=
that replays the log, and it works.
Now I'll need to add the code to write the image to a file. Could anybody=
me which format should I expect for the image (RGB pixels from top left ?=
Is there a library I should use for image saving and processing (ImageMag=
?). Thank you for your help.

I suppose that tha tool could be of interest for more people so it is=20
available for download at sourceforge :

Just a few notes :
* This tool works with libusb. Feell free to port it to the kernel USB li=
b if=20
you know how to do it.
* you need awk and a C compiler to use it (if you don't have them, it is=20
probably of no use for you)