#include "SimpleBLE.h"
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif
SimpleBLE ble;
void onButton(){
String out = "BLE32 name: ";
out += String(millis() / 1000);
Serial.println(out);
ble.begin(out);
}
void setup() {
Serial.begin(115200);
Serial.setDebugOutput(true);
pinMode(0, INPUT_PULLUP);
Serial.print("ESP32 SDK: ");
Serial.println(ESP.getSdkVersion());
ble.begin("ESP32 SimpleBLE");
Serial.println("Press the button to change the device's name");
}
void loop() {
static uint8_t lastPinState = 1;
uint8_t pinState = digitalRead(0);
if(!pinState && lastPinState){
onButton();
}
lastPinState = pinState;
while(Serial.available()) Serial.write(Serial.read());
}
With this above simple BLE code uploaded on ESP32 wroom 38 pin
Everything goes well up to now
My smart phone is detecting the device in bluetooth scanned list as well
But while pairing it with a (just stand by) app named Dabble it gets connected and then disconnected within 1 or 2 seconds ![]()
Here are some results of happening
Please help in solving this

