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

BLE Stop advertising after 5-7 days of running #7

Open
vtomanov opened this issue Jul 18, 2020 · 3 comments
Open

BLE Stop advertising after 5-7 days of running #7

vtomanov opened this issue Jul 18, 2020 · 3 comments

Comments

@vtomanov
Copy link

Not sure if this is the right place to ask , but cannot find better

I use ESP32 BLE for configuration, updated, log etc. on my device , but from time to time after leaving the device running for days it stops advertising itself to make sure that the problem is not in bad disconnection/connection etc. I put a code to break connections longer then 30m in and re advertising after 30 min - but it seems this do not help ... the esp32 and all other tasks are working fine juts the BL|E stop advertising

for breaking a connection that stay too long I use : bleServer->disconnect(bleServer->getConnId()); // force disconnect
for re advertising I use : bleServer->startAdvertising(); // restart advertising

@chegewara
Copy link
Owner

Try to add code that checks free heap and there is custom gap handler which you can add to see low level events, its helpful to debug.
You an find in Kolban's repo and arduino how to add custom handlers.

@vtomanov
Copy link
Author

already there the heap check - plenty of heap...

my guess is that it is something with RTOS - as only the BLE lib uses RTOS...

re: custom handles - to what ? the BLE advertizing or ?

@chegewara
Copy link
Owner

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