A
A
Andrey2019-03-22 15:42:47
C++ / C#
Andrey, 2019-03-22 15:42:47

How to properly parse a TCP packet?

Good afternoon!
Please tell me, I'm trying to write a packet parser from a satellite monitoring terminal, and I ran into such a problem, I don't understand how to extract IMEI from a packet, without extraneous characters.
There are no problems with receiving packets, I do it via msdn.
Here is the description of the protocol from the manufacturer:
5c94d75e6e599925642182.png
After converting the first packet from the terminal

data = System.Text.Encoding.ASCII.GetString(bytes, 0, i);

I get:
B863000000113045                                              z

5c94d80993228855398286.png
The length of the first packet is 66 bytes.
How to remove extra characters and what do they mean judging by the description of the protocol?
I will be very grateful for links to examples on my subject, tk. it is clear that I do not understand something ... but what?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Fedotov, 2019-03-22
@orderbynull

I advise you to run wireshark, it will probably be more clear how to parse

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question