From e10ae20bb6592f11e38a08656f9e7caf5bef2054 Mon Sep 17 00:00:00 2001 From: Fang Jin Date: Mon, 30 Oct 2023 12:31:30 -0400 Subject: [PATCH] start advertising again on disconnect --- BleConnectionStatus.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BleConnectionStatus.cpp b/BleConnectionStatus.cpp index f01183b..943ba22 100644 --- a/BleConnectionStatus.cpp +++ b/BleConnectionStatus.cpp @@ -15,4 +15,7 @@ void BleConnectionStatus::onDisconnect(BLEServer* pServer) this->connected = false; BLE2902* desc = (BLE2902*)this->inputMouse->getDescriptorByUUID(BLEUUID((uint16_t)0x2902)); desc->setNotifications(false); + + BLEAdvertising *pAdvertising = pServer->getAdvertising(); + pAdvertising->start(); }