BLE Not starting advertising after disconnect
Posted: Tue Apr 21, 2020 1:43 pm
I am currently using release/v3.3 of the esp-idf and am running the ESP32 WROOM-32D as a GATT Server. When a client connects to the server I see all the expected events. Now when the client disconnects, I see the disconnect event but the server does not start advertising again. My code was essentially built upon the GATTS_DEMO from the idf.
I have added code to the GATTS_DISCONNECT_EVT that issues the gap_start_advertising() command, even though I don't feel it should be necessary. The command returns an ESP_OK however advertising does not seem to be restarting as the device is not visible in any BT scanning app I run.
I have seen issues like this reported in past versions of the idf, however, there was no real solution provided. I am using release/V3.3 as this is mentioned to be the latest stable version and I am targeting the ESP32 for a commercial product.
Any help would be greatly appreciated.
I have added code to the GATTS_DISCONNECT_EVT that issues the gap_start_advertising() command, even though I don't feel it should be necessary. The command returns an ESP_OK however advertising does not seem to be restarting as the device is not visible in any BT scanning app I run.
I have seen issues like this reported in past versions of the idf, however, there was no real solution provided. I am using release/V3.3 as this is mentioned to be the latest stable version and I am targeting the ESP32 for a commercial product.
Any help would be greatly appreciated.