esp-nimble-cpp
esp-nimble-cpp copied to clipboard
ESP3232S3 Crash when service not started, but is advertised.
When a service isn't started but is advertised a crash occurs.
#define SERVICE_UUID_128 "ca65f688-5a42-4e4a-b19f-e59e70758573"
BLEServer* pServer = BLEDevice::createServer();
BLEService * pService128 = pServer->createService(SERVICE_UUID_128);
//pService128->start(); //if you dont start a service, a crash occurs.
BLEAdvertising* pAdvertising = BLEDevice::getAdvertising();
pAdvertising->setScanResponse(true);
pAdvertising->setAppearance(0x0140); //Appearance=Display
if (pService128)
pAdvertising->addServiceUUID(pService128->getUUID());
bIsAdvertising = pAdvertising->start(); //KABOOM
Is this expected behaviour?
Hmm, can't say I've ever tried this or seen this done before but it should certainly not crash. Thanks for reporting, I will look into it.