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

How to stop a service? #433

Closed
AndrewMagpie opened this issue Aug 10, 2022 · 2 comments
Closed

How to stop a service? #433

AndrewMagpie opened this issue Aug 10, 2022 · 2 comments

Comments

@AndrewMagpie
Copy link

AndrewMagpie commented Aug 10, 2022

There is a bool NimBLEService::start()
But no bool NimBLEService::stop(), unlike the nkolban version.

How does one stop a service?

@h2zero
Copy link
Owner

h2zero commented Aug 10, 2022

The NimBLE stack does not support stopping a service the way the bluedroid stack does. Instead it can "hide" it or delete it completely. For this to work advertising must be stopped first.

The function to do this is in NimBLEServer:
void NimBLEServer::removeService(NimBLEService* service, bool deleteSvc = false);

@sdetweil
Copy link

sdetweil commented May 10, 2023

@h2zero except this appears not to work.. see #541

@h2zero h2zero closed this as completed Jun 4, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants