Problem SMS at module SIM800L EVB

#include <SoftwareSerial.h> // library default software ide Arduino
#include <Wire.h>

// Define the SIM800L serial pins
const int RX_PIN = 3;
const int TX_PIN = 2  ;

SoftwareSerial SIM800L(RX_PIN, TX_PIN); // RX TX

void setup() {
  // Initialize serial communication for debugging
  Serial.begin(115200);
  while (!Serial);
  Serial.println("Arduino with Module GSM is ready");

  // Initialize serial communication for SIM800L
  SIM800L.begin(9600);
  Serial.println("Module dimulai pada serial komunikasi 9600");
  delay(1000); // waktu jeda 1 detik
  Serial.println("SIM800L SIAP DIGUNAKAN!");

  // Set format SMS to ASCII
  Serial.println("Set format SMS ke ASCII"); 
  SIM800L.println("AT+CMGF=1"); 
  delay(1000); 

  // Set SMS to target number
  Serial.println("SIM800 Set SMS ke Nomor Tujuan");
  // Replace with your target phone number
  SIM800L.println("AT+CMGS=\"08981160632\""); 
  delay(1000);

  // Send SMS to target number
  Serial.println("Module mengirimkan SMS ke no tujuan");
  // Replace with your desired SMS message
  SIM800L.println("Testing SMS via SIM800 loh!"); 
  delay(1000);

  // Send Ctrl+Z to exit SMS mode
  Serial.println("Ketik pada keyboard Ctrl+Z atau ESC > keluar menu ini");
  SIM800L.write(26); 
  delay(1000);

  Serial.println("SMS Selesai Dikirim!");
}

void loop() {
  // put your main code here, to run repeatedly:
  
}

Is there a solution for the sim800l evb module, I have tried it and I see in the serial monitor that the SMS has been sent but it is not included in the SMS message to the recipient. I checked the wiring is correct and working, is there a solution to my problem?

Your topic does not seem to indicate a problem with the IDE and therefore has been moved to a more suitable location on the forum.


Not related to your problem: you're using a Mega; why do you use SoftwareSerial instead of one of the additional UARTs (Serial1..Serial3)?

Why do you design around an EOL modem ? (2G)

  • did you set the smsc number of your operator ( AT+CSCA )?
  • add the international prefix to your number
  • read ( and print ) the response from the module after each command you send
  • if you have an usb to serial adapter you could connect the gsm module to the pc and use a 'terminal' to send/receive commands, the same you send via arduino, it should be faster to modify them on the fly