HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -11,6 +11,7 @@
using System.Security.Cryptography;
using System.IO;
using HDL_ON.DriverLayer;
using HDL_ON.Entity;
namespace HDL_ON.DAL.Mqtt
{
@@ -646,6 +647,18 @@
            {
                MqttInfoConfig.Current.mMqttInfo = mqttInfoRequestResult_Obj;
                await MQTTConnectAsync();
                //1.判断是否绑定了网关,获取网关远程连接的加密KEY
                if (DB_ResidenceData.residenceData.CheckWhetherGatewayIsBound())
                {
                    //2.找出是否存在匹配当前住宅的mac,存在再进行远程。
                    MqttInfoConfig.Current.HomeGatewayInfo = DB_ResidenceData.residenceData.HomeGateway;
                    //3.开始连接
                    await MQTTConnectAsync();
                }
                else
                {
                    Utlis.WriteLine("============>还没绑定网关");
                }
            }
        }