2 Replies Latest reply on Jun 9, 2012 1:28 AM by anandsrinivasana_


              Hi, I would like to know XferData(ref buf, ref len) at Visual C# method. When I transfer from Device to Host, Does "len" need to be the maximum packet size? For example, what kind of method should be used to receive 16 bytes of data from HOST? Although I tested the following contents, I was not successful. --- int Len = 16; byte[] Buf = new byte[Len]; BulkEndpoint.XferData(ref Buf, ref Len); --- Best Regards, Kochi   
        • 1. Re: XferData

          I use BulkOutEndPt and BulkInEndPt instead of BulkEndPt.






          int len = 3;


          byte[] buf = new byte[len];

          buf[0] = (byte)Commands.VR_SET_INTEGRATION_TIME;




          buf[1] = (byte)(integrationTime & 0xff);


          buf[2] = (byte)((integrationTime >> 8) & 0xff);


          if (myDev.BulkOutEndPt.XferData(ref buf, ref len) == true)






                           return Responses.PASSED;




                         return Responses.FAILED;




                      return Responses.INCOMMANDFAILED;








          return Responses.OUTCOMMANDFAILED;


















                    if (buf[0] == 0)




               len = 1;


               if (myDev.BulkInEndPt.XferData(ref buf, ref len) == true)

          • 2. Re: XferData

            BulkEndPoint would point to the first Bulk Endpoint of your device. If it is a OUT endpoint was it configured to send 16 bytes?


            If it is a IN endpoint then if it was configured properly then it should have received the data and XferData would have returned success. Please let us know your configuration.