[sane-devel] USB debug print of the buffer contents

Henning Meier-Geinitz henning at meier-geinitz.de
Wed Apr 2 19:09:16 BST 2003


Hi,

I've added the function print_buffer() to sanei_usb.c. The function is
called from sanei_usb_read_bulk, write_bulk, control_msg and read_int.
It pronts the buffer contents that's send to or from the device like
this:

[sanei_usb] sanei_usb_write_bulk: trying to write 8 bytes
[sanei_usb] 0000: 12 01 00 00 00 00 60 00                         ......`.........
[sanei_usb] sanei_usb_write_bulk: wanted 8 bytes, wrote 8 bytes
[sanei_usb] sanei_usb_read_bulk: trying to read 96 bytes
[sanei_usb] 0000: 06 00 01 01 5B 01 00 00 53 43 41 4E 4E 45 52 20 ....[...SCANNER 
[sanei_usb] 0010: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                 
[sanei_usb] 0020: 31 2E 30 35 4D 55 53 54 45 4B 20 20 20 42 30 36 1.05MUSTEK   B06
[sanei_usb] 0030: 20 55 31 32 4B 46 57 4D 31 32 33 37 39 38 00 40  U12KFWM123798.@
[sanei_usb] 0040: 00 E1 01 01 00 00 00 00 00 00 00 00 00 00 00 00 ................
[sanei_usb] 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF ................
[sanei_usb] sanei_usb_read_bulk: wanted 96 bytes, got 96 bytes

Please test the latest CVS especially the read_int function as I
couldn't test that.

Someone vlunteers to add this to the sanei_scsi code?

Bye,
  Henning



More information about the sane-devel mailing list