Menu

Data returned fr ReadBulk()/ ReadInterrupt()

Help
swehan
2007-07-11
2012-12-06
  • swehan

    swehan - 2007-07-11

    Hi,

    I am trying to handle the retrieved data and my references are USB documentations.
    Using device.ReadBulk() or ReadInterrupt() I have received data from scanner.
    I would like to know if those data is following this..
    [ PID | DATA | CRC16 ] format or it is just a pure DATA part.

    For my scanner, buffer byte[] size(maxPacketSize) is 8.
    Expected result is 50740031 and byte[] read is..
    Read : 8[ 0 0 34 0 0 0 0 0  ]
    Read : 8[ 0 0 0 0 0 0 0 0  ]
    Read : 8[ 0 0 39 0 0 0 0 0  ]
    Read : 8[ 0 0 0 0 0 0 0 0  ]
    Read : 8[ 0 0 36 0 0 0 0 0  ]
    Read : 8[ 0 0 0 0 0 0 0 0  ]
    Read : 8[ 0 0 33 0 0 0 0 0  ]
    Read : 8[ 0 0 0 0 0 0 0 0  ]
    Read : 8[ 0 0 39 0 0 0 0 0  ]
    Read : 8[ 0 0 0 0 0 0 0 0  ]
    Read : 8[ 0 0 39 0 0 0 0 0  ]
    Read : 8[ 0 0 0 0 0 0 0 0  ]
    Read : 8[ 0 0 32 0 0 0 0 0  ]
    Read : 8[ 0 0 0 0 0 0 0 0  ]
    Read : 8[ 0 0 30 0 0 0 0 0  ]
    Read : 8[ 0 0 0 0 0 0 0 0  ]

    Can anyone tell me or refer me know more about Data recieved using ReadBulk(),
    ReadInterrupt() by LibusbJava?

    Regards,
    Swe Han

     
    • andi

      andi - 2007-07-14

      The data you receive is the plain USB data which is sent from the device (USB packet payload, without CRC or any other USB specific stuff). This data is highly device specific and not depending on LibusbJava respectively the underlying libusb library.
      Without any (scanner specific) documentation about what is when returned you can only guess what the data means. Maybe there's some documentation of other scanners available.

      Regards, Spandi

       
    • swehan

      swehan - 2007-07-17

      Thanks Spandi for your info.
      For the scanner information, those bytes are pairs of key down and key up events.
      I am now quite clear about the DATA part which is only plain PayLoad Data.

      Regards,
      Swe Han

       

Log in to post a comment.

MongoDB Logo MongoDB