      
      Uses the appropriate procecedure to write the characteristic value.
      */
-    public func writeCharacteristic(_ characteristic: Characteristic,
-                                    data: Data,
-                                    reliableWrites: Bool = true,
-                                    completion: ((GATTClientResponse<()>) -> ())?) {
-        
-        writeAttribute(characteristic.handle.value,
-                       data: data,
-                       reliableWrites: reliableWrites,
-                       completion: completion)
+    public func writeCharacteristic(
+        _ characteristic: Characteristic,
+        data: Data,
+        reliableWrites: Bool = true
+    ) async throws {
+        try await writeAttribute(
+            characteristic.handle.value,
+            data: data,
+            reliableWrites: reliableWrites,
+            completion: completion
+        )
     }
     
     /**

    ///
    /// - Note: A client should not use this request for attributes when the Set Of Values parameter could be `(ATT_MTU–1)`
    /// as it will not be possible to determine if the last attribute value is complete, or if it overflowed.
    public func readCharacteristics(_ characteristics: [Characteristic], completion: @escaping (GATTClientResponse<Data>) -> ()) {
        
        // The Attribute Protocol Read Multiple Request is used with the Set Of Handles parameter set to the Characteristic Value Handles.
        // The Read Multiple Response returns the Characteristic Values in the Set Of Values parameter.
        
        let handles = characteristics.map { $0.handle.value }
        
        guard let pdu = ATTReadMultipleRequest(handles: handles)
            else { fatalError("Must provide at least 2 characteristics") }
        
        let operation = ReadMultipleOperation(characteristics: characteristics, completion: completion)
        
        send(pdu) { [unowned self] in
            self.readMultipleResponse($0, operation: operation)
        }
    }
    

        
        @inline(__always)
        func success() {
            completion(.success(foundDescriptors))
        }
        
        @inline(__always)
        func failure(_ responseError: ATTErrorResponse) {
            if responseError.error == .attributeNotFound {
                success()
            } else {
                completion(.failure(.errorResponse(responseError)))
            }
        }
    }
