     /// Peripheral and Central Role supported, Central Role preferred for connection establishment
     case bothSupportedCentralPreferred = 0x03
     
+    /// Bluetooth LE Role (e.g. Central or peripheral)
+    public enum Role: UInt8, BitMaskOption { // not part of BT spec
+        
+        case central
+        case peripheral
+        
+        public static var all: Set<Role> = [.central, .peripheral]
+    }
+    
+    public var supported: BitMaskOptionSet<Role> {
+        
+        switch self {
+        case .onlyPeripheralRoleSupported:
+            return [.peripheral]
+        case .onlyCentralRoleSupported:
+            return [.central]
+        case .bothSupportedPeripheralPreferred,
+            .bothSupportedCentralPreferred:
+            return [.central, .peripheral]
+        }
+    }
+    
+    public var preferred: Role {
+        
+        switch self {
+        case .onlyPeripheralRoleSupported,
+            .bothSupportedPeripheralPreferred:
+            return .peripheral
+        case .onlyCentralRoleSupported,
+             .bothSupportedCentralPreferred:
+            return .central
+        }
+    }
 }
 
 /**

    
    public let address: Address
    
    public let type: GAPLEBluetoothDeviceAddressType
    
    public init(address: Address, type: GAPLEBluetoothDeviceAddressType) {
        
        self.address = address
        self.type = type

    
}

/// GAP LE Role Type
public enum GAPLERoleType: UInt8 {
    
    /// Only Peripheral Role supported
