From 0dbf5aae0ec03808c6e001218dded5ba2ce1e402 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 15 Jun 2023 16:45:00 +0200 Subject: [PATCH] re-advertise on disconnect --- main/ble.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/ble.c b/main/ble.c index 714840b..4e5e7c8 100644 --- a/main/ble.c +++ b/main/ble.c @@ -225,6 +225,9 @@ static int ble_gap_event(struct ble_gap_event *event, void* arg){ else conn_handle = event->connect.conn_handle; break; + case BLE_GAP_EVENT_DISCONNECT: + ble_advertise(); + break; case BLE_GAP_EVENT_SUBSCRIBE: ESP_LOGI(TAG, "Subscribe %d", event->subscribe.attr_handle); for(int i = 0; i < INPUTS_NUM; i++){