Sim800l GSM Module not sending a URL link in the text

Can someone help me I'm stuck on this part because Sim800l does not send the URL in the text. Somehow whenever I put a link it does not get recognized (?).

Down below is the a sample code that I made and using Google Maps as the link to be sent. the code works using different text messages but when it comes to links does not send any texts.

Any replies and help is very much appreciated thanks!

#include <SoftwareSerial.h>

// Create a SoftwareSerial object for SIM800L
SoftwareSerial sim800l(2, 3);

void setup() {
  // Start the serial communication with your computer
  Serial.begin(9600);

  // Start the serial communication with SIM800L
  sim800l.begin(9600);

  delay(2000);  // Wait for SIM800L to initialize
}

void loop() {
  // Check if a message is received
  if (sim800l.available()) {
    // Read the received message
    String message = sim800l.readString();
    Serial.println("Received Message: " + message);
  }

  // Send a text message
  sendMessage("+xxxxxxxxxx", "Check out these URLs:\n1. https://www.google.com/maps/@latitude,longitutde");

  delay(5000);  // Wait for 5 seconds
}

void sendMessage(const String& phoneNumber, const String& message) {
  // Set the SIM800L to text mode
  sim800l.println("AT+CMGF=1");
  delay(1000);

  // Set the recipient phone number
  sim800l.print("AT+CMGS=\"");
  sim800l.print(phoneNumber);
  sim800l.println("\"");
  delay(1000);

  // Send the message
  sim800l.print(message);
  delay(100);

  // Send the Ctrl+Z character (end of message)
  sim800l.write(0x1A);
  delay(1000);
}

What do you see if you print message before sending it ?

it only prints something like this, the print contains the links but are broken into pieces and some characters are boxes. The printed text are also not being sent by the sim for some reason

22:11:14.189 -> Received Message: s/@latitude,longitutde3
22:11:23.370 -> Received Message: .com/maps/@latitude,
22:11:32.612 -> Received Message: ogle.com/maps/
22:11:41.848 -> Received Message: gle.com/maps/@lat

Have you tried to figure out exactly what part of your message it dislikes? Have you tried shorter versions?

 sendMessage("+xxxxxxxxxx", "https://www.google.com/maps");
 sendMessage("+xxxxxxxxxx","www.google.com");

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