Blynk linked with BLE stops Arduino running (when not connected)

Hi. I am new to Blynk and relatively new to Arduino.

I and using your basic BLE sketch with an added function of digital write to pin 38. My problem is that my BLE doesn’t always connect to the Blynk app and the Arduino sketch will not run until it connects. I am worried as in case of a power cut, if the bluetooth connection is not automatically reconnected, the Arduino will not start running the code and will not do what its supposed to.

#define BLYNK_PRINT Serial

#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>

char auth[] = "*************************************4854b";

void setup()
{
  Serial.begin(9600);
  
  pinMode(38, OUTPUT);

  Serial1.begin(9600);  // via BT Module
  Blynk.begin(Serial1, auth);  // Connect to App via BT

  Serial.println("Waiting for connections...");
}

void loop()
{
  Blynk.run();
  
  digitalWrite(38, LOW);
}

I don’t think this will work with a BT/BLE connection, however try the Blynk.config() command instead of Blynk.begin()… But it really seems more setup for a standard WiFi /Ethernet based server link.

http://docs.blynk.cc/#blynk-firmware-configuration

No that don’t work. So basically if the arduino restarts for some reason, it won’t do anything until the BT connection is reestablished??

Correct - BT/BLE is still in beta so it might improve, but it is still limited by the medium, and I have always found BT based communication a bit iffy for constant 2 way control applications

Is there no way or writing something into the sketch whereby it will attempt to connect several times and if unsuccessful it will continue with the sketch as normal?