diff --git a/services/bluetooth/service/src/gatt/gatt_client_profile.cpp b/services/bluetooth/service/src/gatt/gatt_client_profile.cpp index 13a00337191beb4babbcef2ef3d8a33181c4e472..c635d69d00f7623335d425441ee7cf364f9d4ce1 100644 --- a/services/bluetooth/service/src/gatt/gatt_client_profile.cpp +++ b/services/bluetooth/service/src/gatt/gatt_client_profile.cpp @@ -598,7 +598,9 @@ void GattClientProfile::WriteWithoutResponse( if (buffer != nullptr) { ATT_WriteCommand(connectHandle, handle, buffer); BufferFree(buffer); - } + pimpl->pClientCallBack_->OnWriteCharacteristicValueEvent(reqId, connectHandle, handle, GATT_SUCCESS); + } else { + pimpl->pClientCallBack_->OnWriteCharacteristicValueEvent(reqId, connectHandle, handle, GATT_FAILURE); } /** * @brief This sub-procedure is used to write a Characteristic Value to a server when the client knows the diff --git a/services/bluetooth/service/src/gatt/gatt_server_profile.cpp b/services/bluetooth/service/src/gatt/gatt_server_profile.cpp index c8051dcf2e379f846f7396d4d0678ca1070d958f..776d345bf10f52687035bf4f74e82af809914d16 100644 --- a/services/bluetooth/service/src/gatt/gatt_server_profile.cpp +++ b/services/bluetooth/service/src/gatt/gatt_server_profile.cpp @@ -2029,9 +2029,11 @@ void GattServerProfile::SendNotification( if (buffer != nullptr) { ATT_HandleValueNotification(connectHandle, handle, buffer); BufferFree(buffer); + pimpl->pServerCallBack_->OnIndicationEvent(connectHandle, handle, GATT_SUCCESS); } } else { LOG_ERROR("%{public}s: GATT_NOTIFICATION_VALUE is invalid", __FUNCTION__); + pimpl->pServerCallBack_->OnIndicationEvent(connectHandle, handle, GATT_FAILURE); } } /**