diff --git a/src/NimBLERemoteCharacteristic.cpp b/src/NimBLERemoteCharacteristic.cpp index 6cca615..68982f8 100644 --- a/src/NimBLERemoteCharacteristic.cpp +++ b/src/NimBLERemoteCharacteristic.cpp @@ -616,6 +616,7 @@ bool NimBLERemoteCharacteristic::setNotify(uint16_t val, notify_callback notifyC NIMBLE_LOGD(LOG_TAG, "<< setNotify()"); + response = true; // Always write with response as per Bluetooth core specification. return desc->writeValue((uint8_t *)&val, 2, response); } // setNotify diff --git a/src/NimBLERemoteCharacteristic.h b/src/NimBLERemoteCharacteristic.h index 353d832..7042b19 100644 --- a/src/NimBLERemoteCharacteristic.h +++ b/src/NimBLERemoteCharacteristic.h @@ -73,8 +73,8 @@ public: bool subscribe(bool notifications = true, notify_callback notifyCallback = nullptr, - bool response = false); - bool unsubscribe(bool response = false); + bool response = true); + bool unsubscribe(bool response = true); bool registerForNotify(notify_callback notifyCallback, bool notifications = true, bool response = true)