user45905: I am receiving about 90 bytes on the serial port. But Arduino has a serial buffer of 64 bytes only. Because of this limitation I am unable to receive further bytes.
char c;

void read_response() {
  while(Serial.available > 0) {
    c=Serial.read();
    Serial.print(c,HEX);
    Serial.print(",");
  }
}

I tried using the above function to read the serial data, but it is able to read only 64 bytes.
Another approach I tried as follows:
char rxdata[]={};

void read_response() {
  while(Serial.available > 0) {
    int len= Serial.readBytes(rxdata, 90)
  }
}

With this approach too, I was receiving only 64 bytes.
Serial.flush() also doesn't work as it waits for current transmission to finish. And I do not have control on transmission. The transmitter is sending 90 bytes continuously.
Please give me some suggestions.

user27653: You will need to adjust your concept of serial communication so that you don't rely on the complete 90 bytes of data to be transferred to the serial input buffer before you read it into RAM.
Instead you need to continually empty the hardware buffer into RAM as often as you run through loop(), and avoid using delay(), which will stop your program from being able to drain the buffer.
To know when you have reached the end of the transmission, you should either ensure that the incoming serial stream has a marker at the end (such as a '\n' character) or is always a fixed length (such as always exactly 90 bytes.)
As an example, here is a program that looks for '\n' as the end-of-data marker:
#DEFINE MAX_INPUT 90

char inputBuffer[MAX_INPUT+1]; // Handles up to 90 bytes in a c-style string, with a null character termination.

void setup() 
{
  Serial.begin(115200); // initialization
  inputBuffer[0] = '\0'; //Initialize string to emtpy.
  Serial.println("Begin:");
}

void loop() {

  if (Serial.available()>0)
  {
    char input = Serial.read();
    static int s_len; // static variables default to 0
    if (s_len>=MAX_INPUT) {
      // Have received already the maximum number of characters
      // Ignore all new input until line termination occurs
    } else if (input != '\n' && input != '\r') {
      inputBuffer[s_len++] = input;
    } else {
      // Have received a LF or CR character

      // INSERT YOUR CODE HERE TO PROCESS THE RECEIVED DATA //
      // YOU COULD COPY TO A NEW VARIABLE WITH strncpy() OR //
      // SET A FLAG TO SAY TO START SOME OTHER TASK         //
      Serial.print("RECEIVED MSG: ");
      Serial.println(inputBuffer);

      memset(inputBuffer, 0, sizeof(inputBuffer));
      s_len = 0;             // Reset input buffer here if you
                             // have already copied the data.
                             // If you don't reset here, then
                             // you can't start receiving more
                             // serial port data. This is your
                             // 'software' serial buffer, contrast
                             // with the hardware serial buffer.
    }
  }
}


user10794: 
But Arduino has a serial buffer of 64 bytes only. Because of this limitation I am unable to receive further bytes.

This assertion is nonsense. Certainly there is a buffer, but that lets you receive up to 64 bytes (put there by the serial interrupt service routine) before you retrieve a single one.
All you need to do is expeditiously retrieve the data (that is, do a Serial.read()) fast enough that you remove the data from the buffer and store it into memory.
You need to post a Minimal, Complete, and Verifiable Example (MCVE) that demonstrates your problem. For example, are you doing delay(1000) before attempting to read serial data?
See my post about receiving serial data without blocking and also Async (Serial) peripheral interface - for Arduino .

45905: <p>I am receiving about 90 bytes on the serial port. But Arduino has a serial buffer of 64 bytes only. Because of this limitation I am unable to receive further bytes.</p>

<pre><code>char c;

void read_response() {
  while(Serial.available &gt; 0) {
    c=Serial.read();
    Serial.print(c,HEX);
    Serial.print(",");
  }
}
</code></pre>

<p>I tried using the above function to read the serial data, but it is able to read only 64 bytes.</p>

<p>Another approach I tried as follows:</p>

<pre><code>char rxdata[]={};

void read_response() {
  while(Serial.available &gt; 0) {
    int len= Serial.readBytes(rxdata, 90)
  }
}
</code></pre>

<p>With this approach too, I was receiving only 64 bytes.</p>

<p><code>Serial.flush()</code> also doesn't work as it waits for current transmission to finish. And I do not have control on transmission. The transmitter is sending 90 bytes continuously.</p>

<p>Please give me some suggestions.</p>
 27653: <p>You will need to adjust your concept of serial communication so that you don't rely on the complete 90 bytes of data to be transferred to the serial input buffer before you read it into RAM.</p>

<p>Instead you need to continually empty the hardware buffer into RAM as often as you run through <code>loop()</code>, and avoid using <code>delay()</code>, which will stop your program from being able to drain the buffer.</p>

<p>To know when you have reached the end of the transmission, you should either ensure that the incoming serial stream has a marker at the end (such as a <code>'\n'</code> character) or is always a fixed length (such as always exactly 90 bytes.)</p>

<p>As an example, here is a program that looks for <code>'\n'</code> as the end-of-data marker:</p>

<pre><code>#DEFINE MAX_INPUT 90

char inputBuffer[MAX_INPUT+1]; // Handles up to 90 bytes in a c-style string, with a null character termination.

void setup() 
{
  Serial.begin(115200); // initialization
  inputBuffer[0] = '\0'; //Initialize string to emtpy.
  Serial.println("Begin:");
}

void loop() {

  if (Serial.available()&gt;0)
  {
    char input = Serial.read();
    static int s_len; // static variables default to 0
    if (s_len&gt;=MAX_INPUT) {
      // Have received already the maximum number of characters
      // Ignore all new input until line termination occurs
    } else if (input != '\n' &amp;&amp; input != '\r') {
      inputBuffer[s_len++] = input;
    } else {
      // Have received a LF or CR character

      // INSERT YOUR CODE HERE TO PROCESS THE RECEIVED DATA //
      // YOU COULD COPY TO A NEW VARIABLE WITH strncpy() OR //
      // SET A FLAG TO SAY TO START SOME OTHER TASK         //
      Serial.print("RECEIVED MSG: ");
      Serial.println(inputBuffer);

      memset(inputBuffer, 0, sizeof(inputBuffer));
      s_len = 0;             // Reset input buffer here if you
                             // have already copied the data.
                             // If you don't reset here, then
                             // you can't start receiving more
                             // serial port data. This is your
                             // 'software' serial buffer, contrast
                             // with the hardware serial buffer.
    }
  }
}
</code></pre>
 10794: <blockquote>
  <p>But Arduino has a serial buffer of 64 bytes only. Because of this limitation I am unable to receive further bytes.</p>
</blockquote>

<p>This assertion is nonsense. Certainly there is a buffer, but that lets you receive up to 64 bytes (put there by the serial interrupt service routine) before you retrieve a single one.</p>

<p>All you need to do is expeditiously retrieve the data (that is, do a <code>Serial.read()</code>) fast enough that you remove the data from the buffer and store it into memory.</p>

<p>You need to post a <a href="https://stackoverflow.com/help/mcve">Minimal, Complete, and Verifiable Example (MCVE)</a> that demonstrates your problem. For example, are you doing <code>delay(1000)</code> before attempting to read serial data?</p>

<p>See my post about <a href="http://www.gammon.com.au/serial" rel="nofollow noreferrer">receiving serial data without blocking</a> and also <a href="http://www.gammon.com.au/forum/?id=10894" rel="nofollow noreferrer">Async (Serial) peripheral interface - for Arduino </a>.</p>
