public void sendStartCMD()
{
byte[] startCMD = new byte[8];
startCMD[0] = 255;
startCMD[1] = 0;
startCMD[2] = 28;
startCMD[3] = 20;
startCMD[4] = 20;
startCMD[5] = 0;
startCMD[6] = 0x01;
startCMD[7] = 0xF4;
usbI.Connect();
usbI.write(startCMD);
}
Hi, I am new to C# and HID USB communication.
I am having trouble with sending data.
I am trying with USBHIDDRIVER.dll. and I checked receiving data well.
However, When I try sending data with the function above, usbI.write()function always returns false.
When I checked with Beagle, there is no data out.
and also when I checked the function below, "NumberOfBytesWritten" has 0 after the function excuted.
Result = USBSharp.WriteFile(hidHandle, ref outputReportBuffer[0], outputReportBuffer.Length, ref NumberOfBytesWritten, 0);
How can I send data properly? Please let me know if there is something I am missing.
Thank you very much,