GSM module SIM 900 Problem sending SMS

Hello.

I would like to test the GSM SIM900 module as part of my internship project.

Here is the tutorial I followed:

To help me, my internship supervisor sent me the same module, and I also bought a Things.mobile SIM card which is compatible with multiple carriers for my project. I then created an account on thingsmobile.com in order to activate the package of my card.

image

In addition, I made sure to deactivate it by integrating it into my mobile phone, so that the GSM module program could reactivate it afterwards once inserted.

So, I placed it in the SIM card holder, then I turned the SIM900 up / down programmatically by making its connections with an Arduino UNO. I reproduced the assembly below with 4 wires, and supplied the module with a 5V Adapter.

image

First, I tested the "Arduino Code - Testing AT Commands" program from the tutorial in question.

Here is the program I used:

#include <SoftwareSerial.h>

//Create software serial object to communicate with SIM900
SoftwareSerial mySerial(7, 8); //SIM900 Tx & Rx is connected to Arduino #7 & #8

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

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

  mySerial.println("AT"); //Handshaking with SIM900
  updateSerial();
  mySerial.println("AT+CSQ"); //Signal quality test, value range is 0-31 , 31 is the best
  updateSerial();
  mySerial.println("AT+CCID"); //Read SIM information to confirm whether the SIM is plugged
  updateSerial();
  mySerial.println("AT+CREG?"); //Check whether it has registered in the network
  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
  }
}

void SIM900power()
{
  pinMode(9, OUTPUT); 
  digitalWrite(9,LOW);
  delay(1000);
  digitalWrite(9,HIGH);
  delay(2000);
  digitalWrite(9,LOW);
  delay(3000);
}

By uploading the program, then displaying the serial monitor, LED D6 will first blink every 800ms to find the network. Once found, it blinks every 3 seconds.

The test works, and this is what is displayed in the serial monitor:

image

Now I want to realize the program to send an SMS to my cell phone. Here then is the 2nd program that I use:

#include <SoftwareSerial.h>

//Create software serial object to communicate with SIM900
SoftwareSerial mySerial(7, 8); //SIM900 Tx & Rx is connected to Arduino #7 & #8

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

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

  mySerial.println("AT"); //Handshaking with SIM900
  updateSerial();

  mySerial.println("AT+CMGF=1"); // Configuring TEXT mode
  updateSerial();
  mySerial.println("AT+CMGS=\"+330686920417\"");//change ZZ with country code and xxxxxxxxxxx with phone number to sms
  updateSerial();
  mySerial.print("Bonjour"); //text content
  updateSerial();
  mySerial.write(26);
}

void loop()
{
}

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
  }
}

void SIM900power()
{
  pinMode(9, OUTPUT); 
  digitalWrite(9,LOW);
  delay(1000);
  digitalWrite(9,HIGH);
  delay(2000);
  digitalWrite(9,LOW);
  delay(3000);
}

Then I uploaded it: there is indeed LED D6 which ends up finding the network by flashing every 3 seconds. But by displaying the serial monitor, I only get part of the expected results and I am not receiving text messages on my cell phone.

image

I have also tried replacing "+3306 ..." with "+336 ...", but I get the same problem.

But as we can see:
-Command "T" is displayed instead of "AT" at the start of the serial monitor
-The results of the "+ CMGS" command are missing immediately after the display of the message to be sent on the serial monitor. I think the problem would come from there.

Could someone help me solve the problem please?

Thank you for responding to me quickly.