SIM808 GPS/GPRS/GSM Arduino Shield(Product Code : RB-Dfr-665

Hello, I am just looking for some advice, I recently purchased: SIM808 GPS/GPRS/GSM Arduino Shield(Product Code : RB-Dfr-665) {SIM808 Arduino GPS/GPRS/GSM Shield - DFRobot}, but I have not been able to collect any GPS data? I am getting the "Open the GPS power success" in the serial terminal when I connect to an external power source, but nothing else is happening. In the AT commands it is coming up with AT+CPIN? which I can see means an error with the SIM card. (Just wondering if this is something to do with APN settings?)

Another query I am wondering about..I have purchased a GiffGaff SIM card that says it is 2G/3G/4G compatible. Should this be okay for the device? Also I am in the UK.

Any advice would be great for a newbie.

Lucy

anybody able to help :frowning:

Hi Lucy,

Try this code.

#include <SoftwareSerial.h>
#define DEBUG true
SoftwareSerial mySerial(7,8);

void setup(){
Serial.begin(9600);
mySerial.begin(9600);
getgps();
}

void loop(){
sendData( "AT+CGNSINF",1000,DEBUG);
}

void getgps(void){
sendData( "AT+CGNSPWR=1",1000,DEBUG);
sendData( "AT+CGPSINF=0",1000,DEBUG);
}

void sendData(String command, const int timeout, boolean debug){
String response = "";
mySerial.println(command);
delay(5);
if(debug){
long int time = millis();
while( (time+timeout) > millis()){
while(mySerial.available()){
response += char(mySerial.read());
}
}
Serial.print(response);
}
}