# Modbus Invalid Checksum & verification

**URL:** <https://discuss.saleae.com/t/modbus-invalid-checksum-verification/2943>\
**Category:** Logic 2 Software\
**Created:** [June 29, 2024, 11:34am UTC](https://discuss.saleae.com/t/modbus-invalid-checksum-verification/2943 "2024-06-29T11:34:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mayon](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Mayon](https://discuss.saleae.com/u/Mayon)\
**Post date:** [June 29, 2024, 11:34am UTC](https://discuss.saleae.com/t/modbus-invalid-checksum-verification/2943/1 "2024-06-29T11:34:11Z")

</div>

Hello,

I started working on a Modbus project and was able to collect data.  
However, it shows invalid checksum. How may I fix it?  
What would be the best approach to verify that bit rate, parity, Bits per frame, stop bits, parity bit and significant bit is correct?

Thank you

[MB.sal](https://discuss.saleae.com/uploads/short-url/1JissVlblPl9E04edXaaBRReIv2.sal) (33.7 KB)  
[MB\_GF200ns.sal](https://discuss.saleae.com/uploads/short-url/x96aDu7vA6puBAUr3QQi0aWU6Ky.sal) (44.7 KB)

---

<div class="post-metadata">

**Author:** ![timreyes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/timreyes/32/108_2.png) [@timreyes](https://discuss.saleae.com/u/timreyes)\
**Post date:** [July 2, 2024, 3:25am UTC](https://discuss.saleae.com/t/modbus-invalid-checksum-verification/2943/2 "2024-07-02T03:25:11Z")

</div>

@Mayon Taking a look at your MB.sal file, it looks like glitches in your capture are preventing the Modbus analyzer from properly decoding your data.

If you zoom in closely, you will see some glitches in the range of 100 - 200ns wide like in the image below.

 ![Screenshot 2024-07-01 at 9.21.51 PM](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/2X/3/32ca298b0ac5be2bdcbaaf2744360ac13d3e32a1.png)

On your next capture, can you try enabling a glitch filter (instructions below)? A glitch filter setting of around 500 ns may do the trick to clean those up.

> **[Software Glitch Filter | Saleae Support](https://support.saleae.com/user-guide/using-logic/software-glitch-filter)**

---

<div class="post-metadata">

**Author:** ![Mayon](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Mayon](https://discuss.saleae.com/u/Mayon)\
**Post date:** [July 2, 2024, 9:49am UTC](https://discuss.saleae.com/t/modbus-invalid-checksum-verification/2943/3 "2024-07-02T09:49:03Z")

</div>

Hello Tim,

thank you for looking into it. Please find the upload

[2024-07-02\_MB\_1us.sal](https://discuss.saleae.com/uploads/short-url/tmrrZ9u3aa55RJ2bE3Sy2lmTamW.sal) (7.1 MB)

---

<div class="post-metadata">

**Author:** ![timreyes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/timreyes/32/108_2.png) [@timreyes](https://discuss.saleae.com/u/timreyes)\
**Post date:** [July 3, 2024, 12:12am UTC](https://discuss.saleae.com/t/modbus-invalid-checksum-verification/2943/4 "2024-07-03T00:12:34Z")

</div>

@Mayon Thanks for testing that out. I’ll get your capture file on the queue to review and I’ll follow up with you on our findings.

---

<div class="post-metadata">

**Author:** ![timreyes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/timreyes/32/108_2.png) [@timreyes](https://discuss.saleae.com/u/timreyes)\
**Post date:** [July 4, 2024, 6:08pm UTC](https://discuss.saleae.com/t/modbus-invalid-checksum-verification/2943/5 "2024-07-04T18:08:06Z")

</div>

With your new capture file (glitch filters enabled), it looks like the async serial analyzer is decoding the data properly, which is a great step forward! The Modbus analyzer is not recognizing the sequence of serial data however.

In the image below (taken from the start of capture), I changed the Modbus mode to RTU-Server mode, and changed the Radix display to Hexadecimal for easy reading. Device ID is being read back as 0x00 (1st serial 8-bit transaction), and the function is read as 0x9C (2nd serial 8-bit transaction), which our Modbus analyzer doesn’t recognize and labels it as “User Defined.” I suspect the decoding issue is being caused by this.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/saleae/original/2X/1/1ea050ef0c64a559e53d35b98a1ef4763fb54bb2.png)
