From 64075b96e0954fb1cce311fbdb7bd8f6766f8dd7 Mon Sep 17 00:00:00 2001 From: Alsey Coleman Miller Date: Mon, 25 Nov 2024 22:06:29 -0500 Subject: [PATCH] Fix characteristic write --- Sources/NimBLE/GATTServer.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/NimBLE/GATTServer.swift b/Sources/NimBLE/GATTServer.swift index 781db6c..1fb85c3 100644 --- a/Sources/NimBLE/GATTServer.swift +++ b/Sources/NimBLE/GATTServer.swift @@ -337,6 +337,9 @@ internal extension NimBLE.Context { if let error = gattServer.willWrite?(request) { throw error } + // update value + let isValidAttribute = gattServer.didWriteCharacteristic(newValue, for: attributeHandle) + assert(isValidAttribute) // confirmation let confirmation = GATTWriteConfirmation( central: central,