                                                   start: start,
                                                   end: end,
                                                   type: serviceType,
-                                                  foundData: [],
                                                   completion: completion)
         
         if let uuid = uuid {

                                                           start: service.handle,
                                                           end: service.end,
                                                           type: attributeType,
                                                           foundData: [],
                                                           completion: completion)
        
        let pdu = ATTReadByTypeRequest(startHandle: service.handle,

                                               endHandle: operation.end,
                                               attributeType: operation.type.uuid)
                
                send(pdu) { [unowned self] in self.readByType($0, operation: operation) }
                
            } else {
                
                // end of service
                operation.success()
            }
        }
    }
    
    /// Read Characteristic Value Response
    private func readCharacteristicValueResponse(_ response: ATTResponse<ATTReadResponse>, operation: ReadOperation) {
        
        // The Read Response only contains a Characteristic Value that is less than or equal to (ATT_MTU – 1) octets in length.
        // If the Characteristic Value is greater than (ATT_MTU – 1) octets in length, the Read Long Characteristic Value procedure
        // may be used if the rest of the Characteristic Value is required.
        
        switch response {
            
        case let .error(error):
            
            operation.error(error)
            
        case let .value(pdu):
            
            operation.data = pdu.attributeValue
            
            // short value
            if pdu.attributeValue.count < (self.connection.maximumTransmissionUnit - 1) {
                
                operation.success()
                
            } else {
                
                // read blob
                readLongCharacteristicValue(operation)
            }
        }
    }
    
    /// Read Blob Response
    private func readBlob(_ response: ATTResponse<ATTReadBlobResponse>, operation: ReadOperation) {
        
        // For each Read Blob Request a Read Blob Response is received with a portion of the Characteristic Value contained in the Part Attribute Value parameter.
        
        switch response {
            
        case let .error(error):
            
            operation.error(error)
            
        case let .value(pdu):
            
            operation.data += pdu.partAttributeValue
            
            // short value
            if pdu.partAttributeValue.count < (self.connection.maximumTransmissionUnit - 1) {
                
                operation.success()
                
            } else {
                
                // read blob
                readLongCharacteristicValue(operation)
            }
        }
    }
