| | |
| | | using System.Text; |
| | | using System.Security.Cryptography; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | |
| | | namespace HDL_ON.DAL.Mqtt |
| | | { |
| | |
| | | { |
| | | 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("============>还没绑定网关"); |
| | | } |
| | | } |
| | | } |
| | | |