• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

USB packet size C#

Hello,

I am sending packets (string of bytes) from USB dongle to C# GUI.
But when I am sending more than 60 bytes my GUI stack.
I am receiving bytes in GUI using:
         System.Threading.Thread.Sleep(500);
            string Text = "";
            byte[] buff = new byte[255];
            //int tt ;
            port.Read(buff, 0, 255);
Is there any option to define maximum number of bytes that my GUI can get via USB device?
Where can be a problem?

THANKS
0
margarit
Asked:
margarit
1 Solution
 
grayeCommented:
That's highly dependent upon the device..  For example, I rather doubt a dongle would be a high-speed device.   If not, then the maximum packet size for a bulk transfer operation is 64 bytes
Here is an excellent web site that goes into all of the gory details:  http://www.beyondlogic.org/usbnutshell/usb4.htm
0
 
margaritAuthor Commented:
THANKS!!!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now