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

Здравствуйте,  я немогу вычислить CRC-16 для GPRS команды setdigout 1 и setdigout. Скажите как это вычислить?  Мой пример:

Zero Bytes 00 00 00 00
Data Size 00 00 00 13
Codec ID 0C
Command Quantity 1 01
Command Type 05
Command Size 00 00 00 0B
Command 73 65 74 64 69 67 6f 75 74 20 31
Command Quantity 2 01
CRC-16 ?? ?? ?? ??
 

from wiki:   CRC-16 – calculated from Codec ID to the Command Quantity 2. CRC (Cyclic Redundancy Check) is an error-detecting code using for detect accidental changes to RAW data. For calculation we are using CRC-16/IBM.

Я не понимаю этого, может для CRC-16 есть какой то конвертер?  Подскажите. Или дайте hex команду. Спасибо

by

Добрый день,

Используется классический crc16 по таблице, с начальным значением полинома 0x8005.

Я рекомендую подключить Teltonika к flespi и выполнить настройку setdigout 1 или иные, после чего посмотреть трафик между платформой и трекером для сравнения со своим подсчетом.

1 Answer

0 votes
by anonymous

Hello there,

Good day. Thank you for the question.

For the calculation, you may use this link https://www.scadacore.com/tools/programming-calculators/online-checksum-calculator/

Referring the short note in Wiki - CRC-16 – calculated from Codec ID to the Command Quantity 2. CRC (Cyclic Redundancy Check) is an error-detecting code using for detect accidental changes to RAW data. For calculation we are using CRC-16/IBM.

Therefore taking the example provided above, from Codec ID to the Command Quantity 2 it will be 0C01050000000B7365746469676F7574203101.

When we put this value in the calculator and analyze it , answer - setdigout 1

Next, we will need to check the calculation using CRC-16/IBM, the implementation is Reversed 0xA001, Little Endian (DCBA). Therefore, the value for CRC-16 is 00 00 87 A2.

Please go through this and let me know if it helps.

Kind regards.