Continuous Connecting to blynk-cloud.com:80

I’ve created a project which uses two Arduino Pro Minis. One takes inputs from various sensors and sends the data to the other over RF link (NRF24L01 2.4 GHz module). The receiver Arduino is connected to the web using an Adafruit FONA cellular module. It is connected to the Blynk servers and forwards to data to a Blynk mobile app on my phone.

The device connects to the Blynk servers fine but then continuously disconnects and reconnects. In the serial monitor it repeats “Connecting to blynk-cloud.com:80”.

The cellular module uses software serial pins 8 and 9, while the NRF module uses pins 2 and 3. I’m wondering whether the RF module is to blame. Although even keeping void loop() clean, I still have the same issue.

SerialOutput


#define BLYNK_PRINT Serial
#define TINY_GSM_MODEM_SIM800
#define FONA_RX 8
#define FONA_TX 9
#define FONA_RST 4

#include <Adafruit_FONA.h>
#include <TinyGsmClient.h>
#include <BlynkSimpleTinyGSM.h>
#include <Blynk.h>
#include <SPI.h>
#include <SoftwareSerial.h>
#include <RF24.h>

char auth[] = "****************";
char apn[]  = "********";
char user[] = "";
char pass[] = "";

uint8_t buf[25];

RF24 radio(3, 2); // CE, CSN
const byte address[6] = "00001";

SoftwareSerial fonaSS = SoftwareSerial(FONA_TX, FONA_RX);

SoftwareSerial *fonaSerial = &fonaSS;
Adafruit_FONA fona = Adafruit_FONA(FONA_RST);
TinyGsm modem(fonaSS);

void setup()
{
 while (!Serial);
  Serial.begin(115200);
  fonaSerial->begin(4800);
  
  if (! fona.begin(*fonaSerial)) {
    Serial.println(F("Couldn't find FONA"));
    while (1);
  }

  Blynk.begin(auth, modem, apn, user, pass);

  radio.begin();
  radio.openReadingPipe(0, address);
  radio.setPALevel(RF24_PA_MIN);
  radio.startListening();
}

void loop()
{
  Blynk.run();
  
   if (radio.available()) 
 {
    radio.read(buf, sizeof(buf));
 }
}

You’ve omitted some essential information….

  1. Add details :
    • Hardware model + communication type. For example: Arduino UNO with Ethernet Shield
    • Smartphone OS (iOS or Android) + version
    • Blynk server or local server
    • Blynk Library version

Pete.