Serial Relay sketch
// Serial Relay - Arduino will patch a
// serial link between the computer and the GPRS Shield
// at 19200 bps 8-N-1
#define RxPin 7
#define TxPin 8
#include <SoftwareSerial.h>
SoftwareSerial GPRS(RxPin, TxPin); // RX, TX
void setup()
{
pinMode(13, OUTPUT); // Turn off pin 13
digitalWrite(13,LOW);
GPRS.begin(19200);
Serial.begin(19200);
}
void loop()
{
if (GPRS.available())
{
while(GPRS.available())
{
Serial.write(GPRS.read());
}
}
if (Serial.available())
{
while(Serial.available())
{
GPRS.write(Serial.read());
}
}
}
Open serial monitor and make sure the baud rate is set to 19200. Type AT (return) and it sound echo in the main screen AT OK.