Error 908: the permission bluetooth connect has been denied. please enable it in the settings app

It is all about Bluetooth classic. I want the BLE, to connect multiple device to a single app.

First sentence:

yes, but the all examples are for classic

I configured the esp32 for BLE, still not shown in the device list


  Based on Neil Kolban example for IDF:

  Ported to Arduino ESP32 by Evandro Copercini

  updated by chegewara and MoThunderz


#include <BLEDevice.h>

#include <BLEServer.h>

#include <BLEUtils.h>

#include <BLE2902.h>

BLEServer* pServer = NULL;

BLECharacteristic* pCharacteristic = NULL;

BLEDescriptor *pDescr;

BLE2902 *pBLE2902;

bool deviceConnected = false;

bool oldDeviceConnected = false;

uint32_t value = 0;

// See the following for generating UUIDs:


#define SERVICE_UUID        "4fafc201-1fb5-459e-8fcc-c5c9c331914b"

#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8"

class MyServerCallbacks: public BLEServerCallbacks {

    void onConnect(BLEServer* pServer) {

      deviceConnected = true;


    void onDisconnect(BLEServer* pServer) {

      deviceConnected = false;



void setup() {


  // Create the BLE Device


  // Create the BLE Server

  pServer = BLEDevice::createServer();

  pServer->setCallbacks(new MyServerCallbacks());

  // Create the BLE Service

  BLEService *pService = pServer->createService(SERVICE_UUID);

  // Create a BLE Characteristic

  pCharacteristic = pService->createCharacteristic(




  // Create a BLE Descriptor


  pDescr = new BLEDescriptor((uint16_t)0x2901);

  pDescr->setValue("A very interesting variable");



  pBLE2902 = new BLE2902();



  // Start the service


  // Start advertising

  BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();



  pAdvertising->setMinPreferred(0x0);  // set value to 0x00 to not advertise this parameter


  Serial.println("Waiting a client connection to notify...");


void loop() {

    // notify changed value

    if (deviceConnected) {






    // disconnecting

    if (!deviceConnected && oldDeviceConnected) {

        delay(500); // give the bluetooth stack the chance to get things ready

        pServer->startAdvertising(); // restart advertising

        Serial.println("start advertising");

        oldDeviceConnected = deviceConnected;


    // connecting

    if (deviceConnected && !oldDeviceConnected) {

        // do stuff here on connecting

        oldDeviceConnected = deviceConnected;



For additional information,
The developer of this code said:
"Confirmed to work on:ESP32-WROOM-32D

Does not work on (will not connect):

My is ESP32-WROOM-32

good news, i found it in the list, but not connect. i found similar question in this forum, but not resolved (ESP32-WROOM-32 Does not Work with MIT App Inventor in BLE Mode (BluetoothLE)?)

waiting your support

when I add location sensor it shows the list of Bluetooth devices

yes, now it show the BLE devices, but not connect:
first it said "Connecting"

then it said "false"

I am using ESP-WROOM-32 module, is this device can connect to MIT app inventor?

Do not use ESP-WROOM-32, use ESP32-WROOM-32D instead.

I have no access to get ESP32-WROOM-32D locally, that is why I am trying to get a solution for ESP32-WROOM-32.

I am trying to solve the problem using this site:

Congratulation!!! Now it work for ESP32-WROOM-32 by adding KI04_Bluetooth1 extension from 160.- Bluetooth Low Energy. BLE. Librería. De AI2 a ESP32. De ESP32 a AI2.

Now I connected two BLE with a single MIT app inventor.

Thank you all of them for trying to resolve my problem!!!