esp32-ota-with-ble-setup icon indicating copy to clipboard operation
esp32-ota-with-ble-setup copied to clipboard

BLE Stop advertising after 5-7 days of running

Open vtomanov opened this issue 3 years ago • 3 comments

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

vtomanov avatar Jul 18 '20 09:07 vtomanov

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.

chegewara avatar Jul 18 '20 09:07 chegewara

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 ?

vtomanov avatar Jul 18 '20 09:07 vtomanov

https://github.com/nkolban/esp32-snippets/issues/735#issuecomment-444007131

chegewara avatar Jul 18 '20 09:07 chegewara