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

Connection only on client request after disconnecting? #635

Open
Pasikav opened this issue Jan 26, 2024 · 2 comments
Open

Connection only on client request after disconnecting? #635

Pasikav opened this issue Jan 26, 2024 · 2 comments

Comments

@Pasikav
Copy link

Pasikav commented Jan 26, 2024

Its more of a question than issue!

I have ESP32 project nimBLE. Basically my device is BLE Keyboard. One of the functionality is to disconnect from Server side (esp32).

I made it to the point that I disconnect device using pServer->disconnect(this->connHandle); and then clear ble store using ble_store_clear(). From the perspective of server it works fine, there is no connection but client side (windows computer) is still trying to connect, so there is no clear indication that there is no connection and also while debugging i noticed it triggers onConnect event.

What i would like to achieve is something alike pairing mode in bluetooth headset when if you set it on pairing mode the connection is made only on client request. Is it even possible using BLE?

@h2zero
Copy link
Owner

h2zero commented Jan 26, 2024

You're getting reconnected because the advertising was automatically started after disconnect. You'll want to change that setting to prevent that.

@Pasikav
Copy link
Author

Pasikav commented Jan 28, 2024

But if i don't start advertising wouldn't my device be invisible for other clients or my understanding of advertising is wrong?

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

2 participants