in reply to Re: Data adquisition from a USB device
in thread Data adquisition from a USB device

Thanks for the quick reply!
I don't think I can identify the protocol, though.
How many different protocols can we expect?
I couldn't find anything in the documentation.
So, I used an USB sniffer (usbTrace for windows) and I captured one of the biggest packages received.
I though you were the author

--------- Request # 2380 ----[IN]---- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER IRP: 0x87079008 Status: STATUS_SUCCESS (0x0) Device Object: 0x89947340 Length: 0x48 USBD Status: USBD_STATUS_SUCCESS (0x0) EndpointAddress: 0x81 PipeHandle: 0x88D24094 TransferFlags: 0x3 ( USBD_TRANSFER_DIRECTION_IN USBD_SHORT_TRANSFER_OK + ) TransferBufferLength: 0xD1 TransferBuffer: 0x875B9000 TransferBufferMDL: 0x88A877C8 UrbLink: 0x0 ** Data ** 01 60 C7 76 C5 C4 B7 FE 33 FF 39 FF 98 FF C2 FF BF FF B6 FF 45 FF 33 F +F 03 FF D7 FE 0D FF F9 FE 28 FF 6D FF 94 FF AE FF C7 FF BD FF 99 FF 3 +B FF 32 FF DC FE 15 FF 48 FF 96 FF BD FF 0E FF F8 FE 01 60 AF FF C1 F +F C7 FF 6B FF 26 FF 17 FF 02 FF F0 FE 79 FF 98 FF B3 FF A8 FF 72 FF 0 +F FF 8F FF 01 FF 99 FF A4 FF 45 FF 46 FF 1C FF BE FE 2F FF 41 FF 83 F +F B2 FF AE FF A2 FF 16 FF 09 FF 46 FF 01 60 2B FF 64 FF 9B FF A9 FF B +C FF B7 FF 3B FF 27 FF F4 FE E1 E1 FE 54 FF 37 FF 96 FF BA FF B8 FF D +2 FE CD FE 97 FF BA FF B0 FF 58 FF 2C FF 03 FF 08 FF 13 FF 75 FF 92 F +F B8 FF B9 FF 3E FF 0A 01 60 FF 8E FF 57 FF 18 FF 6D FF 88 FF 9F FF B +7 FD

Replies are listed 'Best First'.
Re^3: Data adquisition from a USB device
by gwadej (Chaplain) on Apr 11, 2009 at 05:42 UTC

    Unfortunately, there may be two different types of documentation: user docs and programmer docs. You need the programmer docs. Those are usually a bit harder to come by.

    From the information you have provided, it looks like the you could probably use the Device::USB::Device::bulk_read method. Unfortunately, without the docs, you have quite a bit of reverse-engineering to make sense of the data in that packet.

    Honestly, it would definitely be worth your time to check with the company to see if they have any programming documentation. Debugging a binary protocol is not always the best use of time.

    I though you were the author

    I am. That was supposed to be a little joke. (It turned out to be even smaller than expected.<shrug/>)

    G. Wade

      I though it was a joke
      Thanks for your help. As you said I don't have the time for reverse engineering.
      I though that, once one gets to mimic the communication between the device and the driver, interpreting the income data was easier.
      I will try to get the technical documentation and see.
      Thanks,
      F

        The good news about the USB is that it is a really general method of communicating with devices. This means it can be used with all kinds of devices.

        The bad news, of course, is that if can be used with all kinds of devices.<grin/> There's always more protocol on top. Kind of reminds me of the old days of working with serial ports.<shrug/>

        If and when you get the technical docs, you might want to consider releasing a Perl module on CPAN. That way you can save someone else from having to work this out.

        G. Wade
Re^3: Data adquisition from a USB device
by Anonymous Monk on Apr 11, 2009 at 05:00 UTC