wxr
2020-12-01 a2927467ebfa938a420f392deb6882b35570fd33
HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -9,6 +9,7 @@
using System.Text;
using System.Security.Cryptography;
using HDL_ON.DriverLayer;
using HDL_ON.Entity;
namespace HDL_ON.DAL.Mqtt
{
@@ -644,6 +645,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("============>还没绑定网关");
                }
            }
        }