[sane-devel] Generate C source code from a USBSnoopy log
Thomas Soumarmon
soumarmt at nerim.net
Fri Jan 24 12:30:02 GMT 2003
Hi everybody,
I have been playing around with my HP5470c scanner for some days without any
good results. I tried to handwrite C code corresponding to USBSnoopy logs I
got before as the logs are a bit long and tough, it never worked fully. So I
decided to replay the log with usb-robot. Logs did not fit with the expected
syntax... annoying.
So I decided to write an awk program that would write for me the C sourcecode
that replays the log, and it works.
Now I'll need to add the code to write the image to a file. Could anybody tell
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 (ImageMagick
?). Thank you for your help.
I suppose that tha tool could be of interest for more people so it is
available for download at sourceforge :
http://prdownloads.sourceforge.net/hp5400backend/USBSnoopy2CsourceCode.tar.gz?download
Just a few notes :
* This tool works with libusb. Feell free to port it to the kernel USB lib if
you know how to do it.
* you need awk and a C compiler to use it (if you don't have them, it is
probably of no use for you)
Regs,
Thomas.
More information about the sane-devel
mailing list