Board :->> Arduino MICRO
Project: USe the Arduino Micro as a USB device
SO I was successfully able to change the VID & the PID and the device name for the arduino micro board. Successfully, I was able to write my custom Win.inf file and use the WIN_usb driver to communicate with the arduino board. I Used the end points for the arduino Micro board and I can write to the board and read from board. here is a snap of the code
ULONG Bufferlength = 101024;
UCHAR ReadBuffer[101024];ULONG ByteRead ;
ReadResult = WinUsb_ReadPipe(Associated_UsbHandel,
Read_EndPoint, //PipeID,
ReadBuffer, // Buffer,A caller-allocated buffer that receives the data
Bufferlength, // BufferLength,
&ByteRead, // LengthTransferred,
NULL);String^ msg = gcnew String(reinterpret_cast< char*>(Bufferlength));
MessageBox::Show (msg, "Working", MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
SO far so good, but the issue is
IF I unplugged the board and plugged it back in , I can only connect , initialize , write to it but I can't read from it. WHen I try to read, the program sends the command and try to read data but it get stuck ,like nothing coming back. Not even timing out.
and to be able to read I have to uninstall the driver, re program the board with the new boot loader, and re upload the IDE sketch and then re install the driver in order for me to be able to read again.
,
Have anyone experienced this issue before? What is possible solutions ?