1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Serial Input Buffer Size??

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

  1. reppig

    reppig New Member

    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