espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.63k stars 7.41k forks source link

Not all BLE characteristics are visible/discovered #10326

Open kakopappa opened 2 months ago

kakopappa commented 2 months ago

Board

ESP32 S3

Device Description

ESP32-S3-WROOM-1 dev board

Hardware Configuration

nothing attached

Version

v3.0.3

IDE Name

Arduino IDE

Operating System

Windows 10

Flash frequency

240

PSRAM enabled

no

Upload speed

921600

Description

Hello,

I noticed not all BLE characteristics are discovered when there are over 8.

image

Sketch

/*
    Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleServer.cpp
    Ported to Arduino ESP32 by Evandro Copercini
    updates by chegewara
*/

#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>

// See the following for generating UUIDs:
// https://www.uuidgenerator.net/

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

#define CHARACTERISTIC_UUID_1  "beb5483e-36e1-0001-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_2  "beb5483e-36e1-0002-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_3  "beb5483e-36e1-0003-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_4  "beb5483e-36e1-0004-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_5  "beb5483e-36e1-0005-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_6  "beb5483e-36e1-0006-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_7  "beb5483e-36e1-0007-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_8  "beb5483e-36e1-0008-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_9  "beb5483e-36e1-0009-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_10 "beb5483e-36e1-0010-b7f5-ea07361b26a8"

void setup() {
  Serial.begin(115200);
  Serial.println("Starting BLE work!");

  BLEDevice::init("PROV_123456");
  BLEServer *pServer = BLEDevice::createServer();
  BLEService *pService = pServer->createService(SERVICE_UUID);

  BLECharacteristic *pCharacteristic1 =pService->createCharacteristic(CHARACTERISTIC_UUID_1, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE);
  BLECharacteristic *pCharacteristic2 =pService->createCharacteristic(CHARACTERISTIC_UUID_2, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE);
  BLECharacteristic *pCharacteristic3 =pService->createCharacteristic(CHARACTERISTIC_UUID_3, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE);
  BLECharacteristic *pCharacteristic4 =pService->createCharacteristic(CHARACTERISTIC_UUID_4, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE);
  BLECharacteristic *pCharacteristic5 =pService->createCharacteristic(CHARACTERISTIC_UUID_5, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE);
  BLECharacteristic *pCharacteristic6 =pService->createCharacteristic(CHARACTERISTIC_UUID_6, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE);
  BLECharacteristic *pCharacteristic7 =pService->createCharacteristic(CHARACTERISTIC_UUID_7, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE);
  BLECharacteristic *pCharacteristic8 =pService->createCharacteristic(CHARACTERISTIC_UUID_8, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE);
  BLECharacteristic *pCharacteristic9 =pService->createCharacteristic(CHARACTERISTIC_UUID_9, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE);
  BLECharacteristic *pCharacteristic10 =pService->createCharacteristic(CHARACTERISTIC_UUID_10, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE);

  pService->start();
  // BLEAdvertising *pAdvertising = pServer->getAdvertising();  // this still is working for backward compatibility
  BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();
  pAdvertising->addServiceUUID(SERVICE_UUID);
  pAdvertising->setScanResponse(true);
  pAdvertising->setMinPreferred(0x06);  // functions that help with iPhone connections issue
  pAdvertising->setMinPreferred(0x12);
  BLEDevice::startAdvertising();
  Serial.println("Characteristic defined! Now you can read it in your phone!");
}

void loop() {
  // put your main code here, to run repeatedly:
  delay(2000);
}

Debug Message

[  1253][V][BLEServer.cpp:66] createService(): >> createService - 4fafc201-1fb5-459e-8fcc-c5c9c331914b
[  1263][V][FreeRTOS.cpp:179] take(): Semaphore taking: name: CreateEvt (0x3fcf7c30), owner: <N/A> for createService
[  1273][V][FreeRTOS.cpp:188] take(): Semaphore taken:  name: CreateEvt (0x3fcf7c30), owner: createService
[  1283][V][BLEService.cpp:59] executeCreate(): >> executeCreate() - Creating service (esp_ble_gatts_create_service) service uuid: 4fafc201-1fb5-459e-8fcc-c5c9c331914b
[  1298][V][FreeRTOS.cpp:179] take(): Semaphore taking: name: CreateEvt (0x3fcf7e64), owner: <N/A> for executeCreate
[  1308][V][FreeRTOS.cpp:188] take(): Semaphore taken:  name: CreateEvt (0x3fcf7e64), owner: executeCreate
[  1318][V][FreeRTOS.cpp:59] wait(): >> wait: Semaphore waiting: name: CreateEvt (0x3fcf7e64), owner: executeCreate for executeCreate
[  1318][D][BLEDevice.cpp:96] gattServerEventHandler(): gattServerEventHandler [esp_gatt_if: 3] ... ESP_GATTS_CREATE_EVT
[  1340][V][BLEUtils.cpp:1434] dumpGattServerEvent(): GATT ServerEvent: ESP_GATTS_CREATE_EVT
[  1348][V][BLEUtils.cpp:1491] dumpGattServerEvent(): [status: ESP_GATT_OK, service_handle: 40 0x28, service_id: [uuid: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, inst_id: 0]]
[  1364][V][BLEServer.cpp:137] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_CREATE_EVT
[  1373][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcf7c30), owner: createService
[  1382][V][BLEService.cpp:186] setHandle(): >> setHandle - Handle=0x28, service UUID=4fafc201-1fb5-459e-8fcc-c5c9c331914b)
[  1394][V][BLEService.cpp:192] setHandle(): << setHandle
[  1399][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcf7e64), owner: executeCreate
[  1408][V][BLEServer.cpp:275] handleGATTServerEvent(): << handleGATTServerEvent
[  1408][V][FreeRTOS.cpp:73] wait(): << wait: Semaphore released: name: CreateEvt (0x3fcf7e64), owner: <N/A>
[  1425][V][BLEService.cpp:76] executeCreate(): << executeCreate
[  1431][V][FreeRTOS.cpp:59] wait(): >> wait: Semaphore waiting: name: CreateEvt (0x3fcf7c30), owner: <N/A> for createService
[  1442][V][FreeRTOS.cpp:73] wait(): << wait: Semaphore released: name: CreateEvt (0x3fcf7c30), owner: <N/A>
[  1556][D][BLEService.cpp:213] addCharacteristic(): Adding characteristic: uuid=beb5483e-36e1-0004-b7f5-ea07361b26a8 to service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  1573][V][BLEService.cpp:225] addCharacteristic(): << addCharacteristic()
[  1579][V][BLEService.cpp:212] addCharacteristic(): >> addCharacteristic()
[  1586][D][BLEService.cpp:213] addCharacteristic(): Adding characteristic: uuid=beb5483e-36e1-0005-b7f5-ea07361b26a8 to service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  1603][V][BLEService.cpp:225] addCharacteristic(): << addCharacteristic()
[  1610][V][BLEService.cpp:212] addCharacteristic(): >> addCharacteristic()
[  1617][D][BLEService.cpp:213] addCharacteristic(): Adding characteristic: uuid=beb5483e-36e1-0006-b7f5-ea07361b26a8 to service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  1633][V][BLEService.cpp:225] addCharacteristic(): << addCharacteristic()
[  1640][V][BLEService.cpp:212] addCharacteristic(): >> addCharacteristic()
[  1647][D][BLEService.cpp:213] addCharacteristic(): Adding characteristic: uuid=beb5483e-36e1-0007-b7f5-ea07361b26a8 to service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  1664][V][BLEService.cpp:225] addCharacteristic(): << addCharacteristic()
[  1671][V][BLEService.cpp:212] addCharacteristic(): >> addCharacteristic()
[  1677][D][BLEService.cpp:213] addCharacteristic(): Adding characteristic: uuid=beb5483e-36e1-0008-b7f5-ea07361b26a8 to service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  1694][V][BLEService.cpp:225] addCharacteristic(): << addCharacteristic()
[  1701][V][BLEService.cpp:212] addCharacteristic(): >> addCharacteristic()
[  1708][D][BLEService.cpp:213] addCharacteristic(): Adding characteristic: uuid=beb5483e-36e1-0009-b7f5-ea07361b26a8 to service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  1725][V][BLEService.cpp:225] addCharacteristic(): << addCharacteristic()
[  1732][V][BLEService.cpp:212] addCharacteristic(): >> addCharacteristic()
[  1738][D][BLEService.cpp:213] addCharacteristic(): Adding characteristic: uuid=beb5483e-36e1-0010-b7f5-ea07361b26a8 to service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  1755][V][BLEService.cpp:225] addCharacteristic(): << addCharacteristic()
[  1762][V][BLEService.cpp:128] start(): >> start(): Starting service (esp_ble_gatts_start_service): UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  1776][V][BLECharacteristic.cpp:79] executeCreate(): >> executeCreate()
[  1783][D][BLECharacteristic.cpp:88] executeCreate(): Registering characteristic (esp_ble_gatts_add_char): uuid: beb5483e-36e1-0001-b7f5-ea07361b26a8, service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  1802][V][FreeRTOS.cpp:179] take(): Semaphore taking: name: CreateEvt (0x3fcb2e34), owner: <N/A> for executeCreate
[  1813][V][FreeRTOS.cpp:188] take(): Semaphore taken:  name: CreateEvt (0x3fcb2e34), owner: executeCreate
[  1822][V][FreeRTOS.cpp:59] wait(): >> wait: Semaphore waiting: name: CreateEvt (0x3fcb2e34), owner: executeCreate for executeCreat[
1823][D][BLEDevice.cpp:96] gattServerEventHandler(): gattServerEventHandler [esp_gatt_if: 3] ... ESP_GATTS_ADD_CHAR_EVT
[  1845][V][BLEUtils.cpp:1434] dumpGattServerEvent(): GATT ServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  1853][V][BLEUtils.cpp:1451] dumpGattServerEvent(): [status: ESP_GATT_OK, attr_handle: 42 0x2a, service_handle: 40 0x28, char_uuid: beb5483e-36e1-0001-b7f5-ea07361b26a8]
[  1868][V][BLEServer.cpp:137] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  1878][V][BLECharacteristic.cpp:577] setHandle(): >> setHandle: handle=0x2a, characteristic uuid=beb5483e-36e1-0001-b7f5-ea07361b26a8
[  1890][V][BLECharacteristic.cpp:579] setHandle(): << setHandle
[  1896][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  1906][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcb2e34), owner: executeCreate
[  1915][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[
  1915][V][FreeRTOS.cpp:73] wait(): << wait: Semaphore released: name: CreateEvt (0x3fcb2e34), owner: <N/A>
[  1933][V][BLECh[a r a1c9t3e3r]i[sVt]i[cB.LcEpCph:a1r1a1c]t eerxiesctuitce.Ccrpepa:t1e9(1)]:  h<a<n delxeeGcAuTtTeSCerrevaetreE
v
nt(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  19[4 9 ]1[9V4]9[]B[LVE]C[hBaLrEaCchtaerraicstteirci.sctpipc:.4c4p4p]: 7h9a]n delxeeGcAuTtTeSCerrevaetreE(v)e:n t>(>) :e x<e<c uhenrlaGeT)
rverEvent
[  1962][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  1962][D][BLECharacteristic.cpp:88] executeCreate(): Registering characteristic (esp_ble_gatts_add_char): uuid: beb5483e-36e1-0002-b7f5-ea07361b26a8, service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  1992][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  1992][V][FreeRTOS.cpp:179] take(): Semaphore taking: name: CreateEvt (0x3fcb3688), owner: <N/A> for executeCreate
[  2010][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> hand[l e G2A0T1T0S]e[rVv]e[rFErveeenRtT:O SE.ScPp_pG:A1T8T8S]_ tDk_(HA _eVa
hore taken:  name: CreateEvt (0x3fcb3688), owner: executeCreate
[  2028][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2028][V][FreeRTOS.cpp:59] wait(): >> wait: Semaphore waiting: name: CreateEvt (0x3fcb3688), owner: executeCreate for executeCreate
[  2048][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2057][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2065][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2075][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2083][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2093][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2101][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2111][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2119][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2129][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2137][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2147][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2155][V][BLEServer.cpp:275] handleGATTServerEvent(): << handleGATTServerEvent
[  2162][D][BLEDevice.cpp:96] gattServerEventHandler(): gattServerEventHandler [esp_gatt_if: 3] ... ESP_GATTS_ADD_CHAR_EVT
[  2173][V][BLEUtils.cpp:1434] dumpGattServerEvent(): GATT ServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2181][V][BLEUtils.cpp:1451] dumpGattServerEvent(): [status: ESP_GATT_OK, attr_handle: 44 0x2c, service_handle: 40 0x28, char_uuid: beb5483e-36e1-0002-b7f5-ea07361b26a8]
[  2197][V][BLEServer.cpp:137] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2206][V][BLECharacteristic.cpp:577] setHandle(): >> setHandle: handle=0x2c, characteristic uuid=beb5483e-36e1-0002-b7f5-ea07361b26a8
[  2218][V][BLECharacteristic.cpp:579] setHandle(): << setHandle
[  2224][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2234][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2242][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2252][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcb3688), owner: executeCreate
[  2261][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2261][V][FreeRTOS.cpp:73] wait(): << wait: Semaphore released: name: CreateEvt (0x3fcb3688), owner: <N/A>
[  2279][V][[B L E2C2h7a9r]a[cVt]e[rBiLsEtCihca.rcapcpt:e1r1i1s]t iecx.eccpupt:e1C9r1e]a thea(n)d:l e<G<A TeTxSeecruvteerCErveeantt
): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  229[5 ] [2V2]9[5B]L[EVC]h[aBrLaEcCthearriascttiecr.icsptpi:c4.4c4p]p :h7a9n]d leexGeAcTuTtSeeCrrveeartEev(e)n:t (>)>:  e<x<e chateCeeAtT(er
erEvent
[  2197][V][BLEServer.cpp:137] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2206][V][BLECharacteristic.cpp:577] setHandle(): >> setHandle: handle=0x2c, characteristic uuid=beb5483e-36e1-0002-b7f5-ea07361b26a8
[  2218][V][BLECharacteristic.cpp:579] setHandle(): << setHandle
[  2224][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2234][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2242][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2252][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcb3688), owner: executeCreate
[  2261][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2261][V][FreeRTOS.cpp:73] wait(): << wait: Semaphore released: name: CreateEvt (0x3fcb3688), owner: <N/A>
[  2279][V][[B L E2C2h7a9r]a[cVt]e[rBiLsEtCihca.rcapcpt:e1r1i1s]t iecx.eccpupt:e1C9r1e]a thea(n)d:l e<G<A TeTxSeecruvteerCErveeantt
): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  229[5 ] [2V2]9[5B]L[EVC]h[aBrLaEcCthearriascttiecr.icsptpi:c4.4c4p]p :h7a9n]d leexGeAcTuTtSeeCrrveeartEev(e)n:t (>)>:  e<x<e chateCeeAtT(er
erEvent
[  2308][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2308][D][BLECharacteristic.cpp:88] executeCreate(): Registering characteristic (esp_ble_gatts_add_char): uuid: beb5483e-36e1-0003-b7f5-ea07361b26a8, service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  2337][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2337][V][FreeRTOS.cpp:179] take(): Semaphore taking: name: CreateEvt (0x3fcb394c), owner: <N/A> for executeCreate
[  2355][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGA[T T S2e3r5v5e]r[EVv]e[nFtr:e eERSTPO_SG.AcTpTpS:_1A8D8D CakR(E:T
maphore taken:  name: CreateEvt (0x3fcb394c), owner: executeCreate
[  2374][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2374][V][FreeRTOS.cpp:59] wait(): >> wait: Semaphore waiting: name: CreateEvt (0x3fcb394c), owner: executeCreate for executeCreate
[  2393][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2403][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2411][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2421][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2429][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2439][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2447][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2457][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2465][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2475][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2483][V][BLEServer.cpp:275] handleGATTServerEvent(): << handleGATTServerEvent
[  2490][D][BLEDevice.cpp:96] gattServerEventHandler(): gattServerEventHandler [esp_gatt_if: 3] ... ESP_GATTS_ADD_CHAR_EVT
[  2501][V][BLEUtils.cpp:1434] dumpGattServerEvent(): GATT ServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2509][V][BLEUtils.cpp:1451] dumpGattServerEvent(): [status: ESP_GATT_OK, attr_handle: 46 0x2e, service_handle: 40 0x28, char_uuid: beb5483e-36e1-0003-b7f5-ea07361b26a8]
[  2525][V][BLEServer.cpp:137] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2534][V][BLECharacteristic.cpp:577] setHandle(): >> setHandle: handle=0x2e, characteristic uuid=beb5483e-36e1-0003-b7f5-ea07361b26a8
[  2546][V][BLECharacteristic.cpp:579] setHandle(): << setHandle
[  2552][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2562][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2570][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2580][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2588][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2598][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcb394c), owner: executeCreate
[  2607][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2607][V][FreeRTOS.cpp:73] wait(): << wait: Semaphore released: name: CreateEvt (0x3fcb394c), owner: <N/A>
[  2625][V[] [ B2L6E2C5h]a[rVa]c[tBeLrEiCshtairca.cctpepr:i1s1t1i]c .ecxpepc:u1t9e1C]r ehaatned(l)e:G A<T<T SeexrevceurtEevCerneta()
 >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2641][V][[ B L2E6C4h1a]r[aVc]t[eBrLiEsCthiacr.accptpe:r4i4s4t]i ch.acnpdpl:e7G9A]T TeSxeercvuetreECvreenatt(e)(:) :< <> >h aenxecetATCreaver)v
nt
[  2654][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2654][D][BLECharacteristic.cpp:88] executeCreate(): Registering characteristic (esp_ble_gatts_add_char): uuid: beb5483e-36e1-0004-b7f5-ea07361b26a8, service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  2683][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2683][V][FreeRTOS.cpp:179] take(): Semaphore taking: name: CreateEvt (0x3fcb3c10), owner: <N/A> for executeCreate
[  2701][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleG[A T T2S7e0r1v]e[rVE]v[eFnrte:e RETSOPS_.GcApTpT:S1_8A8DD_CHke_)V S
maphore taken:  name: CreateEvt (0x3fcb3c10), owner: executeCreate
[  2719][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2719][V][FreeRTOS.cpp:59] wait(): >> wait: Semaphore waiting: name: CreateEvt (0x3fcb3c10), owner: executeCreate for executeCreate
[  2739][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2749][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2757][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2767][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2775][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2785][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2793][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2802][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2810][V][BLEServer.cpp:275] handleGATTServerEvent(): << handleGATTServerEvent
[  2818][D][BLEDevice.cpp:96] gattServerEventHandler(): gattServerEventHandler [esp_gatt_if: 3] ... ESP_GATTS_ADD_CHAR_EVT
[  2829][V][BLEUtils.cpp:1434] dumpGattServerEvent(): GATT ServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2837][V][BLEUtils.cpp:1451] dumpGattServerEvent(): [status: ESP_GATT_OK, attr_handle: 48 0x30, service_handle: 40 0x28, char_uuid: beb5483e-36e1-0004-b7f5-ea07361b26a8]
[  2852][V][BLEServer.cpp:137] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2862][V][BLECharacteristic.cpp:577] setHandle(): >> setHandle: handle=0x30, characteristic uuid=beb5483e-36e1-0004-b7f5-ea07361b26a8
[  2874][V][BLECharacteristic.cpp:579] setHandle(): << setHandle
[  2880][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2890][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2898][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2908][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  2915][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  2925][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3165][V][BLEUtils.cpp:1451] dumpGattServerEvent(): [status: ESP_GATT_OK, attr_handle: 50 0x32, service_handle: 40 0x28, char_uuid: beb5483e-36e1-0005-b7f5-ea07361b26a8]
[  3180][V][BLEServer.cpp:137] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3189][V][BLECharacteristic.cpp:577] setHandle(): >> setHandle: handle=0x32, characteristic uuid=beb5483e-36e1-0005-b7f5-ea07361b26a8
[  3201][V][BLECharacteristic.cpp:579] setHandle(): << setHandle
[  3207][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3217][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3225][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3235][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3243][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3253][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3261][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3271][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3316][[ V ]3[3B1L6E]C[hVa]r[aBcLtEeCrhiasrtaicct.ecrpips:t1i1c1.]c pepx:e1c9u1t]e Chraenadtlee(G)A:T T<S<e revxeercEuvteenCtr(eat 
> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[[    33333322]][[VV]][[BBLLEECChhaarraacctteerriissttiicc..ccpppp::47494]]  ehxaencdulteeGCArTeTaSteer(v)e:r E>v>e netx(e)c:u t<eCrhane(eG
TTServerEvent
[  3345][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3345][D][BLECharacteristic.cpp:88] executeCreate(): Registering characteristic (esp_ble_gatts_add_char): uuid: beb5483e-36e1-0006-b7f5-ea07361b26a8, service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  3374][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3374][V][FreeRTOS.cpp:179] take(): Semaphore taking: name: CreateEvt (0x3fcb4198), owner: <N/A> for executeCreate
[  3392][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handle[G A T3T3S9e2r]v[eVr]E[vFernete:R TEOSSP._cGpApT:T1S8_8A]Dt_kH(R:ESe
aphore taken:  name: CreateEvt (0x3fcb4198), owner: executeCreate
[  3411][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3411][V][FreeRTOS.cpp:59] wait(): >> wait: Semaphore waiting: name: CreateEvt (0x3fcb4198), owner: executeCreate for executeCreate
[  3430][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3440][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3448][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3458][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3466][V][BLEServer.cpp:275] handleGATTServerEvent(): << handleGATTServerEvent
[  3473][D][BLEDevice.cpp:96] gattServerEventHandler(): gattServerEventHandler [esp_gatt_if: 3] ... ESP_GATTS_ADD_CHAR_EVT
[  3484][V][BLEUtils.cpp:1434] dumpGattServerEvent(): GATT ServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3493][V][BLEUtils.cpp:1451] dumpGattServerEvent(): [status: ESP_GATT_OK, attr_handle: 52 0x34, service_handle: 40 0x28, char_uuid: beb5483e-36e1-0006-b7f5-ea07361b26a8]
[  3508][V][BLEServer.cpp:137] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3517][V][BLECharacteristic.cpp:577] setHandle(): >> setHandle: handle=0x34, characteristic uuid=beb5483e-36e1-0006-b7f5-ea07361b26a8
[  3529][V][BLECharacteristic.cpp:579] setHandle(): << setHandle
[  3535][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3535][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3545][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3553][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3563][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3571][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3581][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3589][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3599][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3607][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3617][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3625][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3634][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcb4198), owner: executeCreate
[  3644][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3644][V][FreeRTOS.cpp:73] wait(): << wait: Semaphore released: name: CreateEvt (0x3fcb4198), owner: <N/A>
[  3662][V[] [ B3L6E6C1h]a[rVa]c[tBeLrEiCshtairca.cctpepr:i1s1t1i]c .ecxpepc:u1t9e1C]r ehaatned(l)e:G A<T<T SeexrevceurtEevCernetat)
 >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3678][[V ] [3B6L7E8C]h[aVr]a[cBtLeErCihsatriacc.tceprpi:s4t4i4c]. chpapn:d7l9e]G AeTxTeSceurtveeCrrEevaetnet(())::  ><><  ehxaedueeArTaeev)rEvent
[  3691][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3691][D][BLECharacteristic.cpp:88] executeCreate(): Registering characteristic (esp_ble_gatts_add_char): uuid: beb5483e-36e1-0007-b7f5-ea07361b26a8, service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  3720][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3720][V][FreeRTOS.cpp:179] take(): Semaphore taking: name: CreateEvt (0x3fcb445c), owner: <N/A> for executeCreate
[  3738][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEv[e n t3:7 3E8S]P[_VG]A[TFTrSe_eARDTDO_SC.HcApp_1V8
 take(): Semaphore taken:  name: CreateEvt (0x3fcb445c), owner: executeCreate
[  3757][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3757][V][FreeRTOS.cpp:59] wait(): >> wait: Semaphore waiting: name: CreateEvt (0x3fcb445c), owner: executeCreate for executeCreate
[  3776][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3786][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3794][V][BLEServer.cpp:275] handleGATTServerEvent(): << handleGATTServerEvent
[  3802][D][BLEDevice.cpp:96] gattServerEventHandler(): gattServerEventHandler [esp_gatt_if: 3] ... ESP_GATTS_ADD_CHAR_EVT
[  3813][V][BLEUtils.cpp:1434] dumpGattServerEvent(): GATT ServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3821][V][BLEUtils.cpp:1451] dumpGattServerEvent(): [status: ESP_GATT_OK, attr_handle: 54 0x36, service_handle: 40 0x28, char_uuid: beb5483e-36e1-0007-b7f5-ea07361b26a8]
[  3836][V][BLEServer.cpp:137] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3846][V][BLECharacteristic.cpp:577] setHandle(): >> setHandle: handle=0x36, characteristic uuid=beb5483e-36e1-0007-b7f5-ea07361b26a8
[  3858][V][BLECharacteristic.cpp:579] setHandle(): << setHandle
[  3863][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3873][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3881][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3891][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3935][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3945][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3953][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3963][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3971][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  3981][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcb445c), owner: executeCreate
[  3990][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  3990][V][FreeRTOS.cpp:73] wait(): << wait: Semaphore released: name: CreateEvt (0x3fcb445c), owner: <N/A>
[  4008][V][[B L E4C0h0a7r]a[cVt]e[rBiLsEtCihca.rcapcpt:e1r1i1s]t iecx.eccpupt:e1C9r1e]a thea(n)d:l e<G<A TeTxSeecruvteerCErveeante(
: >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4024][V][[ B L4E0C2h4a]r[aVc]t[eBrLiEsCthiacr.accptpe:r4i4s4t]i ch.acnpdpl:e7G9A]T TeSxeercvuetreECvreenatt(e)(:) :< <> >h aenxlcuAeTSerte()
vent
[  4037][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4037][D][BLECharacteristic.cpp:88] executeCreate(): Registering characteristic (esp_ble_gatts_add_char): uuid: beb5483e-36e1-0008-b7f5-ea07361b26a8, service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  4066][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4066][V][FreeRTOS.cpp:179] take(): Semaphore taking: name: CreateEvt (0x3fcb4720), owner: <N/A> for executeCreate
[  4084][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTSe[r v e4r0E8v4e]n[tV:] [EFSrPe_eGRATTOTSS._cApDpD:_18H]RtaVT
): Semaphore taken:  name: CreateEvt (0x3fcb4720), owner: executeCreate
[  4103][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4103][V][FreeRTOS.cpp:59] wait(): >> wait: Semaphore waiting: name: CreateEvt (0x3fcb4720), owner: executeCreate for executeCreate
[  4122][V][BLEServer.cpp:275] handleGATTServerEvent(): << handleGATTServerEvent
[  4130][D][BLEDevice.cpp:96] gattServerEventHandler(): gattServerEventHandler [esp_gatt_if: 3] ... ESP_GATTS_ADD_CHAR_EVT
[  4141][V][BLEUtils.cpp:1434] dumpGattServerEvent(): GATT ServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4149][E][BLEUtils.cpp:1457] dumpGattServerEvent(): [status: ESP_GATT_ERROR, attr_handle: 0 0x00, service_handle: 40 0x28, char_uuid: beb5483e-36e1-0008-b7f5-ea07361b26a8]
[  4164][V][BLEServer.cpp:137] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4174][V][BLECharacteristic.cpp:577] setHandle(): >> setHandle: handle=0x00, characteristic uuid=beb5483e-36e1-0008-b7f5-ea07361b26a8
[  4186][V][BLECharacteristic.cpp:579] setHandle(): << setHandle
[  4192][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4202][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4209][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4219][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4227][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4237][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4245][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4255][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4263][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4273][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4281][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4291][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4299][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4309][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4317][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4326][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcb4720), owner: executeCreate
[  4336][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4369][[ V ]4[3B6L9E]C[hVa]r[aBcLtEeCrhiasrtaicct.ecrpips:t4i4c4.]c phpa:n7d9l]e GeAxTeTcSuetrevCerreEavteen(t)(:) :> >< <e xheanuleGrTaSe(v
rEvent
[  4383][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4383][D][BLECharacteristic.cpp:88] executeCreate(): Registering characteristic (esp_ble_gatts_add_char): uuid: beb5483e-36e1-0009-b7f5-ea07361b26a8, service: UUID: 4fafc201-1fb5-459e-8fcc-c5c9c331914b, handle: 0x0028
[  4412][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4412][V][FreeRTOS.cpp:179] take(): Semaphore taking: name: CreateEvt (0x3fcb49e4), owner: <N/A> for executeCreate
[  4430][V][BLEServer.cpp:275] handleGATTServerEvent(): << handleGATTServerEvent
[  4430][V][FreeRTOS.cpp:188] take(): Semaphore taken:  name: CreateEvt (0x3fcb49e4), owner: executeCreate
[  4447][V][FreeRTOS.cpp:59] wait(): >> wait: Semaphore waiting: name: CreateEvt ([0 x 34f4c4b74]9[eD4])[,B LoEwDneevri:c ee.xcepcpt96r aaetferverevuneHrnale
(): gattServerEventHandler [esp_gatt_if: 3] ... ESP_GATTS_ADD_CHAR_EVT
[  4467][V][BLEUtils.cpp:1434] dumpGattServerEvent(): GATT ServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4475][E][BLEUtils.cpp:1457] dumpGattServerEvent(): [status: ESP_GATT_ERROR, attr_handle: 0 0x00, service_handle: 40 0x28, char_uuid: beb5483e-36e1-0009-b7f5-ea07361b26a8]
[  4491][V][BLEServer.cpp:137] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4500][V][BLECharacteristic.cpp:577] setHandle(): >> setHandle: handle=0x00, characteristic uuid=beb5483e-36e1-0009-b7f5-ea07361b26a8
[  4512][V][BLECharacteristic.cpp:579] setHandle(): << setHandle
[  4518][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4528][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4536][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4546][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4554][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4564][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4572][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4582][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4589][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4599][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4607][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4617][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4625][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4635][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4643][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4653][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcb4720), owner: <N/A>
[  4662][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4670][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4680][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcb49e4), owner: executeCreate
[  4689][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4689][V][FreeRTOS.cpp:73] wait(): << wait: Semaphore released: name: CreateEvt (0x3fcb49e4), owner: <N/A>
[  4707][V[] [ B4L7E0C7h]a[rVa]c[tBeLrEiCshtairca.cctpepr:i1s1t1i]c .ecxpepc:u1t9e1C]r ehaatned(l)e:G A<T<T SeexrevceurtEevCernetate 
> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4884][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4891][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4901][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4909][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4919][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4927][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4937][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4945][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4955][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4963][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4973][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  4981][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  4991][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcb4720), owner: <N/A>
[  5000][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  5007][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  5017][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcb49e4), owner: <N/A>
[  5026][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  5034][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_ADD_CHAR_EVT
[  5044][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: CreateEvt (0x3fcb4ca8), owner: executeCreate
[  5054][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  5054][V][FreeRTOS.cpp:73] wait(): << wait: Semaphore released: name: CreateEvt (0x3fcb4ca8), owner: <N/A>
[  5[0 7 15]0[7V1]][[BVL]E[SBeLrEvCehra.rcapcpt:e2r7i5s]t ihca.ncdplpe:G1A1T1T]S eerxveecruEtveeCnrte(a)t:e (<)<:  h<a<n delxeeGcAteCeevtrE
ent
[  5084][V][FreeRTOS.cpp:179] take(): Semaphore taking: name: StartEvt (0x3fcf7f2c), owner: <N/A> for start
[  5093][V][FreeRTOS.cpp:188] take(): Semaphore taken:  name: StartEvt (0x3fcf7f2c), owner: start
[  5102][V][FreeRTOS.cpp:59] wait(): >> wait: Semaphore waiting: name: StartEvt (0x3fcf7f2c), owner: start for start
[  5103][D][BLEDevice.cpp:96] gattServerEventHandler(): gattServerEventHandler [esp_gatt_if: 3] ... ESP_GATTS_START_EVT
[  5123][V][BLEUtils.cpp:1434] dumpGattServerEvent(): GATT ServerEvent: ESP_GATTS_START_EVT
[  5131][V][BLEUtils.cpp:1572] dumpGattServerEvent(): [status: ESP_GATT_OK, service_handle: 0x28]
[  5140][V][BLEServer.cpp:137] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_START_EVT
[  5149][V][FreeRTOS.cpp:136] give(): Semaphore giving: name: StartEvt (0x3fcf7f2c), owner: start
[  5158][V][BLECharacteristic.cpp:191] handleGATTServerE[v e n5t1(5)8:] [>V>] [hFarnedelReTGOAST.TcSpepr:v7e3r]E vweanitt:( )E:S P_<ATai_:TSRm_pVTr
 released: name: StartEvt (0x3fcf7f2c), owner: <N/A>
[  5175][V][BLEServic[e . c5p1p7:51]5[3V]] [sBtLaErCth(a)r:a c<t<e rsitsatritc(.)cp
p
:444] handleGATTServerEvent(): << handleGATTServerEvent
[  5188][V][BLECharacteristic.cpp:191] [h a n5d1l8e8G]A[TIT]S[eBrLvEeDreEvviecnet.(c)p:p :>5>5 3h]a ngdelteAGdAvTeTrSteirsvienrgE(ventc eSt_ AdvSrSiAin_E
T
[  520[2 ] [5D2]0[2BLEDevice].[cVp]p[:B5L5E5C]h agreatcAtdevreirsttiisci.ncgp(p)::4 4g4e]t  haadnvdelretGiAsTiTnSge
r
verEvent(): << handleGATTServerEvent
[  5215][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_START_EV[T 

5215][V][BLEDevice.cpp:560] startAdvertising(): >> startAdvertising
[  5231[] [ D5]2[3B1L]E[DVe]v[iBcLeE.Cchpapr:a5c5t5e]r igsettiAcd.vceprpt:i4s4i4n]g (h)a:n dgleetG AaTdTvSeerrtviesriEnvge
n
t(): << handleGATTServerEvent
[  5245][V][BL[E C h5a2r4a5c]t[eVr]i[sBtLiEcA.dcvpepr:t1i9s1i]n gh.acnpdpl:e2G1A6T]T Ssetravretr(E)v:e n>t>( )s:t a>r>t :h acnudsltGmTdveavar v, tu tSPSGaTRe_poAReDEtT:
0
[  5260][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  5260][D][BLEAdvertising.cpp:233] start(): - advertising service: 4fafc201-1fb5-459e-8fcc-c5c9c331914b
[  5277][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_START_EVT
[  5277][V][BLEAdvertising.cpp:284] start(): << start
[  [5 2 9522]9[2V]][[VB]L[EBCLhEaDreavcitceer.icsptpi:c5.6c2p]p :s4t4a4r]t AhdavnedrlteiGsAiTnTgS(e)r:v e<r<E vsetnatr(t)A:d v<e<rtihing
GATTServerEvent
Characteristic defined! Now you can read it in your phone![ 
 5305][V][BLECharacteristic.cpp:191] handleGAT=T=S=e=r=v=e=r=E=v=e=n A)t r>ShtnplSGaTtS=r=e==v=n== 
SP_GATTS_START_EVT
[  5321][V][BLECharacteristic.cpp:444] handleGATTServerEvenItN(T)E:R N<A<L  hMaenmdolreyG AITnTfSoe:r
v
erEvent
[  5370][V][BLEC h aArlalcotceartiesdt iBcy.tcepsp : 4 4:4 ]   h1a0n3d2l7e6G ABT T(S e1r0v0e.r9E vKeBn)t
(
): << handleGATTServerEvent
  Minimum Fr[e e  5B3y8t2e]s[:V ] [ B2L2E1C4h2a8r aBc t(e r2i1s6t.i2c .KcBp)p
:
191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_START_EVT
  L[a r g5e3s9t6 ]F[rVe]e[ BBLlEoCchka:r a c t2e1r2i9s8t0i cB. c(p p2:0484.40]  KhBa)n
d
leGATTServerEvent(): << handleGATTServerEvent
------------------------------------------
[  5407][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_START_EVT
GPIO Info:
[  5421][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
------------------------------------------
[  5430][V][BLEServer.cpp:275] handleGATTServerEvent(): << handleGATTServerEvent
  GPIO : BUS_TYPE[bus/unit][chan]
  --------------------------------------  
[  5445][V][BLEUtils.cpp:967] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT
    43 : [  5457][V][BLEUtils.cpp:975] dumpGapEvent(): [status: 0]
UART_TX[  5463][D][BLEDevice.cpp:555] getAdvertising(): get advertising
[0][  5469][D][BLEAdvertising.cpp:529] handleGAPEvent(): handleGAPEvent [event no: 0]

[  5477][V][BLEUtils.cpp:967] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_RSP_DATA_SET_COMPLETE_EVT
    44 : [  5487][V][BLEUtils.cpp:1127] dumpGapEvent(): [status: 0]
UART_RX[  5493][D][BLEDevice.cpp:555] getAdvertising(): get advertising
[0][  5499][D][BLEAdvertising.cpp:529] handleGAPEvent(): handleGAPEvent [event no: 1]

[  5507][V][BLEUtils.cpp:967] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_ADV_START_COMPLETE_EVT
============ After Setup End =============
[  7713][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_CONNECT_EVT
[  7722][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  7730][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_CONNECT_EVT
[  7740][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  7748][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_CONNECT_EVT
[  7758][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  7766][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_CONNECT_EVT
[  7776][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  7784][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_CONNECT_EVT
[  7793][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  7801][V][BLEServer.cpp:275] handleGATTServerEvent(): << handleGATTServerEvent
[  7809][V][BLEUtils.cpp:967] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SET_PKT_LENGTH_COMPLETE_EVT
[  7818][V][BLEUtils.cpp:1187] dumpGapEvent(): *** dumpGapEvent: Logger not coded ***
[  7826][D][BLEDevice.cpp:555] getAdvertising(): get advertising
[  7832][D][BLEAdvertising.cpp:529] handleGAPEvent(): handleGAPEvent [event no: 21]
[  7884][V][BLEUtils.cpp:1659] gapEventToString(): gapEventToString: Unknown event type 55 0x37
[  7884][V][BLEUtils.cpp:967] dumpGapEvent(): Received a GAP event: Unknown event type
[  7900][V][BLEUtils.cpp:1187] dumpGapEvent(): *** dumpGapEvent: Logger not coded ***
[  7908][D][BLEDevice.cpp:555] getAdvertising(): get advertising
[  7913][D][BLEAdvertising.cpp:529] handleGAPEvent(): handleGAPEvent [event no: 55]
[  7921][D][BLEDevice.cpp:96] gattServerEventHandler(): gattServerEventHandler [esp_gatt_if: 3] ... ESP_GATTS_MTU_EVT
[  7932][V][BLEUtils.cpp:1434] dumpGattServerEvent(): GATT ServerEvent: ESP_GATTS_MTU_EVT
[  7940][V][BLEUtils.cpp:1540] dumpGattServerEvent(): [conn_id: 0, mtu: 517]
[  7947][V][BLEServer.cpp:137] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_MTU_EVT
[  7955][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_MTU_EVT
[  7965][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  7973][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_MTU_EVT
[  7982][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  7991][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_MTU_EVT
[  8000][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  8008][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_MTU_EVT
[  8018][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  8025][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_MTU_EVT
[  8036][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  8044][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_MTU_EVT
[  8053][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  8061][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_MTU_EVT
[  8071][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  8079][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_MTU_EVT
[  8088][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  8096][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_MTU_EVT
[  8106][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  8114][V][BLECharacteristic.cpp:191] handleGATTServerEvent(): >> handleGATTServerEvent: ESP_GATTS_MTU_EVT
[  8123][V][BLECharacteristic.cpp:444] handleGATTServerEvent(): << handleGATTServerEvent
[  8131][V][BLEServer.cpp:275] handleGATTServerEvent(): << handleGATTServerEvent

Other Steps to Reproduce

  1. Flash the sketch
  2. Use nRF Connect app to discover BLE devices. Click connect and see the characteristics. Not all are visible.

I have checked existing issues, online documentation and the Troubleshooting Guide

SuGlider commented 2 months ago

This can be due to 2 possible causes: 1) A limitation from the ESP32 Bluedroid BLE stack configuration. 2) A limitation from the nRF application.

Questions:

kakopappa commented 2 months ago

Hello @SuGlider Thanks for taking a look.

flashed the same code on ESP32-C3. I am seeing the same issue.

image

I wrote the same code using NimBLE library. nRF Connect apps shows 10 characteristics. so I think it's likely something wrong with the ESP32 BLE library

image


#include <NimBLEDevice.h>

static NimBLEServer* pServer;

#define CHARACTERISTIC_UUID_1 "beb5483e-36e1-0001-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_2 "beb5483e-36e1-0002-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_3 "beb5483e-36e1-0003-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_4 "beb5483e-36e1-0004-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_5 "beb5483e-36e1-0005-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_6 "beb5483e-36e1-0006-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_7 "beb5483e-36e1-0007-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_8 "beb5483e-36e1-0008-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_9 "beb5483e-36e1-0009-b7f5-ea07361b26a8"
#define CHARACTERISTIC_UUID_10 "beb5483e-36e1-0010-b7f5-ea07361b26a8"

void setup() {
    Serial.begin(115200);
    Serial.println("Starting NimBLE Server");

    /** sets device name */
    NimBLEDevice::init("PROV-123456");
    NimBLEDevice::setPower(ESP_PWR_LVL_P9);
    NimBLEDevice::setSecurityAuth(/*BLE_SM_PAIR_AUTHREQ_BOND | BLE_SM_PAIR_AUTHREQ_MITM |*/ BLE_SM_PAIR_AUTHREQ_SC);

    pServer = NimBLEDevice::createServer();

    NimBLEService* pDeadService = pServer->createService("DEAD");
    NimBLECharacteristic* pBeefCharacteristic1 = pDeadService->createCharacteristic(CHARACTERISTIC_UUID_1, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE);
    NimBLECharacteristic* pBeefCharacteristic2 = pDeadService->createCharacteristic(CHARACTERISTIC_UUID_2, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE);
    NimBLECharacteristic* pBeefCharacteristic3 = pDeadService->createCharacteristic(CHARACTERISTIC_UUID_3, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE);
    NimBLECharacteristic* pBeefCharacteristic4 = pDeadService->createCharacteristic(CHARACTERISTIC_UUID_4, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE);
    NimBLECharacteristic* pBeefCharacteristic5 = pDeadService->createCharacteristic(CHARACTERISTIC_UUID_5, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE);
    NimBLECharacteristic* pBeefCharacteristic6 = pDeadService->createCharacteristic(CHARACTERISTIC_UUID_6, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE);
    NimBLECharacteristic* pBeefCharacteristic7 = pDeadService->createCharacteristic(CHARACTERISTIC_UUID_7, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE);
    NimBLECharacteristic* pBeefCharacteristic8 = pDeadService->createCharacteristic(CHARACTERISTIC_UUID_8, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE);
    NimBLECharacteristic* pBeefCharacteristic9 = pDeadService->createCharacteristic(CHARACTERISTIC_UUID_9, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE);
    NimBLECharacteristic* pBeefCharacteristic10 = pDeadService->createCharacteristic(CHARACTERISTIC_UUID_10, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE);

    /** Start the services when finished creating all Characteristics and Descriptors */
    pDeadService->start(); 

    NimBLEAdvertising* pAdvertising = NimBLEDevice::getAdvertising();
    pAdvertising->addServiceUUID(pDeadService->getUUID());
    pAdvertising->setScanResponse(true);
    pAdvertising->start();

    Serial.println("Advertising Started");
}

void loop() {
  delay(2000);
}
SuGlider commented 2 months ago

Thanks for the information. I'll take a look into Bluedroid configuration and into ESP32 Arduino BLE Library.