336 questions
-2
votes
1
answer
62
views
Rs232 Checksum calculation [closed]
I am trying to calculate the CRC for an RS-232 protocol frame. Here is an example frame:
01 37 37 1D 30 30 33 1D 30 03 34 37 33 39 37 04
There 37 37 is the slave id, 77. 34 37 33 39 37 is the CRC,...
0
votes
0
answers
104
views
How to identify which CRC-16 variant is used in this binary protocol?
I'm analyzing a binary protocol captured via IRP_MJ_READ. Each message is 11 bytes, and I suspect the last 2 bytes are a CRC-16 value.Here’s an example of the message in hex:
00 02 c1 00 10 00 00 00 ...
-1
votes
1
answer
180
views
Parallelising CCITT-CRC16 over via CUDA
I have been tasked by my boss to convert a sequential CRC16 algorithm that runs on the CPU into something that can run on the GPU via CUDA (that isn't just running the sequential algorithm in a single ...
0
votes
1
answer
288
views
Trying to create a CRC-16 CCITT-FALSE checksum - but result is incorrect
Hello I have the below c function which I believe to be in the correct specification for CRC-16 CCITT False:
uint16_t crc16(const char* pData, int length)
{
uint8_t i;
uint16_t wCrc = 0xffff;
...
3
votes
2
answers
94
views
Cannot reproduce working CRC-16/CCITT KERMIT with C#
I found an example of working CRC-16/CCITT KERMIT python code shown below:
def make_crc_table():
poly = 0x8408
table = []
for byte in range(256):
crc = 0
for bit in range(8)...
2
votes
1
answer
67
views
Can a CRC32 calculation be derived in terms of CRC16 calculations?
I need to calculate a 32-bit CRC but the microprocessor I am using only has a 16-bit CRC peripheral. Would it be possible to still use this 16-bit peripheral as part of my 32-bit calculations, and ...
1
vote
1
answer
77
views
How do I detect if there is a CRC in a sequence of bytes? [closed]
Here's the data I have, I'm not sure the last 2 bytes are the CRC but it's my best guess. I've tried CRC-RevEng with no luck. What would be the best approach to try to figure out if the last 2 bytes ...
0
votes
1
answer
147
views
CRC16 CRC-CCITT (0xFFFF) function with PL/pgSQL
How to compute CRC16 CRC-CCITT (0xFFFF) function with PL/PGSQL , the same way as MySQL?
Code Function for PL/PGSQL
I try to convert from MYSQL to PL/PGSQL
DELIMITER //
CREATE DEFINER=`root`@`%` ...
0
votes
1
answer
389
views
What do I wrong with crc16-x25 calculation in python?
I have this code in python 3 to calculate CRC16-X25:
import crcmod
# CRC function using the CRC-16-CCITT standard
crc16 = crcmod.mkCrcFun(0x11021, initCrc=0xFFFF, xorOut=0xFFFF, rev=True)
def ...
2
votes
2
answers
112
views
Verifying checksum for MCP3561/2/4R
I have an SPI communication with the chip in question.
https://ww1.microchip.com/downloads/en/DeviceDoc/MCP3561.2.4R-Data-Sheet-DS200006391A.pdf
According to the datasheet, section 6.5, after reading ...
0
votes
1
answer
360
views
How to find checksum (CRC16?) for messages
I have a list of messages from a CAN bus log.
Some of the messages seem to have 2 bytes with what appears to be checksum, and then a sequence (or counter byte)... and then 5 more bytes.
Here is a ...
1
vote
1
answer
663
views
CRC-16 polynomial notation
In the CRC-16 calculation what is the difference (if any) between polynomial (x16 + x15 + x2 + x0) and (x16 + x15 + x2 + 1)?
Are the same (any number raised to zero is equal to one)?
Can someone ...
1
vote
3
answers
395
views
What does "CRC presented high byte first" mean exactly?
In the Catalogue of parametrized CRC algorithms, a couple of CRCs, namely CRC-16/XMODEM and CRC-16/GENIBUS have a point about "CRC presented high byte first." and I'm not entirely sure what ...
0
votes
1
answer
191
views
pymodbus read_coils return missing 1byte CRC
I am trying to control a EX-PS 5080 power source via pymodbus. I am trying to read the remote status. Modbus address = 402; functioncode = 01 read coils; datatype = uint(16); datalenght in bytes = 2; ...
0
votes
2
answers
217
views
Which CRC algorithm must be used to query the Tamper Tag status from a NTag213?
I'm trying to read the "TT status" of a Tamper Tag NTag 213 (using a TWN4 reader).
The "Read TT status" command is A4 00 + CRC (documentation).
I seem to have a problem with the ...
0
votes
1
answer
147
views
DEX/UCS - G85 - Record Integrity Check
I need to write a C procedure to calculate the CRC16 (G85 - Record Integrity Check) for a DEX/UCS transaction. Searching the internet, I could not find a complete, fully described algorithm anywhere.
...
0
votes
2
answers
123
views
What kind of CRC16 is this?
I'm currently processing an AX.25 packet.
When I try to calculate the CRC/FCS myself, my result and the packet's are always different.
bitstream:
...
2
votes
1
answer
1k
views
Correct way of checking CRC
I am designing a protocol with fixed size header+payload fields and I want to add a CRC check to the protocol design.
When adding a CRC value at the end of packet, there are two way of checking packet ...
0
votes
0
answers
267
views
Decoding an unknown CRC in an HDLC packet
I'm currently trying to replicate some HDLC messages received from a device, and I've managed to determine their entire contents except for the CRC. Consecutive messages are delimited by the standard ...
1
vote
1
answer
259
views
Implementing Custom CRC-16 in Python to Replicate MATLAB's comm.CRCGenerator Behavior
I am trying to replicate a custom CRC-16 algorithm implemented in MATLAB, in Python. The original MATLAB code uses the comm.CRCGenerator object with the polynomial 'X^16 + X^12 + X^5 + 1'.
The MATLAB ...
-1
votes
1
answer
1k
views
What is better crc8 or crc16?
I’m very interested on the crc topic. I understand that the probability of the error with a crc8 is 1/256, a 0.39%. But I want to know the number of bits that could change in an amount like 320 bytes. ...
-1
votes
1
answer
91
views
How to reverse the output of crc.crc16ccitt to the original input?
How to reverse the output of crc.crc16ccitt to the original input. Used npm module named crc.
Package used: https://github.com/alexgorbatchev/crc
Method used: crc.crc16ccitt(inputString)
1
vote
1
answer
662
views
Data Transmission CRC, differentiation of CRC/FALSE
I'm trying to learn CRCs. Yet- I have no clue what a CRC16/CCITT_FALSE standard is. Can anyone help or send some resources that can explain the difference between CRC-16-CCITT and CRC16/CCITT FALSE ...
0
votes
1
answer
447
views
C# CRC16 implementation help right shift vs left shift
I am just starting to learn C#, and I created 2 methods based on CRC16 C# implementations on Sanity Free website.
Can someone help me understand when and why to use these two different C# CRC16 ...
0
votes
4
answers
757
views
CRC16 table Vs polynomial
I've got 2 crc calculators that I think should produce the same checksum. The lookup calculator
table=[0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, 0x8108, 0x9129, 0xA14A, 0xB16B, ...
0
votes
2
answers
2k
views
How to calculate the checksum of this data?
I have the following data frame:
AA3200010013000CAAAA000000000000000000043000010156EF79
"EF 79" is supposed to be the checksum. but I am not very sure how to get this value.
in the ...
0
votes
0
answers
101
views
CRC computation OK for small payloads but not for large ones
I am trying to validate the CRC associated with the messages from my heater and received through an RTL-SDR dongle. The messages are issued by a Semtech SX1211 transmitter in the Variable Length ...
0
votes
1
answer
88
views
CRC16's calculation doesn't return "0" in the receiver
I have already done a CRC16 calculation algorithm, and it works very well. Now, as a next step, I am trying to write a CRC16 algorithm using a lookup table.
First of all, I create a dummy message with ...
-1
votes
3
answers
545
views
CRC-16 SQL CCTI
I have Sql Code that converts input to CRC-32 Need help to convert CRC-32 to CRC-16 is there any other resource available. below is my SQl Please help I need 4 digit output code
DECLARE @input VARCHAR(...
0
votes
2
answers
192
views
How do I append a crc16 value to the end of a char array in C?
I have some data that needs to be sent as a string along with a crc16 value. The format is like this:
",,,...,crc16\r"
I have a crc16 function that I pass the data into as a character array, ...
-2
votes
1
answer
191
views
16 bit Checksum fuzzy analsysis - Leveraging "collisions", biases a thing? [closed]
If playing around with CRC RevEng fails, what next? That is the gist of my question. I am trying to learn more how to think for myself, not just looking for an answer 1 time to 1 problem.
Assuming ...
0
votes
0
answers
57
views
CRC exploring encoding principles (reserve)
We are looking for a solution to the problem of guessing the result value of crc16 with a specific Hex input.
hello. Currently, I am working on estimating the result of crc-16 using specific hex data.
...
2
votes
1
answer
720
views
Reverse CRC16 calculation
I'm trying to understand how is calculated the CRC at the end of a radio packet.
Here are a few examples:
11 00 01 0D 30 10 05 1F 11 ED 7E 01 00 01 B9 33
11 00 01 0D 30 10 05 1F 11 ED 7E 01 00 00 B9 ...
0
votes
3
answers
4k
views
CRC-16/X-25 Calculation
I'm searching to calculate CRC-16 for concox VTS. After search a lot I've got several formula, lookup table, CRC32.net library etc and tried them. But didn't get the actual result which I've wanted.
...
0
votes
1
answer
472
views
How to calculate reconciliation factor in CRC32 for CVN number and CALID
How to calculate reconciliation factor in CRC32 for CVN number and CALID
Can someone help he with this How to calculate reconciliation factor in CRC32 and crc16.
but calculated factor value should be ...
0
votes
1
answer
141
views
What happens if there is an error in the CRC code itself for a signal?
We using crc algorithm to detect errors , and we send with our message crc code , but what happened if an error occurre when we send it ? And how we detected?
I try nothing to do , but i guess that we ...
-3
votes
1
answer
241
views
Pass array of bytes into function header file
I would like to pass an array of bytes to a function but I got an error when compiling.
I need the array in order to use CRC16.h because it wants uint8_t type data.
I already tried to put byte; array ...
0
votes
1
answer
121
views
Qt qChecksum in javascript
I am trying to calculate CRC16 from Qt and matching it on javascript side.
Below is the code I use to generate the CRC16 using qChecksum.
QByteArray source = QString("A").toUtf8();
quint16 ...
1
vote
2
answers
1k
views
Calculating CRC16 on Vec<u8>
I'm sending and receiving raw binary data via the serial port, so I have a predefined message stored in a u8 vector. I need to calculate the 16bit CRC and append that onto the end before sending it, ...
1
vote
2
answers
941
views
CRC16-CCITT for shipborne AIS
I am trying to decode an AIS transmission and validate it by checking CRC code.
However, I am not sure of the sequence of steps, nor the expected result.
My question is, can anyone tell me the correct ...
1
vote
1
answer
276
views
Checksum/CRC reverse engineering of Microsoft NDIS packet
I am trying to decode a 42-byte packet which seems to include 2-byte CRC / checksum field
This is a Microsoft NDIS packet (type IPX) which is sent in HLK (WHQL) tests
I have decoded most parts of the ...
0
votes
1
answer
320
views
Insert '\x' in python3 [duplicate]
I am trying to use crcmod correctly but I have problem:
For example I would like to transform the string "1234567809" into the bytes b'\x12\x34\x56\x78\x09' in order to obtain the correct ...
2
votes
2
answers
6k
views
CRC-16 Checksum calculator with Vanilla JS
I am looking for a CRC-16 CRC algorithm which is written in JavaScript and runs in a normal browser. I know there are an incredible amount of code examples for CRC-16 implementations in all sorts of ...
3
votes
2
answers
2k
views
Impact of data padding on CRC calculation
I am calculating CRC on a large chunk of data every cycle in hardware (64B per cycle). In order to parallelize the CRC calculation, I want to calculate the CRC for small data chunks and then XOR them ...
1
vote
1
answer
2k
views
Cyclic Redundancy check : Single and double bit error
Found this in the book by Forouzan (Data Communications and Networking 5E). But, not able to understand the logic behind this.
This is in the context of topic two isolated single-bit errors
In other ...
0
votes
1
answer
425
views
crc-16 IBM, 0x00 not taken in consideration
I did test a crc-16/ibm implementation i found on the net. when I test it with hex byte array it works fine but if I include some 0x00 values, then it doesn't give the proper result.
here is its code
...
0
votes
1
answer
1k
views
How CRC16 using bytes data is woking ? (for CAN bus implementation)
I have some trouble implementing a CRC16 for can message, I followed the instructions given by this website https://barrgroup.com/embedded-systems/how-to/crc-calculation-c-code and http://www....
0
votes
1
answer
266
views
Transfering C++ CRC16 modbus rtu calculator to python
Please excuse me if the question will be simple, I'm kinda new with CRC.
I've got cpp CRC16 func with defined crc table and I want exactly the same results in python. I used some libraries, but all of ...
0
votes
1
answer
176
views
unable to get the following part in CRC implementation in c++
So i was referring Geeks For Geeks for the implementation of CRC in Data Communication
Here is the code:-
#include <bits/stdc++.h>
using namespace std;
string xor1(string a, string b)
{
...
0
votes
1
answer
825
views
Converting C to Java for [CRC16 /IBM-SDLC ]
This example program is written in C language. It is used to generate a 16-bit FCS number based on CRC-16/IBM-SDLC. I'm trying to write the same in JAVA. Can someone help me with this or provide some ...