We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b961c98 commit 25d89a7Copy full SHA for 25d89a7
libraries/BLE/examples/BLE_iBeacon/BLE_iBeacon.ino
@@ -38,6 +38,12 @@ class MyServerCallbacks: public BLEServerCallbacks {
38
void onDisconnect(BLEServer* pServer) {
39
deviceConnected = false;
40
Serial.println("deviceConnected = false");
41
+
42
+ // Restart advertising to be visible and connectable again
43
+ BLEAdvertising* pAdvertising;
44
+ pAdvertising = pServer->getAdvertising();
45
+ pAdvertising->start();
46
+ Serial.println("iBeacon advertising restarted");
47
}
48
};
49
0 commit comments