-
Notifications
You must be signed in to change notification settings - Fork 710
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
BLEAdvertising stop doesn't stop advertising #797
Comments
Are you sure you run new scan, or is esp32 visible from old BLE scan? |
I think this is because start() is called in ESP_GAP_BLE_ADV_STOP_COMPLETE_EVT in cpp_utils/BLEAdvertising.cpp Line 496. |
I have same issue. |
any known workaround for this? |
Facing the same problem, I start BLE advertising and after 300 ms I try to stop with |
Fixed already with espressif/arduino-esp32#3034 |
I commected Still it is discovering to my PC i added stop in void onDisconnect(BLEServer* pServer) function and commented start() function but still advertising to my PC so what i have to do please help me on this to stop advertising.
|
If you comment out this line (start()) and use advertising->stop(), then esp32 should stop advertising. |
I added stop() function like below ,i am putting my client in sleep mode so stopping the advertising now and LOG(ESP_LOGI(LOG_TAG, "STOP advertising"); )is printing continuously,how can i reconnect automatically when client is wakes from sleep. case ESP_GAP_BLE_ADV_STOP_COMPLETE_EVT: { |
In older versions of Arduino framework for ESP32 at BLEServer.cpp check the The recommended solution is to update your Arduino Framework. In the current 1.0.6 version it is fixed, or you can just comment this line out. |
I have a simple application that I want to be able to start and stop advertising so that other devices are prevented from connecting when I don't want them too. This needs to be turned on and off at runtime.
Here is my startup code:
This works great and my service advertises and I am able to connect with it and process things.
Then when I want my device to become unavailable I do this:
It calls it and doesn't give any errors or exceptions, but my device is still visible to my iPhone and I can still connect to it.
How do I disable advertising and connecting during runtime?
The text was updated successfully, but these errors were encountered: