简体   繁体   English

通过gprs从跟踪设备读取消息

[英]reading messages from tracking device over gprs

i have a tracking device Meiligao VT310 which send me messeages over gprs. 我有一个跟踪设备Meiligao VT310,它通过gprs向我发送邮件。 I successfully read messagess with this code but it's not the same as I expected. 我用此代码成功读取了消息,但与我期望的不同。

private void ReadCallback(IAsyncResult result)
{
   Client client = result.AsyncState as Client;
   NetworkStream networkStream = client.NetworkStream;
   int read = networkStream.EndRead(result);
   string data = this.Encoding.GetString(client.Buffer, 0, read);

   networkStream.BeginRead(client.Buffer, 0, client.Buffer.Length, ReadCallback, client);
}

I expect output in NMEA format, but output is like this: 我期望以NMEA格式输出,但是输出是这样的:

$$\\0}E!@ 5/??U154108.000,V,4619.3051,N,01549.5325,E,0.00,0,040112,,*1B|0.0|244|0000|0008,0006|0125004600323C97|0E|0000099C??\\r\\n $$ \\ 0} E!@ 5 / ?? U154108.000,V,4619.3051,N,01549.5325,E,0.00,0,040112 ,, * 1B | 0.0 | 244 | 0000 | 0008,0006 | 0125004600323C97 | 0E | 0000099C ?? \\ r \\ n

Meiligao VT310 uses its own protocol known as Meiligao GPRS Communication Protocol . Meiligao VT310使用自己的协议,称为Meiligao GPRS Communication Protocol

GPRS (TCP/UDP) packet command format are the following: GPRS(TCP / UDP)数据包命令格式如下:

From server to tracker: 从服务器到跟踪器:

<header><L><ID><command><parameter><checksum>\r\n

From tracker to server: 从跟踪器到服务器:

<header><L><ID><command><data><checksum>\r\n

It's not NMEA at all but it may uses GPRS NMEA 0183 GPRMC protocol within its data part. 它根本不是NMEA,但可以在其数据部分中使用GPRS NMEA 0183 GPRMC协议。

Resources of interest: 感兴趣的资源:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM