# Need Help: GSM Modul sim800L: Reading SMS

**URL:** <https://forum.arduino.cc/t/need-help-gsm-modul-sim800l-reading-sms/621268>\
**Category:** Programming\
**Created:** [November 17, 2019, 6:55pm UTC](https://forum.arduino.cc/t/need-help-gsm-modul-sim800l-reading-sms/621268 "2019-11-17T18:55:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DO3GE](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@DO3GE](https://forum.arduino.cc/u/DO3GE)\
**Post date:** [November 17, 2019, 6:55pm UTC](https://forum.arduino.cc/t/need-help-gsm-modul-sim800l-reading-sms/621268/1 "2019-11-17T18:55:09Z")

</div>

I try to learn the GSM Modul sim800l.

So far ok. The first steps and Demos working well.

Now I try to receive a SMS with following sketch. Whats working well too.

But how do I get the content of the SMS in a String (text variable).

I have been trying for hours and can not get any further.

please help.

```cpp
#include <SoftwareSerial.h>

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

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

  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=1,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
  }
}

```

---

<div class="post-metadata">

**Author:** ![DO3GE](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@DO3GE](https://forum.arduino.cc/u/DO3GE)\
**Post date:** [November 18, 2019, 4:39am UTC](https://forum.arduino.cc/t/need-help-gsm-modul-sim800l-reading-sms/621268/2 "2019-11-18T04:39:49Z")

</div>

Is there nobody who can help ☹

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 12:08am UTC](https://forum.arduino.cc/t/need-help-gsm-modul-sim800l-reading-sms/621268/3 "2021-05-06T00:08:22Z")

</div>

Closed on May 6, 2021, 12:08am UTC


