FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

4167 questions

4739 answers

3460 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
2,656 views
in Vehicle tracking by

Hi,

I am trying to get CRC calculation value, based on CODEC_12 Protocol Description (page 9)

Server command
Hexadecimal stream:
0000000000000018
0C0105000000102347455420444154414F524445520D0A0100004990
Parsed:
Preamble: 0x00000000
Packet Length: 0x00000018
Codec: 0x0C
Quantity of commands: 0x01
Command type: 0x05
Command size: 0x00000010
Command in ASCII after conversion:
#GET DATAORDER<CR><LF>
Quantity of commands: 0x01
CRC: 0x00004990
  ---> I want to get this value

on page 6, says:

The algorithm to calculate CRC is CRC-16 (also known as CRC-16-IBM). All the fields from codec ID to second command/response quantity field are used to calculate CRC

so in my case I should use the following:

0C0105000000102347455420444154414F524445520D0A01
 

I try to get the CRC value from http://www.tahapaksu.com/crc/

but why the result is different 

from the manual: CRC: 0x00004990

from http://www.tahapaksu.com/crc/   CRC: 0xF58D

What I missed?

by
Please ignore this..

it resolved..

this is because I forgot to set input type to hex

1 Answer

0 votes
by anonymous
Hello,

just marking this as solved: "Please ignore this.."

Please don't hesitate to ask if you have any further questions and have a great day :)

Best regards,

Vytenis
by
is there any java or javascript code to calculate this CRC-16
by anonymous

Can You please share me exact hex format that you have passed to the device?

We should send like this right?

'\x00\x00\x00\x00\x00\x00\x00\x18\x0C\x01\x05\x00\x00\x00\x102347455420444154414F5244455\x01\x00\x00\x49\x90'