From 58d4fc80a710ea6e1d350e913ed09b75953c6e7a Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 26 七月 2023 10:01:08 +0800 Subject: [PATCH] 修改组播搜索,印度佬的网络有问题 --- Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs b/Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs index 4ab1f9b..4e1540c 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/EquipmentPublicClass.cs @@ -239,10 +239,23 @@ SystemRemote.LinkRemote (gateWay.Remote_UserName, gateWay.Remote_ProjectName, gateWay.Remote_Password, true); } else { CommonPage.IsRemote = false; - CommonPage.FindGateway = true; + //CommonPage.FindGateway = true; var result = Control.ControlBytesSendHasReturn (Command.ReadDeviceMac, common.SubnetID, common.DeviceID, new byte [] { }, false); - CommonPage.FindGateway = false; + + + //var control = new Control (); + //control.Send (new Target () { + // IPEndPoint = new System.Net.IPEndPoint (System.Net.IPAddress.Parse (new Net.NetWiFi ().BroadcastIpAddress.ToString ()), 6000), + // Command = Command.ReadGateway, + // SubnetID = common.SubnetID, + // DeviceID = common.DeviceID, + // AddData = new byte [] { (byte)new Random ().Next (255), (byte)new Random ().Next (255) }, + //}, SendCount.Three, true, true); + //var result = control.UsefulBytes; + + //CommonPage.FindGateway = false; if (result != null) { + //var mac0 = CommonPage.byteToHex16 (result [5]) + "." + CommonPage.byteToHex16 (result [6]) + "." + CommonPage.byteToHex16 (result [7]) + "." + CommonPage.byteToHex16 (result [8]) + "." + CommonPage.byteToHex16 (result [9]) + "." + CommonPage.byteToHex16 (result [10]) + "." + CommonPage.byteToHex16 (result [11]) + "." + CommonPage.byteToHex16 (result [12]); var mac0 = CommonPage.byteToHex16 (result [0]) + "." + CommonPage.byteToHex16 (result [1]) + "." + CommonPage.byteToHex16 (result [2]) + "." + CommonPage.byteToHex16 (result [3]) + "." + CommonPage.byteToHex16 (result [4]) + "." + CommonPage.byteToHex16 (result [5]) + "." + CommonPage.byteToHex16 (result [6]) + "." + CommonPage.byteToHex16 (result [7]); if (common.MAC == mac0) { Application.RunOnMainThread (() => { -- Gitblit v1.8.0