[sane-devel] usbsnoop2libusb.pl problem
domelevo at gmail.com
Sun Jan 29 12:04:23 UTC 2006
Please find some hints below :
On 1/28/06, Stefan Leichter <Stefan.Leichter at camline.com> wrote:
> i decided to have a look what might be needed to get my MD 90070 running with
> sane. But i'm stuck at the very first steps.
> according to http://www.meier-geinitz.de/sane/misc/develop.html i followed the
> link of USB Snoopy which gave me sniffusb-0.13.zip in the end. Also i
> downloaded usbsnoop2libusb.pl mentioned on Hennings page.
> After doing some logfile, i started feeding the first logfile to the
> usbsnoop2libusb.pl (what is the correct command line for this?),
just run :
chmod +x usbsnoop2libusb.pl
./usbsnoop2libusb.pl your_logfile > result.c
of course, you must have perl installed on your system with the perl
interpreter readily available under /usr/bin/perl.
but i get
> lots of errors and no real C code. The error are:
> - Use of uninitialized value in numeric eq (==) at /home/sle/bin/
> usbsnoop2libusb.pl line 58, <> line 42
> - Use of uninitialized value in hex at /home/sle/bin/usbsnoop2libusb.pl line
> 165, <> line 1615
> - Use of uninitialized value in hash element at /home/sle/bin/
> usbsnoop2libusb.pl line 171, <> line 1615
> - Use of uninitialized value in concatenation (.) or string at /home/sle/bin/
> usbsnoop2libusb.pl line 173, <> line 1615
> - can't find ""
> i get the first error many times with different line numbers at the end. The
> incomplete C code looks like,
> ret = usb_get_descriptor(devh, 0x1, 0x0, buf, 0x0000012
> 00000012 0.00466763 );
> Without knowing what usb_get_descriptor does, there are at least missing some
Please notice that you should have the libusb headers on your system
(particularly the file /usr/include/usb.h). After installing it, it
can do no harm to run "ldconfig" as root, though I'm not sure it's
And then to compile the file result.c, just do :
gcc -o result -lusb result.h
In order to let gcc find the links to the usblib. The above has been
tested with gcc 3.3...
> I have also downloaded SnoopyPro, but its output is in an binary format and i
> thing this is not the right format for usbsnoop2libusb.pl.
> So my question is what are the right tools to spy the usb communation and for
> processing the logfiles?
To do the logging, I've been using SniffUSB/Usbsnoop version 1.8 from
Benoït Papillaud (http://benoit.papillault.free.fr/usbsnoop/doc.php).
More information about the sane-devel