Serial Input Buffer Size??

Discussion in 'C#' started by reppig, Jun 7, 2010.

  1. reppig

    reppig New Member

    Mar 11, 2010
    Likes Received:
    Trophy Points:
    I am trying to write a program to read GPS data coming from a balloon payload and use it to point my antennas to stay with the balloon.

    My problem is I wrote the program assuming the input buffer would contain a whole set of GPS NEMA sentences (GGA, GSA, RMC, etc).

    But no matter what I do when I read the buffer I only get something like this:

    Which is not a buffer size of 4096 the default. So, I changed the buffer size to 16384.

    When I was counting on something like this:

    Can anyone tell me how I can read in more data?? or If it is not possible??

    In my Main.Designer.cs file I have:
    this.serialInput.BaudRate = 1200;
    this.serialInput.DiscardNull = true;
    this.serialInput.ReadBufferSize = 16384;

    I try and read it it like this:

    // Check if serial port is open
    if (serialInput.IsOpen)
    // Read buffer into a string
    string inputBuffer = serialInput.ReadExisting();
    ... Using Microsoft Visual C# 2008 Express Edition


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice