How do I create an FCS for PPP packets?

I am trying to create a software simulation on an Ubuntu GNU/Linux machine which will work like PPPoE. I would like this simulator to take outgoing packets, strip off the ethernet header, insert...

CRC-ITU calculation in c#

I'm new to C#. I need to calculate CRC-ITU for the packet recieved from GPS devices. There is C code provided in the documentation but i don't know how to port it to C#, anyone could help me? here...

Function to calculate CRC16 (Modbus) value

Using C#.net,WPF application.I'm going to connect to a device (MODBUS protocol), I have to calculate CRC (CRC16). Function which i use calculate normal crc16 and value is correct,but i want the...

Calculating Modbus RTU CRC 16

I'm implementing a software where I read and write data in Modbus RTU protocolo via serial. For that, I need to calculate the two CRC byte at the end of the string of bytes, but I'm being...

Need help in correcting issues in CRC-ITU check method written in Javascript (node.js)

We are trying to code GPS device listener on Javascript. While doing this, we are unable to develop the right script for the CRC-ITU error check. The explanation for the crc code generation from...

How to use table based CRC-16 code?

I was hoping someone might be able to shed some light on why my CRC-16 implementation does not seem to run correctly on Visual Studio? I got the algorithm from a manual for a specific device, and...

invalid types ‘unsigned char[int]’ for array subscript

I'm working on trying to create a CRC using data bytes, and I have written this function: u16 crcGenerate(unsigned char bytes, int len){ u16 crc = 0; for (int i = 0; i < len; i++){ crc =...

CRC-CCITT 16-bit Python Manual Calculation

Problem I am writing code for an embedded device. A lot of solutions out there for CRC-CCITT 16-bit calculations require libraries. Given that using libraries is almost impossible and a drain on...

UnPack / rePack android img with Ubuntu simg2img/make_ext4fs

I'm playing with these 2 tools on ubuntu 14.04.1 : simg2img make_ext4fs The first tool work great. But when I try to compile the image changed with the second tool I have in output this...

Reverse engineer serial data packet

i have a device connected to PC vie serial port (rs-232). That device send data after receiving command from serial port, i sniffed data flows throught port and almost completely found out packet...

Reverse engineering CRC

I have data approximately 750 bytes long, which is protected by CRC. I want to make changes to the data but not knowing the CRC scheme means I cannot do it. But I have the luxury of observing the...

Python INT to IntelHex with CRC16

I want to convert the integer 259 to an IntelHex formatted file using Python3. I found the IntelHex python package and tried getting it to do the job but I failed miserably when it comes to the...

Redis hash function and data partition

As it is known, Redis uses the CRC16 algorithm to map keys to hash slots. Is it safe to assume that crc uses some kind of "distribution" in order to assign keys to nodes? And if yes, what kind of...

How to calculate the CRC16 for wireless M-Bus messages

I try to calculate the CRC16 for m-bus messages in go. One example is in the following document on page 4: http://fastforward.ag/downloads/docu/FAST_EnergyCam-Protocol-wirelessMBUS.pdf 10 data...

Compute the crc16 of a bytearray / userdata in lua

I am writing a Wireshark protocol dissector in lua. The protocol it parses contains a crc16 checksum. The dissector should check whether the crc is correct. I have found a crc16 implementation...

Can a CRC32 engine be used for computing CRC16 hashes?

I'm working with a microcontroller with native HW functions to calculate CRC32 hashes from chunks of memory, where the polynomial can be freely defined. It turns out that the system has different...

Value (CRC-16 X 25) to HDLC frame

I have an example frame: 7E FF 10 9A 45 F2 7B F1 00 0A CF 7E 0A CF --> is a CRC-16 X.25 value from these bytes: FF 10 9A 45 F2 7B F1 00 Do you know of an example algorithm for this CRC calculation...

CRC-16/CCITT in Swift 4

How to get this code working in swift 4: func crc16ccitt(data: [UInt8], seed: UInt16 = 0x1d0f, final: UInt16 = 0xffff) -> UInt16 { var crc = seed data.forEach { (byte) in crc ^=...

CRC-16-IBM implementation (JS) not working

Background I receive a buffer of bytes that has a CRC check at the end. According to the manual, this is the CRC-16-IBM algorithm with the polynomial 0xA001 ( reversed as seen in Wikipedia...

multiple definition of `memset' when building static rust library to be used for Nordic SDK program

Note: I do not see that this is a duplicate of the other question. It's in my question, that I checked the suggetion provided there and this doesn't help here (as shown below). If you see this...

How to calculate CRC16-CCITT/KERMIT in both C# and C

I am working on calculating a CRC16-CCITT/KERMIT so that I can check data integrity on transmissions of 64-byte data packets between a C# Winforms Application and a microcontroller (PSoC5LP/Arm...

Understanting an efficient CRC-CCITT-16 implementation

I came across an allegedly very efficient and elegant CRC implementation and I am trying to really understand all the steps. I understand the CRC-CCITT 0x1021 implementations that iterate over...

Convert Python's binascii.crc_hqx() back to ascii

I'm using the standard Python3 lib binascii, and specifically the crc_hqx() function binascii.crc_hqx(data, value) Compute a 16-bit CRC value of data, starting with value as the initial CRC, and...

CRC calculation for big endian without byte swapping

I'm trying to calculate CRC16 with the slice by 4 method in a big endian system. So far I've achieved it by using the following code for generating the tables with poly = 0xA001: void...

How to check CRC16 validity

I'm working on receiving binary data from sensors for the first time. The data is base64-encoded, I should decode the data and validate it and then save it to the database. One step of the...

How to Calculate CRC Starting at Last Byte

I'm trying to implement a CRC-CCITT calculator in VHDL. I was able to initially do that; however, I recently found out that data is delivered starting at the least-significant byte. In my code,...

Cyclic Redundancy Check: Single and double bit error

Found this on the book by Forouzan (Data Communications and Networking 5E). But, not able to understand the logic behind these. This is in the context of isolated double-bit errors. The...

MySQL function to calculate CRC16

I'm working on a system that uses a large MySQL database and I need to calculate crc16 based on some columns in the table. But I can't find any function that helps me. MySQL only has crc32, but I...

I want to read the ML-NTC2 temperature sensor value through Arduino. But I get error: invalid conversion from'char*' to'const uint8_t*'

The arduino model name is wemos d1 mini and the board manager installed esp-8266. ML-NTC2 temperature sensor is Modbus 485 communication RTU method. Communication module is Esp-8266....

CRC-16 and/or Frame Check Sequence

I have an incoming packet that reads 7E0302403F387E from a serial port. start and end flag is 7E, FCS/CRC is 3F38 and the data is 030240. The FCS is calculated per the algorithm specified in RFC...

Relevant tags