mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-12-22 19:10:46 +01:00
Use write with response when writing 0x2902 descriptors.
As per Bluetooth core specification we must write to 0x2902 descriptors with response request. This change ensures the correct procedure is used. Todo: Remove the "response" parameter from related functions.
This commit is contained in:
parent
9e5db157f8
commit
c285052f6d
2 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue