Skip to content

Commit

Permalink
remove GRPSloc and also fix FONA3G detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed Oct 15, 2015
1 parent 1e87673 commit 8826bd1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
15 changes: 14 additions & 1 deletion Adafruit_FONA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,20 @@ boolean Adafruit_FONA::begin(Stream &port) {
sendCheckReply(F("AT+CVHU=0"), F("OK"));

delay(100);
getReply(F("ATI"));
flushInput();

#ifdef ADAFRUIT_FONA_DEBUG
Serial.print("\t---> "); Serial.println("ATI");
#endif

mySerial->println("ATI");

readline(500, true);

#ifdef ADAFRUIT_FONA_DEBUG
Serial.print (F("\t<--- ")); Serial.println(replybuffer);
#endif

if (strstr_P(replybuffer, (prog_char *)F("SIM808 R14")) != 0) {
_type = FONA808_V2;
} else if (strstr_P(replybuffer, (prog_char *)F("SIM808 R13")) != 0) {
Expand Down
5 changes: 4 additions & 1 deletion examples/GPS/GPS.ino
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ void loop() {
Serial.println("Waiting for FONA 808 GPS 3D fix...");
}

// Fona 3G doesnt have GPRSlocation :/
if ((fona.type() == FONA3G_A) || (fona.type() == FONA3G_E))
return;
// Check for network, then GPRS
Serial.println(F("Checking for Cell network..."));
if (fona.getNetworkStatus() == 1) {
Expand All @@ -101,4 +104,4 @@ void loop() {
}
}
}
}
}

0 comments on commit 8826bd1

Please sign in to comment.