hello,
here a quick test with the demo code from the seeeduino gprs tutorial.
sms is send, but no response from gprs.
[code]/*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>
SoftwareSerial mySerial(7, 8);
String SIM_PIN_CODE = String(“0703”);
void setup()
{
mySerial.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the GPRS baud rate
delay(500);
}
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 input ‘d’ in the terminal, it will execute DialVoiceCall(), etc.
if (Serial.available())
switch(Serial.read())
{
case ‘t’:
Serial.println(“press ‘t’”);
SendTextMessage();
Serial.println(“done.”);
break;
case 'a' :
Serial.println("press 'a'");
mySerial.println("ATZ");
delay(100);
ShowSerialData();
mySerial.println("AT+CSMINS=?");
delay(100);
ShowSerialData();
mySerial.println("AT+CSMINS=<");
delay(100);
ShowSerialData();
mySerial.println("AT");
delay(100);
ShowSerialData();
mySerial.println("AT+IPR=19200");
delay(100);
ShowSerialData();
mySerial.print("AT+CPIN=");
mySerial.println(SIM_PIN_CODE);
delay(1000);
ShowSerialData();
Serial.println("done.");
break;
}
if (mySerial.available())
Serial.write(mySerial.read());
}
///SendTextMessage()
///this function is to send a sms message
void SendTextMessage()
{
Serial.println(“call SendTextMessage”);
mySerial.print(“AT+CMGF=1\r”); //Because we want to send the SMS in text mode
delay(100);
ShowSerialData();
mySerial.println(“AT + CMGS = “+336637*****””);//send sms message, be careful need to add a country code before the cellphone number
delay(100);
ShowSerialData();
mySerial.println(“Hello World !”);//the content of the message
delay(100);
ShowSerialData();
mySerial.println((char)26);//the ASCII code of the ctrl+z is 26
delay(100);
mySerial.println();
Serial.println(“SMS is ‘send’”);
}
void ShowSerialData()
{
while(mySerial.available()!=0)
Serial.write(mySerial.read());
}
[/code]