summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/BLE_notify/BLE_notify.ino2
-rw-r--r--examples/BLE_server/BLE_server.ino6
-rw-r--r--examples/BLE_uart/BLE_uart.ino2
-rw-r--r--examples/BLE_write/BLE_write.ino7
-rw-r--r--library.properties2
5 files changed, 7 insertions, 12 deletions
diff --git a/examples/BLE_notify/BLE_notify.ino b/examples/BLE_notify/BLE_notify.ino
index 44506c2..8d329c2 100644
--- a/examples/BLE_notify/BLE_notify.ino
+++ b/examples/BLE_notify/BLE_notify.ino
@@ -53,7 +53,7 @@ void setup() {
BLEDevice::init("MyESP32");
// Create the BLE Server
- BLEServer *pServer = new BLEServer();
+ BLEServer *pServer = BLEDevice::createServer();
pServer->setCallbacks(new MyServerCallbacks());
// Create the BLE Service
diff --git a/examples/BLE_server/BLE_server.ino b/examples/BLE_server/BLE_server.ino
index 45ebf99..38224a6 100644
--- a/examples/BLE_server/BLE_server.ino
+++ b/examples/BLE_server/BLE_server.ino
@@ -7,8 +7,6 @@
#include <BLEUtils.h>
#include <BLEServer.h>
-BLEDevice ble;
-
// See the following for generating UUIDs:
// https://www.uuidgenerator.net/
@@ -19,8 +17,8 @@ void setup() {
Serial.begin(115200);
Serial.println("Starting BLE work!");
- ble.init("MyESP32");
- BLEServer *pServer = new BLEServer();
+ BLEDevice::init("MyESP32");
+ BLEServer *pServer = BLEDevice::createServer();
BLEService *pService = pServer->createService(SERVICE_UUID);
BLECharacteristic *pCharacteristic = pService->createCharacteristic(
CHARACTERISTIC_UUID,
diff --git a/examples/BLE_uart/BLE_uart.ino b/examples/BLE_uart/BLE_uart.ino
index a8ab2d7..a348a66 100644
--- a/examples/BLE_uart/BLE_uart.ino
+++ b/examples/BLE_uart/BLE_uart.ino
@@ -70,7 +70,7 @@ void setup() {
BLEDevice::init("UART Service");
// Create the BLE Server
- BLEServer *pServer = new BLEServer();
+ BLEServer *pServer = BLEDevice::createServer();
pServer->setCallbacks(new MyServerCallbacks());
// Create the BLE Service
diff --git a/examples/BLE_write/BLE_write.ino b/examples/BLE_write/BLE_write.ino
index ed5ebc6..24a0cd2 100644
--- a/examples/BLE_write/BLE_write.ino
+++ b/examples/BLE_write/BLE_write.ino
@@ -7,8 +7,6 @@
#include <BLEUtils.h>
#include <BLEServer.h>
-BLEDevice ble;
-
// See the following for generating UUIDs:
// https://www.uuidgenerator.net/
@@ -41,9 +39,8 @@ void setup() {
Serial.println("4- Go to CUSTOM CHARACTERISTIC in CUSTOM SERVICE and write something");
Serial.println("5- See the magic =)");
- //ble.begin("MyESP32");
- ble.init("MyESP32");
- BLEServer *pServer = new BLEServer();
+ BLEDevice::init("MyESP32");
+ BLEServer *pServer = BLEDevice::createServer();
BLEService *pService = pServer->createService(SERVICE_UUID);
diff --git a/library.properties b/library.properties
index fdfc673..779706d 100644
--- a/library.properties
+++ b/library.properties
@@ -1,5 +1,5 @@
name=ESP32 BLE Arduino
-version=0.4.4
+version=0.4.5
author=Neil Kolban <kolban1@kolban.com>
maintainer=Neil Kolban <kolban1@kolban.com>
sentence=BLE functions for ESP32