How to validate modbus RTU data CRC in c#

Vidya Suryanarayana 1 Reputation point
2022-01-19T17:14:27.253+00:00

I've a modbus request hex data that is fetched from a usb sniffer generated file.
This is how the data is
2 41 1 4 99 1 b4 0 1 40 0 1 b4 0 0 0 19 fe bc

the last values are the CRC LSB and MSB. How can I validate the CRC for this ?

Thanks,
Vidya

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,296 questions
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,839 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. David Lowndes 4,711 Reputation points
    2022-01-19T17:29:01.827+00:00

    Find a C# implementation (or do it yourself) of the Modbus CRC algorithm.

    0 comments No comments