通过 GPRS 从跟踪设备读取消息
我有一个跟踪设备 Meiligao VT310,它通过 gprs 向我发送消息。我成功地用这段代码读取了消息,但它与我预期的不一样。
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);
}
我期望以 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
i have a tracking device Meiligao VT310 which send me messeages over 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:
$$\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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Meiligao VT310 使用自己的协议,称为
Meiligao GPRS 通信协议
。GPRS (TCP/UDP) 数据包命令格式如下:
从服务器到跟踪器:
从跟踪器到服务器:
它根本不是 NMEA,但它可能在其数据中使用 GPRS NMEA 0183 GPRMC 协议 部分。
感兴趣的资源:
Meiligao VT310 uses its own protocol known as
Meiligao GPRS Communication Protocol
.GPRS (TCP/UDP) packet command format are the following:
From server to tracker:
From tracker to server:
It's not NMEA at all but it may uses GPRS NMEA 0183 GPRMC protocol within its data part.
Resources of interest: