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
296 views
in Vehicle tracking by anonymous

Hi,

I am trying to calculate CRC value for dualcam. I'm following this link about CRC:  https://wiki.teltonika-gps.com/view/Teltonika_DualCam#Camera_RTC_synchronization .  Doc says: 

Polynomial expression: 0x8408 , 

Initial value:  when calculating CRC, initial value is previously received packet (CMD ID 0x0004) CRC value.

There is 2 questions here for me . 

1 )  You saying " Initial value, when calculating CRC, is previously received packet  " but what should we take as Initial value when we reach first data ? 

2) In CRC calculation, we also need " CRC Input Data ". Doc says nothing what should we take as CRC Input Data. For example:

Command ID Data length File data (up to 1024 bytes) Data CRC (2 bytes)
0x0004 0x0402 ... ...

When I receive this data, I took " File data (up to 1024 bytes)" as CRC Input Data. No luck. I tried ,hex,binary,ascii and decimal versions but still no luck. I also tried "0402 + File data" , "0004 +0402 + File data" and "0004 + 0402 + File data + Data CRC" as CRC Input Data but no luck. Can someone tell me , what are you using as CRC Input Data when you calculating Actual CRC for DualCam?

Thanks and regards.

1 Answer

+1 vote
by anonymous

Hello,

1)Initial value for the very first packet is 0x0000

2)Command ID and data length shouldn't used when calculating CRC (only File data needed)

Let us know if you still have additional questions.

Regards,

by anonymous
I actually found the answers right after I wrote the question to community. And now I am sure my answers are exactly true. Thanks for your interest.

Regards,