Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRC Check Error and Slave not the requested One, Ignored #723

Open
suresh-dersec opened this issue Dec 2, 2023 · 0 comments
Open

CRC Check Error and Slave not the requested One, Ignored #723

suresh-dersec opened this issue Dec 2, 2023 · 0 comments

Comments

@suresh-dersec
Copy link

Please read the following carefully before submitting this new issue.

  • Please ensure, that you are really reporting a bug. When in doubt, post a
    message on https://groups.google.com/forum/#!forum/libmodbus or send an
    email to [email protected]

  • Please do not open issues to ask questions about using libmodbus. Use the
    mailing list for this as there are many more people reading that list, who
    could help you.

  • When using libmodbus from a distribution (Debian, Fedora...), please report
    the bug first in the bug tracker of the distribution. The reason for doing so
    is that the package maintainer should have a chance to look at the issue first
    as it might be a packaging error. If/when the package maintainer comes to the
    conclusion that is really an upstream bug, then he/she will usually report it
    here by himself/herself. This is because he/she is interested in staying in
    the notification chain to decide about a backport as soon as a bugfix is
    available. Otherwise you (distribution user) will be asked to do so
    explicitly.

When you get here and you are still convinced that you want to report a bug:

  • Use a clear and descriptive title for the issue to identify

  • Which version of libmodbus are you using? you can obtain this information
    from your package manager or by running pkg-config --modversion libmodbus.
    You can provide the sha1 of the commit if you have fetched the code with git.

  • Which operating system are you using?

  • Describe the exact steps which reproduce the problem in as many details as
    possible. For example, the software/equipment which runs the Modbus server, how
    the clients are connected (TCP, RTU, ASCII) and the source code you are using.

  • Enable the debug mode, libmodbus provides a function to display the content
    of the Modbus messages and it's very convenient to analyze issues
    (http://libmodbus.org/docs/modbus_set_debug/).

Good bug reports provide right and quick fixes!

Finally, thank you very much for using libmodbus and taking the time to
file a good bug report. Doing so signals your respect for the developers.

The following template helps you to address the points above. Please delete
everything up to and including the following line which starts with ---.


libmodbus version

OS and/or distribution

<e.g. Windows, Linux... version>

Environment

<e.g. CPU architecture, 32 vs. 64 bit...>

Description

When I connect to the device, the first request is getting success and any subsequent query/request sent to my slave device from rtuclient (using libmodbus) resulting CRC check Error and Responding slave is not the requested one so Ignored.

Actual behavior if applicable

The same slave device is tested with modbus poll, modscan32 software and working fine.

Expected behavior or suggestion

<...>

Steps to reproduce the behavior (commands or source code)

<...>

libmodbus output with debug mode enabled

<...>
The client connection from 192.168.1.105 is accepted
Opening /dev/ttyUSB0 at 9600 bauds (N, 8, 1)
Waiting for an indication...
<00><01><00><00><00><06><01><03><02><49><00><03>
[01][03][02][49][00][03][D5][A5]
Waiting for a confirmation...
<01><03><06><00><00><15><9B><2E><68>

[00][01][00][00][00][09][01][03][06][00][F0][00][F0][15][9B]
Waiting for an indication...
<00><02><00><00><00><06><01><03><02><49><00><03>
[01][03][02][49][00][03][D5][A5]
Waiting for a confirmation...
<00><64><01><03><06>
ERROR CRC received 0x306 != CRC calculated 0x9AC0

[00][02][00][00][00][09][01][03][06][00][F0][00][F0][15][9B]
Waiting for an indication...
<00><03><00><00><00><06><01><03><00><01><00><03>
[01][03][00][01][00][03][54][0B]
Waiting for a confirmation...
<00><00><15>
ERROR CRC received 0xF015 != CRC calculated 0x35C0

[00][03][00][00][00][09][01][03][06][00][F0][00][F0][15][9B]
Waiting for an indication...
<00><04><00><00><00><06><01><03><00><01><00><03>
[01][03][00][01][00][03][54][0B]
Waiting for a confirmation...
<9B><2E><68><00><64>
Request for slave 155 ignored (not 1)
The responding slave 155 isn't the requested slave 1
[00][04][00][00][00][09][01][03][06][00][F0][00][F0][15][9B]
Waiting for an indication...
<00><05><00><00><00><06><01><03><00><01><00><03>
[01][03][00][01][00][03][54][0B]
Waiting for a confirmation...
<01><03><06><00><01><01><04><32><32><3D>
[00][05][00][00][00][09][01][03][06][00][01][01][04][32][32]
Waiting for an indication...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant