     
     public func ping() {
         printDebug("Ping")
-        send(CocoaMQTTFrame(type: CocoaMQTTFrameType.pingreq, payload: [self.presence.rawValue]), tag: -0xC0)
+        send(CocoaMQTTFrame(type: CocoaMQTTFrameType.pingreq, payload: [self.presence]), tag: -0xC0)
         self.delegate?.mqttDidPing(self)
     }
 

    public var secureMQTT = false
    public var cleanSession = true
    public var willMessage: CocoaMQTTWill?
    public var presence: CocoaMQTTPresenceType = .away
    public weak var delegate: CocoaMQTTDelegate? {
        didSet { CocoaMQTTLogger.shared.delegate = delegate }
    }

    var cleanSession: Bool { get set }
    var keepAlive: UInt16 { get set }
    var willMessage: CocoaMQTTWill? { get set }
    var presence: UInt8 { get set }
    
    func connect() -> Bool
    func disconnect()
