ISSUE with USING WINUSB Driver & Arduino AS USB &LUFA/ CATERINA boatloader

Project Goal: Create a custom USBDevice.

Name of device : "CapiaZ"

Board used: Arduino MICRO

summary: I was able to modify the Caterina boatloader for my CapiaZ board, to have a specific VID & PID for it. and when you plug it to the pc the ARDUINO IDE will show the port and the name "CAPIAZ".

Then I used WINUSB.sys and WINUSB.inf to generate the driver. Successfully, I am able to install the driver and Device manager shows it as follwoing -which is the goal so far-:

+CapiaZ Device CapiaZ-S01 Also I wrote my C++ library that communicate with CapiaZ using WINUSB.lip and SETAPI.lib. Using read endpoints bulk in and bulk out to read and write from it. I use WinUsb_WritePipe and WinUsb_ReadPipe,. I write data to the Capia and read data from the Capia no problems.

The issue, when I unplug (soft or hard) the Capia then plug it back, and try to run my C++ application, the C++ application will connect and write to it but I'm not able to read data from it. any suggestions what could be the issue ? thanks

Also posted at: https://arduino.stackexchange.com/q/49112 If you're going to do that then please be considerate enough to add links to the other places you cross posted. This will let us avoid wasting time due to duplicate effort and also help others who have the same questions and find your post to discover all the relevant information. When you post links please always use the chain links icon on the toolbar to make them clickable.