Hello, everybody,
I have a puzzling situation. I am communicating to a HID device. When my host software (VB.NET 2013) sends na Out Packet (64 Bytes) it will make the processor on the HID device to do a certain task.
Just after sending the Out Packed, the host software starts polling for the In packet, which eventually will be sent by the HID device when it finishes its task.
Sometimes, the user has to stop the process that the HID is executing before it finishes and outputs the IN Packet. There comes trouble.
It means that the Asynchronous command
currentAsyncResult = fileStreamdevicedata.BeginRead(recv_buf, 0, recv_buf.Length, New AsyncCallback(AddressOf GetInputReport), recv_buf)
has to stop executing before we can send na Out Packet to make the hid device to stop what is it doing...
To do that, the only way I found was a CloseCommunication comand (As per HID 60 example) before I send the Out packet that will instruct the HID to stop doing the task.
The problem that sometimes happens (Very seldom) is that it does not work and the the host software hangs ...
Has anyone had experience with a similar situation ?
Thanks
Antonio
Brazil