I'm successfully receiving bytes from an USB device using a HID USB .net library. Here is a sample of my code :
Dim ptr As IntPtr = USB.USB_Read()
Dim buff As Byte() = New Byte(USB.USB_ReadLength() - 1) {}
Marshal.Copy(ptr, buff, 0, buff.Length)
textBox_Read.Text = BitConverter.ToString(buff)
And here is a sample of received data :
00-01-00-F0-00-00-00-80
00-00-00-F0-00-00-00-80
Or with another USB controller :
00-6D-6A-A8-72-B2-70-7B-7E-00-80-01-00-00-00
00-6D-6A-A8-72-B2-70-7B-7E-00-80-01-00-00-00
00-6D-6A-A8-72-B2-70-7B-7E-00-80-00-00-00-00
00-6D-6A-A8-72-B2-70-7B-7E-00-80-00-00-00-00
My question is : how can I know wich button is pressed ? Meaning : I just want my program to store the button pressed and do an action when pressed.
How can I interpret this data ?
Regards, Alexis.