Open kakopappa opened 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:
Hello @SuGlider Thanks for taking a look.
flashed the same code on ESP32-C3. I am seeing the same issue.
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
#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);
}
Thanks for the information. I'll take a look into Bluedroid configuration and into ESP32 Arduino BLE Library.
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.
Sketch
Debug Message
Other Steps to Reproduce
I have checked existing issues, online documentation and the Troubleshooting Guide