libmodbus
libmodbus copied to clipboard
[bug] MODBUS_FC_WRITE_SINGLE_COIL reply
In function modbus_reply, the rspLength of MODBUS_FC_WRITE_SINGLE_COIL reply is error.
'rspLength = reqLength' should be 'rspLength = reqLength - 2;'
Why? Could you elaborate, please? According to my understanding of https://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf the implementation is correct.