[sane-devel] help for write back-end

Gerhard Jaeger gerhard@gjaeger.de
Wed, 16 Feb 2005 08:32:28 +0100


Hi,

in the SANE CVS experimental branch, there's also a script for the
usb sniffer output. It's based also on  Thomas Soumarmon's awk script
and has been extended since.
@Allan: would you mind if I put spike also to the CVS?

ciao
Gerhard


On Tuesday 15 February 2005 19:40, m. allan noah wrote:
> 
> attached is a perl script i wrote, it only works with benoit's usb 
> sniffer, not the usbsnoopy or snoopypro that you get from source forge.
> 
> allan
> 
> On Tue, 15 Feb 2005, Bertrik Sikken wrote:
> 
> > corwin wrote:
> >> Hi,
> >> 
> >> I have a CanoScan 3200F (Product Id : 2216) and this scanner are not 
> >> supported by sane.
> >> But i'm very interresting for write a back end.
> >> 
> >> I use "usb snoopy log" for extract usb log under WinXP. And I had writing a 
> >> perl script (based on awk Thomas Soumarmon's script) for genrate c code for 
> >> replaying log-script under linux (debian, 2.6.9).
> >> For the moment I reading libusb documentation and my first objective is to 
> >> write a small program (sane independant) for activate the scanner.
> >> 
> >> But actually i'm completly lost into the log data and i don't know how to 
> >> begin !!!
> >
> > Zip the logs and put them somewhere on your webpage (if you have one),
> > then post a link to the mailing list. This way, other people with
> > previous experience in decoding logs can try to see if there is
> > something that matches an existing protocol.
> >
> >> So my questions :
> >> 
> >> Have you a methodology for extract information of data log ?
> >
> > I think that there is no fixed methodology, you just have to be a
> > little creative.
> >
> > In my experience it helps to look for patterns in the log, like:
> > * are there some USB transfers that always appear in some particular
> >  order?
> > * some scanners use a "register model", which means that initialising
> >  the scanner consists of several write(register, data), which each
> >  can consist of several USB transfers. See if this applies to your
> >  scanner and find out the sequence to read or write a scanner register.
> > * record lots of logs, where each time a single thing is changed, for
> >  example record a log of starting the scan software, record a log for
> >  a scan of 150 dpi, record a log for 300 dpi. If there is an option
> >  to turn the scanner lamp on or off, record a log of this.
> >
> > For some scanners, the settings are sent using USB control transfers
> > or rather small USB bulk transfers. Try to concentrate on these small
> > transfers and don't bother too much yet about the bulky USB bulk
> > transfers that contain the image data.
> >
> >> Where can I found script (perl, ..) for parsing and cleaning log data ?
> >
> > I don't know of a central place for log analysis scripts.
> >
> >> Have you trics ?
> >> 
> >> ludovic (corwin)
> >> 
> >> 
> >> ps: I don't know the model of chips into the scanner and i don't open this 
> >> because it is one plastic box and there are no visible screw...
> >> pps : I'm very sorry for my poor english :(
> >> 
> >
> > Kind regards,
> > Bertrik