stephane / libmodbus

A Modbus library for Linux, Mac OS, FreeBSD and Windows
http://libmodbus.org
GNU Lesser General Public License v2.1
3.44k stars 1.74k forks source link

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

Open suresh-dersec opened 10 months ago

suresh-dersec commented 10 months ago

Please read the following carefully before submitting this new issue.

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

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 ## Environment ## 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...