         self.peripheral = peripheral
         self.peripheral!.delegate = self
         peripheral.discoverServices(nil)
+    }
+
+    func sendConfig(_ config: Config) {
+        print("sending \(PanoPeripheral.config.pack())")
+        if let characteristic = configChar {
+            peripheral?.writeValue(config.pack(), for: characteristic, type: .withoutResponse)
+        }
+    }
+
+    func readStatus() -> Status {
+        return PanoPeripheral.status
     }
 
     // Mark: - CBPeripheralDelegate

            let thisCharacteristic = characteristic as CBCharacteristic
            print("         ", thisCharacteristic)
            if thisCharacteristic.uuid == PanoPeripheral.statusCharUUID {
                peripheral.setNotifyValue(true, for: thisCharacteristic)
                peripheral.readValue(for: thisCharacteristic)
            }
            if thisCharacteristic.uuid == PanoPeripheral.configCharUUID {
                print("sending \(PanoPeripheral.config.pack())")
                peripheral.writeValue(PanoPeripheral.config.pack(), for: thisCharacteristic, type: .withoutResponse)
            }
            //peripheral.discoverDescriptors(for: thisCharacteristic)
        }

    static let configCharUUID = CBUUID(string: "0001")
    static let statusCharUUID = CBUUID(string: "0002")
    static let cmdCharUUID = CBUUID(string: "0003")
    var statusChar: CBCharacteristic?
    var configChar: CBCharacteristic?
    var cmdChar: CBCharacteristic?

    var peripheral: CBPeripheral?

