     {
         log("Did connect")
         if peripheral.services != nil {
-            log("Skipping service discovery for: \(peripheral.name)")
+            log("Skipping service discovery for: \(peripheral.name!)")
             peripheral(peripheral, didDiscoverServices: nil)
             return
         }
         
-        log("Start service discovery: \(peripheral.name)")
+        log("Start service discovery: \(peripheral.name!)")
         peripheral.discoverServices([UARTPeripheral.uartServiceUUID(), UARTPeripheral.deviceInformationServiceUUID()])
     }
     

            }
            
            if autoConnect {
                connect()
            }
        }
    
        //optional func centralManager(central: CBCentralManager!, willRestoreState dict: [NSObject : AnyObject]!)
        //optional func centralManager(central: CBCentralManager!, didRetrievePeripherals peripherals: [AnyObject]!)

public class NRFManager:NSObject, CBCentralManagerDelegate, UARTPeripheralDelegate {
    

    private var arduinoToConnect: String?
    //Private Properties
    private var bluetoothManager:CBCentralManager!
    private var currentPeripheral: UARTPeripheral? {
