Starting BLE failed!

I have a very simple sketch to initialize arduino uno wifi rev2.
BLE is not initializing with this message "starting BLE failed!".
My current arduinoble library is 1.2.1 and I have tried with 1.2.0 with the same message.
How can I solve this problem?
It had been worked for a while. And suddenly this appeared.

#include <ArduinoBLE.h>
const int ledPin = LED_BUILTIN; // pin to use for the LED
void setup() {
while (!Serial);
pinMode(ledPin, OUTPUT);
while (!BLE.begin()) {
Serial.println("starting BLE failed!");

void loop() {
while (1){

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.