From 817bb9f225d1dcd15b0d1fb936de1c5279178433 Mon Sep 17 00:00:00 2001 From: xuliang Date: Sat, 9 May 2020 15:37:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E7=A0=81=E4=B8=AD=E5=8C=85=E5=90=AB0x7e=E5=92=8C0x7d=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=B6=88=E6=81=AF=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Program.cs | 4 +++- TcpPack.cs | 3 ++- app.config | 12 ++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Program.cs b/Program.cs index 01eb057..1cd3e6b 100644 --- a/Program.cs +++ b/Program.cs @@ -298,9 +298,11 @@ namespace GT808ClientTest byte checkByte = PackHelper.CalcCheckByte(fullBytes, 0, fullBytes.Length); bytesSend = (new byte[] { 0x7e } - .Concat(PackHelper.EncodeBytes(fullBytes).Concat(new byte[] { checkByte })) + .Concat(PackHelper.EncodeBytes(fullBytes.Concat(new byte[] { checkByte }))) .Concat(new byte[] { 0x7e })).ToArray(); + //Console.WriteLine("{0} {1}",head.SeqNO, bytesSend.ToHexString()); + //发送消息 SendBytes(tcp, bytesSend); //控制台打印日志cpu占用太高 diff --git a/TcpPack.cs b/TcpPack.cs index e175391..beb07dc 100644 --- a/TcpPack.cs +++ b/TcpPack.cs @@ -167,7 +167,8 @@ namespace Gps.Plugin.Tcp.GT808 public string GetDeviceId() { - return string.Concat("460", DeviceId); + //return string.Concat("460", DeviceId); + return DeviceId; } public void SetDeviceId(string value) diff --git a/app.config b/app.config index a8c2a3d..a4af5b3 100644 --- a/app.config +++ b/app.config @@ -5,20 +5,20 @@ - - + + - + - + - + - +