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#.
4,919 questions
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,388 questions
No comments
{count} votes

1 answer

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

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