user77769: I am trying to receive an SMS on my arduino and print it out to the serial monitor. I am using the A9G gsm/gps module for doing that. Here is the code for it
#include <SoftwareSerial.h>

//Create software serial object to communicate with A6
SoftwareSerial mySerial(10, 11); //A6 Tx & Rx is connected to Arduino #3 & #2

void setup()
{
  //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(115200);
  
  //Begin serial communication with Arduino and A6
  mySerial.begin(115200);

  Serial.println("Initializing..."); 
  delay(1000);

  mySerial.println("AT"); //Once the handshake test is successful, it will back to OK
  updateSerial();
  
  mySerial.println("AT+CMGF=1"); // Configuring TEXT mode
  updateSerial();
  mySerial.println("AT+CNMI=2,2,0,0,0"); // Decides how newly arrived SMS messages should be handled
  updateSerial();
}

void loop()
{
  updateSerial();
}

void updateSerial()
{
  delay(500);
  while (Serial.available()) 
  {
    mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
  }
  while(mySerial.available()) 
  {
    Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
  }
}

The code works and I get a response but the response does not include the body of the message. This is the response I got after sending "hello" to it;
CIEV: "MESSAGE",1
+CMT: "+233201729573",,"2021/06/18,12:20:03

As you can see it rightly sends me a notification but it does not include the "hello" which is the actual message I want to receive. Can anyone help me out?

user77769: I have sorted that out for sometime now. It turns out for some reason SerialSoftware was truncating my messages because the serial buffer size was too small. All I had to do was increase the buffer size to a higher number in the SoftwareSerial.h file and it worked.

77769: <p>I am trying to receive an SMS on my arduino and print it out to the serial monitor. I am using the A9G gsm/gps module for doing that. Here is the code for it</p>
<pre><code>#include &lt;SoftwareSerial.h&gt;

//Create software serial object to communicate with A6
SoftwareSerial mySerial(10, 11); //A6 Tx &amp; Rx is connected to Arduino #3 &amp; #2

void setup()
{
  //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(115200);
  
  //Begin serial communication with Arduino and A6
  mySerial.begin(115200);

  Serial.println(&quot;Initializing...&quot;); 
  delay(1000);

  mySerial.println(&quot;AT&quot;); //Once the handshake test is successful, it will back to OK
  updateSerial();
  
  mySerial.println(&quot;AT+CMGF=1&quot;); // Configuring TEXT mode
  updateSerial();
  mySerial.println(&quot;AT+CNMI=2,2,0,0,0&quot;); // Decides how newly arrived SMS messages should be handled
  updateSerial();
}

void loop()
{
  updateSerial();
}

void updateSerial()
{
  delay(500);
  while (Serial.available()) 
  {
    mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
  }
  while(mySerial.available()) 
  {
    Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
  }
}
</code></pre>
<p>The code works and I get a response but the response does not include the body of the message. This is the response I got after sending &quot;hello&quot; to it;</p>
<pre><code>CIEV: &quot;MESSAGE&quot;,1
+CMT: &quot;+233201729573&quot;,,&quot;2021/06/18,12:20:03
</code></pre>
<p>As you can see it rightly sends me a notification but it does not include the &quot;hello&quot; which is the actual message I want to receive. Can anyone help me out?</p>
 77769: <p>I have sorted that out for sometime now. It turns out for some reason SerialSoftware was truncating my messages because the serial buffer size was too small. All I had to do was increase the buffer size to a higher number in the SoftwareSerial.h file and it worked.</p>
