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