GPRS shield not responding to AT commands
Posted: Sat Jul 12, 2014 11:47 pm
I just bought a GPRS shield from ebay (http://www.ebay.com/itm/321335842823?_t ... EBIDX%3AIT). I hooked it up to a Arduino UNO and now trying to use the serial monitor in the arduino IDE to communicate with the shield.
I used the test code given on your wiki (http://www.geeetech.com/wiki/index.php/GPRS_Shield_V2.0) and have connected the jumpers on the software serial side.
The shield is being powered from a arduino uno and when I press the power button (see attached screenshot for output) the red led turns on and stays on. The green LED as indicated turns on every 3000ms and then turns off.
I have attached a unlocked sim card from t-mobile to it. No external power supplies have been used.
Even after doing all this the shield is not responding to any AT commands.
Here is the code that I am using:
//Serial Relay - Arduino will patch a
//serial link between the computer and the GPRS Shield
//at 19200 bps 8-N-1
//Computer is connected to Hardware UART
//GPRS Shield is connected to the Software UART
#include <SoftwareSerial.h>
SoftwareSerial GPRS(7, 8);
unsigned char buffer[64]; // buffer array for data recieve over serial port
int count=0; // counter for buffer array
void setup()
{
GPRS.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the Serial port of Arduino baud rate.
}
void loop()
{
if (GPRS.available()) // if data is comming from softwareserial port ==> data is comming from gprs shield
{
while(GPRS.available()) // reading data into char array
{
buffer[count++]=GPRS.read(); // writing data into array
if(count == 64)break;
}
Serial.write(buffer,count); // if no data transmission ends, write buffer to hardware serial port
clearBufferArray(); // call clearBufferArray function to clear the storaged data from the array
count = 0; // set counter of while loop to zero
}
if (Serial.available()) // if data is available on hardwareserial port ==> data is comming from PC or notebook
GPRS.write(Serial.read()); // write it to the GPRS shield
}
void clearBufferArray() // function to clear buffer array
{
for (int i=0; i<count;i++)
{ buffer=NULL;} // clear all index of array with command NULL
}
Please help.
thanks
-n