Starting Bluetooth Low Energy module failed!

I was just getting started with an Arduino Uno Wifi rev 2.
I want to use BLE to send data from the arduino so i started by loading the scan example from the ArduinoBLE library. But the BLE isn't starting. i'm powering my arduion solely via USB.
Im always getting the Output: starting Bluetooth® Low Energy module failed!
Need help to initialize BLE?

#include <ArduinoBLE.h>

void setup() {
  Serial.begin(9600);
  while (!Serial);

  // begin initialization
  if (!BLE.begin()) {
    Serial.println("starting Bluetooth® Low Energy module failed!");

    while (1);
  }

  Serial.println("Bluetooth® Low Energy Central scan");

  // start scanning for peripheral
  BLE.scan();
}

void loop() {
  // check if a peripheral has been discovered
  BLEDevice peripheral = BLE.available();

  if (peripheral) {
    // discovered a peripheral
    Serial.println("Discovered a peripheral");
    Serial.println("-----------------------");

    // print address
    Serial.print("Address: ");
    Serial.println(peripheral.address());

    // print the local name, if present
    if (peripheral.hasLocalName()) {
      Serial.print("Local Name: ");
      Serial.println(peripheral.localName());
    }

    // print the advertised service UUIDs, if present
    if (peripheral.hasAdvertisedServiceUuid()) {
      Serial.print("Service UUIDs: ");
      for (int i = 0; i < peripheral.advertisedServiceUuidCount(); i++) {
        Serial.print(peripheral.advertisedServiceUuid(i));
        Serial.print(" ");
      }
      Serial.println();
    }

    // print the RSSI
    Serial.print("RSSI: ");
    Serial.println(peripheral.rssi());

    Serial.println();
  }
}
1 Like

I have exactly the same problem. Anyone know how to solve this problem?

I had the same problem, the solution was to update WifiNINa firmware. (Tools -> WiFi101/WiFiNINA Firmware Updater)

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