                      shouldContinueScanning: () -> (Bool),
                      foundDevice: @escaping (ScanData) -> ()) throws {
         
-        try hostController.lowEnergyScan(filterDuplicates: filterDuplicates, shouldContinue: shouldContinueScanning) { (report) in
+        self.log?("Scanning...")
+        
+        try hostController.lowEnergyScan(filterDuplicates: filterDuplicates, shouldContinue: shouldContinueScanning) { [unowned self] (report) in
             
             #if os(Linux)
             let peripheral = Peripheral(identifier: report.address)

        fatalError()
    }
    
    public func disconnect(peripheral: Peripheral) {
        
        fatalError()
    }
    
    public func disconnectAll() {
        
        fatalError()
    }
}

#endif

                                    rssi: Double(report.rssi.rawValue),
                                    advertisementData: advertisement)
            
            self.scanData[peripheral] = report
            
            foundDevice(scanData)
        }
    }
    
    public func connect(to peripheral: Peripheral, timeout: TimeInterval = 30) throws {
        
        guard let advertisementData = scanData[peripheral]
            else { throw CentralError.unknownPeripheral(peripheral) }
        
        let socket = try async(timeout: timeout) {
            
            try L2CAPSocket.lowEnergyClient(
                destination: (address: advertisementData.address,
                              type: AddressType(lowEnergy: advertisementData.addressType)
                )
            )
        }
        
        // keep connection open and store for future use
        self.connections[peripheral] = socket
    }
    
    public func disconnect(peripheral: Peripheral) {
        
        self.connections[peripheral] = nil
    }
    
    public func disconnectAll() {
        
        self.connections.removeAll(keepingCapacity: true)
    }
    
    public func discoverServices(_ services: [BluetoothUUID] = [],
                                 for peripheral: Peripheral,
                                 timeout: TimeInterval = 30) throws -> [Service] {
        
        guard let socket = connections[peripheral]
            else { throw CentralError.unknownPeripheral(peripheral) }
        
        
    }
    
    public func discoverCharacteristics(_ characteristics: [BluetoothUUID] = [],
                                        for service: BluetoothUUID,
                                        peripheral: Peripheral,
                                        timeout: TimeInterval = 30) throws -> [Characteristic] {
        
        
    }
    
    public func readValue(for characteristic: BluetoothUUID, service: BluetoothUUID, peripheral: Peripheral, timeout: TimeInterval = 30) throws -> Data {
