Ask a question

3061 questions

3722 answers

4760 comments

3199 members

Ask a question
0 votes
141 views
in Vehicle tracking by

I'm reading a codec 12 example.

But I cant find how can I calculcate the command size.

Hexadecimal stream:

sx.png

Sending “getio” SMS command via GPRS Codec12:

Server request:

Hexadecimal stream:

000000000000000F0C010500000007676574696F0D0A0100003349

Parsed:

Zero: 0x00000000

Packet Length: 0x0000000F

Codec: 0x0C

Quantity of commands: 0x01

Command type: 0x05

Command size: 0x00000007

Command: 0x676574696f (HEX of getio)

Command end symbol: 0x0D0A

Quantity of commands: 01

CRC: 00003349

How do I calculate the command size?

Thanks

1 Answer

0 votes
by

Hello,

Thank you for your query.

Stream:000000000000000F0C010500000007 676574696F0D0A 0100003349

We got command size in Hex: Command size: 0x00000007

Calculate 7 bytes after Command size hex value. 7 bytes will be - 676574696F0D0A

Then command end is included in 7 bytes D0A. Let me know if its still unclear.