FONA808 GSM cannot connect to


Recently I have obtained the FONA808 arduino shield, I plugged it onto my Arduino Uno and everything works fine with the example sketches provided by the FONA library. I was able to obtain GPS coordinates and connect to the internet with GSM.
Since I want to use it with Blynk, I installed the TinyGSM library and loaded up the BlynkClient.ino, it had connected to the server smoothly, interactions were possible at that point.
However, when I tried to obtain a GPS coordinates as well as connecting to the Blynk server in the same sketch, it doesn’t work. I can see from the serial monitor that the GPS coordinates have been extracted, also it has connected to GPRS, but the problem is that it is stuck at Blynk.begin(auth, modem, apn, user, pass); and it will not connect to the server. I am using the latest version of Blynk. Does anyone know what the issue might be?

#define BLYNK_PRINT Serial
#define FONA_RX 3
#define FONA_TX 2
#define FONA_RST 4

#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>
#include "Adafruit_FONA.h"
char auth[] = "";

char apn[]  = "";
char user[] = "giffgaff";
char pass[] = "";

#include <SoftwareSerial.h>
SoftwareSerial SerialAT(3, 2); // RX, TX

SoftwareSerial fonaSS = SoftwareSerial(FONA_RX, FONA_TX); //for FONA808 GPS
SoftwareSerial *fonaSerial = &fonaSS;
Adafruit_FONA fona = Adafruit_FONA(FONA_RST);
TinyGsm modem(SerialAT);

float latitude, longitude, speed_kph, heading, speed_mph, altitude;
float GPSlat;
float GPSlon;

void turnOnGPS(){ 
  Serial.println(F("Adafruit FONA 808 & 3G GPS demo"));
  Serial.println(F("Initializing FONA... (May take a few seconds)"));
  fonaSerial->begin(9600);  //Software Serial fona begins
  if (! fona.begin(*fonaSerial)) {
    Serial.println(F("Couldn't find FONA"));
  Serial.println(F("FONA is OK"));
  // Try to enable GPRS

  Serial.println(F("Enabling GPS..."));
  Serial.print("GPSstatus: ");
  while(!(fona.GPSstatus() == 3)) //fona.getGPS is run until fona.GPSstatus() == 3 
    Serial.print("GPSstatus: ");
    Serial.print("getNetworkStatus: ");
    boolean gps_success = fona.getGPS(&latitude, &longitude, &speed_kph, &heading, &altitude);
  if(fona.GPSstatus() == 3) //when fona.GPSstatus() == 3, coordinates have been extracted
    boolean gps_success = fona.getGPS(&latitude, &longitude, &speed_kph, &heading, &altitude);
    if (gps_success){

      Serial.print("GPS lat:");
      GPSlat = latitude, 6; 
      Serial.println(GPSlat); //Serial.print() only limits to show 2 d.p
      Serial.print("GPS long:");
      GPSlon = longitude, 6;
      Serial.print("GPS speed KPH:");
      Serial.print("GPS speed MPH:");
      speed_mph = speed_kph * 0.621371192;
      Serial.print("GPS heading:");
      Serial.print("GPS altitude:");

      Serial.println("Waiting for FONA GPS 3D fix...");

void setup()
  // Debug console
  turnOnGPS(); //obtain GPS coordinates
  // Set GSM module baud rate
  fonaSerial->end(); //end serial communication with GPS to avoid conflict
  SerialAT.begin(9600); //serial communication for blynk starts
  Serial.println("Initializing modem...");
  String modemInfo = modem.getModemInfo();
  Serial.print("Modem: ");
  // Unlock your SIM card with a PIN
  Blynk.begin(auth, modem, apn, user, pass);

void loop()
  Serial.println("Loop is over!");

Does anyone have any clue cause this is really frustrating :persevere:

I have the exact same problem with the FONA808 (also using Giffgaff).

GPRS connects OK but it just continually tries to connect to the server (I have used both Blynk Cloud and my own Local Server but the result is the same).

I notice it does connect successfully most of the time (e.g, I can see hardware connected in the blynk app) but something is causing it to disconnect again almost immediately.
Every so often I get ‘[3000559] Ready (ping: 1137ms).’ However, this is shortly followed by another connection attempt.
Lots of ‘Unhandled’ visible when TinyGSM debug is enabled. e.g:
[43316] <[02|00|01|00] #authtoken#
[44384] Cmd error
### Unhandled: ERR
### Unhandled: DATA ACCEPT:1,37
however, I don’t know if these are relevant? Would be great to get some suggestions for debugging this.

In order to get any progress, I would recommend you to follow the README and Diagnostics of TinyGSM library.
The link is provided right int the GSM example:

  Attention! Please check out TinyGSM guide:


Please then post an extended report as a separate topic.