5.15.9, 6.2.4, 6.3.0
8360fcd497 (qt/qtserialbus/dev) e50e5f808d (qt/qtserialbus/6.4) e50e5f808d (qt/tqtc-qtserialbus/6.4) 8360fcd497 (qt/tqtc-qtserialbus/dev) 77d797d699 (qt/tqtc-qtserialbus/5.15) 446554558b (qt/tqtc-qtserialbus/6.2) ba9c521ff8 (qt/qtserialbus/6.3)
See attached project, which follows the "Echo Request Data" example described at Section 6.8.2 at https://www.modbus.org/docs/Modbus_Application_Protocol_V1_1b.pdf
The relevant code is:
- Set up a serial port loopback on your dev machine
- Edit the serial ports in the attached source code if necessary (defaults: "COM2" for slave, "COM3" for master)
- Build and run the attached slave application
- Build and run the attached master application
Alternatively, if you have a real Modbus device, you can use it instead of looping back to the attached slave application.
Qt 5.15.2 (correct):
Qt 5.15.9, Qt 6.x (wrong):
QModbusDevice::UnknownError should not be returned, since the response was received successfully.
Once the fix for
QTBUG-101351 is available in a release, the user can override QModbusClient::processResponse() to erase the error.