         if enabled == 0 {
             manager.stopScan()
         } else {
-            //manager.scanForPeripherals(withServices: [CBUUID(string: "FEF1")], options: nil)
+            manager.scanForPeripherals(withServices: [CBUUID(string: "FEF1")], options: nil)
         }
     }
     

    }
    
    func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) {
        print(peripheral.name,advertisementData,RSSI);
//        let array = advertisementData["kCBAdvDataServiceUUIDs"] as! NSArray
//        for a in array {
//            print(a)//FEF1
//        }
        var enhancedAdvertismentData = advertisementData
        enhancedAdvertismentData[CSR_PERIPHERAL] = peripheral
        meshServiceApi.processMeshAdvert(enhancedAdvertismentData, rssi: RSSI)
        
        peripheral.delegate = self
        cperipheral = peripheral
        central.connect(peripheral, options: [CBConnectPeripheralOptionNotifyOnConnectionKey: true])
    }
    
    func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) {

    func centralManagerDidUpdateState(_ central: CBCentralManager) {
        switch central.state {
        case .poweredOn:
            manager.scanForPeripherals(withServices: [CBUUID(string: "FEF1")], options: nil)
            break
        default:
            break
