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

发布于 2024-12-26 06:06:29 字数 625 浏览 7 评论 0原文

我有一个跟踪设备 Meil​​igao 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

街道布景 2025-01-02 06:06:29

Meiligao VT310 使用自己的协议,称为Meiligao GPRS 通信协议

GPRS (TCP/UDP) 数据包命令格式如下:

从服务器到跟踪器:

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

从跟踪器到服务器:

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

它根本不是 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:

<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.

Resources of interest:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文