Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP3232S3 Crash when service not started, but is advertised. #99

Open
AndrewMagpie opened this issue Sep 9, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@AndrewMagpie
Copy link

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?

@h2zero
Copy link
Owner

h2zero commented Sep 9, 2022

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.

@h2zero h2zero added the bug Something isn't working label Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants