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 prevent remote-control from disconnecting after 2 minutes #1177

Open
shooshx opened this issue Nov 11, 2023 · 0 comments
Open

How to prevent remote-control from disconnecting after 2 minutes #1177

shooshx opened this issue Nov 11, 2023 · 0 comments

Comments

@shooshx
Copy link

shooshx commented Nov 11, 2023

I have a cheap BLE remote-control from aliexpress and I was able to modify the BLE_client example to find it when its advertising and get notifications from it.
The only problem I have left is that after 2 minutes from the last button press it disconnects and doesn't advertise any more so I can't reconnect.

What's the standard way to prevent this from happening?
When I'm pairing this remote to a windows machine it stays active indefinitely and is operable even after hours or being idle.
How does it do that?

I noticed that there is a .updateConnParams() method that has a timeout parameter, but that's a server method, not client. Is there a way to affect these parameters from the client?
Or maybe there's a way to ping it just before 2 minutes are up so keeps the connection alive?

A related question - Even if I turn the Windows machine off and on again after some hours, it still seem to remain "paired" and doesn't need to go through the advertisment procedure again. How can I replicate this with the ESP32?

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

1 participant