         init?(attribute: Attribute) {
             
             guard attribute.uuid == type(of: self).uuid,
-                attribute.value.count == type(of: self).length
+                let length = Length(rawValue: attribute.value.count)
                 else { return nil }
             
             assert(attribute.permissions == [.read], "Invalid attribute permissions")
             
             let serviceHandle = UInt16(littleEndian: UInt16(bytes: (attribute.value[0], attribute.value[1])))
             let endGroupHandle = UInt16(littleEndian: UInt16(bytes: (attribute.value[2], attribute.value[3])))
-            let uuid = BluetoothUUID(littleEndian: BluetoothUUID(data: Data(attribute.value[4 ..< 20]))!)
+            let uuid = BluetoothUUID(littleEndian: BluetoothUUID(data: Data(attribute.value[4 ..< length.rawValue]))!)
             
             self.serviceHandle = serviceHandle
             self.endGroupHandle = endGroupHandle

            var service = GATT.Service(uuid: serviceAttribute.uuid,
                                       primary: serviceAttribute.isPrimary)
            
            var characteristicValueHandles = Set<UInt16>()
            
            for attribute in attributes {
                
                if attribute.uuid == .include {
                    

                             value: value,
                             permissions: [.read])
        }
        
        enum Length: Int {
            
            case bit16 = 6
            case bit128 = 20
        }
    }
    
    internal struct CharacteristicDeclarationAttribute {
        
        static let uuid: BluetoothUUID = .characteristic
        
        /// Characteristic UUID
        var uuid: BluetoothUUID
