 
 extension PairingService: CBCentralManagerDelegate {
     public func centralManagerDidUpdateState(_ central: CBCentralManager) {
-        if centralManager.isScanning == false, status == .scanning, centralManager.state == .poweredOn {
-            centralManager.scanForPeripherals(withServices: [serviceId], options: nil)
+        if centralManager.isScanning == false, isPairing, centralManager.state == .poweredOn {
+            startPairing()
         }
     }
     


extension PairingService: CBPeripheralManagerDelegate {
    public func peripheralManagerDidUpdateState(_ peripheral: CBPeripheralManager) {
        if peripheralManager.isAdvertising == false, status == .scanning, peripheralManager.state == .poweredOn {
            peripheralManager.startAdvertising(nil)
        }
    }
    
    public func peripheralManagerIsReady(toUpdateSubscribers peripheral: CBPeripheralManager) {

        {
            peripheral.discoverCharacteristics([pairingStatusCharacteristic.uuid], for: service)
        }
    }
    
    public func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) {
