Ok PaulS,
sorry, I wasn't precise.
Here the code and what I can read on the serial monitor.
As you can see the problem is that the sketch executes, enters the function, but altough the instruction seems to be executed, I don't receive the sms message on my mobile phone.
#include <SoftwareSerial.h>
#include <String.h>
SoftwareSerial mySerial(7,

;
void setup()
{
mySerial.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the GPRS baud rate
delay(500);
}
void loop()
{
//I want to be absolutely simple, so by now, I just want either to send a text message OR to perform a voice call
Serial.println("Before the sms");
SendTextMessage();
Serial.println("After the sms");
// DialVoiceCall();
delay(100000);
}
Serial monitor trace
///SendTextMessage()
///this function is to send a sms message
void SendTextMessage()
{
Serial.println("In the function");
mySerial.print("AT+CMGF=1\r"); //Because we want to send the SMS in text mode
delay(100);
mySerial.println("AT + CMGS = \"+39138xxxxx615\"");//send sms message, be careful need to add a country code before the cellphone number
delay(100);
mySerial.println("A test message!");//the content of the message
delay(100);
mySerial.println((char)26);//the ASCII code of the ctrl+z is 26
delay(100);
mySerial.println();
Serial.println("Exiting the function");
}
///DialVoiceCall
///this function is to dial a voice call
void DialVoiceCall()
{
mySerial.println("ATD + +39138xxxxx615;");//dial the number
delay(100);
mySerial.println();
}
Before the sms
In the function
Exiting the function
After the sms
I wonder if the library is correct or if the sintax of the call is correct, but on the serial monitor I don't have return message.