# Module GSM A7670E I cannot send a message longer than 30 characters. not

**URL:** <https://forum.arduino.cc/t/module-gsm-a7670e-i-cannot-send-a-message-longer-than-30-characters-not/1284930>\
**Category:** GSM Shield\
**Created:** [July 24, 2024, 8:42pm UTC](https://forum.arduino.cc/t/module-gsm-a7670e-i-cannot-send-a-message-longer-than-30-characters-not/1284930 "2024-07-24T20:42:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![brendy32530](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/brendy32530/32/703658_2.png) [@brendy32530](https://forum.arduino.cc/u/brendy32530)\
**Post date:** [July 24, 2024, 8:42pm UTC](https://forum.arduino.cc/t/module-gsm-a7670e-i-cannot-send-a-message-longer-than-30-characters-not/1284930/1 "2024-07-24T20:42:42Z")

</div>

I've been trying for a few days now, I've been reading on the internet and I can't find a solution.  
please tell me what could be the cause.  
messages longer than 30 characters are illegible, letters and special characters replaced.  
I checked the same code on SIM800L and it works and long messages arrive.

```arduino

#define RX_A7670E 4
#define TX_A7670E 5

#include <SoftwareSerial.h>
SoftwareSerial mySerial(RX_A7670E , TX_A7670E); // RX TX

#define RELAY 12  

String receive_Sim = "";
String stateRelay= "off";
String nr_Tel = "+45xxxxxxxxx";  

void setup() {
  pinMode(RELAY, OUTPUT);
  Serial.begin(115200);
  mySerial.begin(115200);
  delay(10000); 

  while (!mySerial.available()) {
    mySerial.println("AT");
    delay(1000);
    Serial.println("Connecting...");
  }
  Serial.println("Connected!");
  mySerial.println("AT+CMGF=1"); 
  delay(1000);
  mySerial.println("AT+CNMI=1,2,0,0,0"); 
  delay(1000);
  mySerial.println("AT+CMGL=\"REC UNREAD\""); 
  delay(500);
}
void On_Off_SMS() {

  if (receive_Sim.indexOf(nr_Tel) > -1) {
    if (receive_Sim.indexOf("On") > -1) {
      
      digitalWrite(RELAY, HIGH);
      stateRelay = " Hello from Arduino. I would like to send long messages on the GSM module. I can't find a solution. Greetings to everyone and have a nice day";
      delay(1000);
      sendSMS();
      delay(200);
      receive_Sim = "";  
    }

    if (receive_Sim.indexOf(nr_Tel) > -1) {
      if (receive_Dane_Sim.indexOf("Off") > -1) {
        
        digitalWrite(RELAY, LOW);
        stateRelay = "OFF";
        delay(1000);
        sendSMS();
        delay(200);
        receive_Sim = "";  
      }
      

void loop() {

  if (mySerial.available()) {
    delay(100);

    // Serial Buffer
    while (mySerial.available()) {
      receive_Sim = mySerial.readString();

    }
    delay(10);

    Serial.println(receive_Sim);

    On_Off_SMS();

  }
}

void sendSMS() {
  Serial.println("Sending SMS...");
  mySerial.print("AT+CMGF=1\r");
  delay(100);
  mySerial.print("AT+CMGS=\"+45xxxxxxxx\"\r");  
  delay(500);
  mySerial.print("Relay " + stateRelay); 
  delay(500);
  mySerial.print((char)26);// (required according to the datasheet)
  delay(500);
  mySerial.println();
  Serial.println("text");
  delay(500);
}

```

---

<div class="post-metadata">

**Author:** ![sonofcy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sonofcy/32/1283617_2.png) [@sonofcy](https://forum.arduino.cc/u/sonofcy)\
**Post date:** [July 24, 2024, 9:39pm UTC](https://forum.arduino.cc/t/module-gsm-a7670e-i-cannot-send-a-message-longer-than-30-characters-not/1284930/2 "2024-07-24T21:39:46Z")

</div>

Most likely a limit of some sort, the first S i SMS I think is for Small or Short. READ the datasheets.

---

<div class="post-metadata">

**Author:** ![brendy32530](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/brendy32530/32/703658_2.png) [@brendy32530](https://forum.arduino.cc/u/brendy32530)\
**Post date:** [July 24, 2024, 9:45pm UTC](https://forum.arduino.cc/t/module-gsm-a7670e-i-cannot-send-a-message-longer-than-30-characters-not/1284930/3 "2024-07-24T21:45:06Z")

</div>

exactly. It looks like there's a limit. I read but found nothing. maybe I missed something because there are many pages of documentation.

---

<div class="post-metadata">

**Author:** ![sonofcy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sonofcy/32/1283617_2.png) [@sonofcy](https://forum.arduino.cc/u/sonofcy)\
**Post date:** [July 24, 2024, 10:03pm UTC](https://forum.arduino.cc/t/module-gsm-a7670e-i-cannot-send-a-message-longer-than-30-characters-not/1284930/4 "2024-07-24T22:03:34Z")

</div>

Most people who are not programmers don't understand that we only spend maybe 20% of our time coding, and 60% reading, researching etc. Give me a few minutes to see if I can find the answer. A quick google tells me at least 160 chars, so it must be something else. I will grab your code and have a quick peek for anything obvious. At 82yo it needs to be obvious LOL

---

<div class="post-metadata">

**Author:** ![sonofcy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sonofcy/32/1283617_2.png) [@sonofcy](https://forum.arduino.cc/u/sonofcy)\
**Post date:** [July 24, 2024, 10:06pm UTC](https://forum.arduino.cc/t/module-gsm-a7670e-i-cannot-send-a-message-longer-than-30-characters-not/1284930/5 "2024-07-24T22:06:41Z")

</div>

what board are you using, nano, esp32 ???

---

<div class="post-metadata">

**Author:** ![sonofcy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sonofcy/32/1283617_2.png) [@sonofcy](https://forum.arduino.cc/u/sonofcy)\
**Post date:** [July 24, 2024, 10:08pm UTC](https://forum.arduino.cc/t/module-gsm-a7670e-i-cannot-send-a-message-longer-than-30-characters-not/1284930/6 "2024-07-24T22:08:09Z")

</div>

Also what SoftwareSerial library?

---

<div class="post-metadata">

**Author:** ![sonofcy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sonofcy/32/1283617_2.png) [@sonofcy](https://forum.arduino.cc/u/sonofcy)\
**Post date:** [July 24, 2024, 10:15pm UTC](https://forum.arduino.cc/t/module-gsm-a7670e-i-cannot-send-a-message-longer-than-30-characters-not/1284930/7 "2024-07-24T22:15:16Z")

</div>

First thing is to get rid of ALL the delay statements.Do some research on using millis() to emulate multi-tasking. This will likely require a reorganization of your code, but itg will make it better. Look for articles and samples that have scheduker or 'get rid of delay' or similar, there is a lot on the arduino site alone.

---

<div class="post-metadata">

**Author:** ![brendy32530](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/brendy32530/32/703658_2.png) [@brendy32530](https://forum.arduino.cc/u/brendy32530)\
**Post date:** [July 25, 2024, 12:27pm UTC](https://forum.arduino.cc/t/module-gsm-a7670e-i-cannot-send-a-message-longer-than-30-characters-not/1284930/8 "2024-07-25T12:27:04Z")

</div>

Thank you for your interest, I have the module connected, everything works great, but I still have a problem with long messages.  
I use wemos d1 mini and the library and software serial  
I changed the power supply to a 3A power supply and it didn't help either.  
maybe I should use a different board and use the hardware serial?

\<\<\< EDIT \>\>\>  
Success, I guess I solved my problem. I send 100 characters and everything is readable.  
I used hardware serial 115200 and everything works.

---

<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:** [January 21, 2025, 12:27pm UTC](https://forum.arduino.cc/t/module-gsm-a7670e-i-cannot-send-a-message-longer-than-30-characters-not/1284930/9 "2025-01-21T12:27:51Z")

</div>

Closed on January 21, 2025, 12:27pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
