GPRS + Arduino Completely Lost ! [beginner in arduino]

Hi,

This is “my” code. I don’t really understand how the msg can be sent to my GSM.
Can you help please ?

/*Note: this code is a demo for how to using gprs shield to send sms message, dial a voice call and
send a http request to the website, upload data to pachube.com by TCP connection,

The microcontrollers Digital Pin 7 and hence allow unhindered
communication with GPRS Shield using SoftSerial Library.
IDE: Arduino 1.0 or later
Replace the following items in the code:
1.Phone number, don’t forget add the country code
2.Replace the Access Point Name
3. Replace the Pachube API Key with your personal ones assigned
to your account at cosm.com
*/
#include <SoftwareSerial.h>
#include <String.h>
#include <Time.h>

SoftwareSerial mySerial(7, 8);
SoftwareSerial GPRS (7, 8);
void setup()
{
GPRS.begin(19200);
mySerial.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the GPRS baud rate
delay(500);
mySerial.println("AT + CSCA = “+3247*****91"");
mySerial.println("AT+CPIN=
”);
mySerial.println(“AT#PMODE=1”);
mySerial.print("Carte SIM pr^te ! ");
delay(5000);
}
void loop()
{
//after start up the program, you can using terminal to connect the serial of gprs shield,
//if you input ‘t’ in the terminal, the program will execute SendTextMessage(), it will show how to send a sms message,

if (Serial.available())
switch(Serial.read())
{
case ‘t’:
SendTextMessage();
break;
case ‘r’:
RecieveTextMessage();//This program code by directive’r’to receive, by receiving the information after the return to call the function
//to verify receiving function. But it can not display the received content in SIM.
break;

}
if (mySerial.available())
Serial.write(mySerial.read());
}
///SendTextMessage()
///this function is to send a sms message
void SendTextMessage()
{
mySerial.print(“AT+CMGF=1\r”); //Because we want to send the SMS in text mode
delay(3000);
// mySerial.println(“AT+CPIN=****”);
//delay(100);
//GPRS.println(“AT + CMGS = “+324105"");//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
mySerial.println( “AT+CMGS=<”+3
***105”><Salut !>”);
delay(3000);

}
void RecieveTextMessage()
{
mySerial.print(“AT+CMGF=1\r”); //Because we want to recieve the SMS in text mode
delay(100);
// mySerial.print(“AT+CMGR=1\r”);//Because we want to recieve the SMS in text mode
//delay(100);
mySerial.println(“AT+CPIN=");
delay(100);
//mySerial.println("AT + CSCA = "+3
******691"”);//recieve sms message, be careful need to add a country code before the cellphone number
//delay(100);
//mySerial.println("");//the content of the message
mySerial.println(“AT+CMGR=21”); //lis le msg
delay(100);
mySerial.println((char)26);//the ASCII code of the ctrl+z is 26
delay(100);
mySerial.println();
//return r;
}

This is "my" code. I don't really understand how the msg can be sent to my GSM. Can you help please ?

Does it send it or not? Well understand that is a case study in AT commands only.They are not hard to learn

Sorry, it doesn't work.

Donatien:
Sorry, it doesn’t work.

I’m not surprised. I AM surprised that code with smiley faces would even compile and upload.

There are stickies at the top of the forum. You were supposed to read them BEFORE posting. Clearly, you didn’t. Go do so now.