Pymodbus: d200: Error: device: 0 address: 10338 -> Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 receive
I have spent many hours trying various configuration options, but have not yet found a solution. I would greatly appreciate any suggestions you may have. Thank you!
Rx contains field Bytes count == 0F (15 in decimal). The next 15 bytes contain the registers values. And after that device add “1A” - this is CRC checksum. But the problem is that the Modbus TCP protocol specification does not have this field. As a result, all libraries that implement the protocol simply do not read it. And this byte comes first in the subsequent request and, of course, breaks the structure of the response. Example below: Tx [21 6B 00 00 00 06 01] 03 28 00 00 06 Rx [21 6B 00 00 00 0F 01] 03 0C 09 03 00 00 08 32 00 00 08 5B 00 00 2307:2098:2139 Tx [7A D5 00 00 00 06 01] 03 28 00 00 06 Rx [1A 7A D5 00 00 00 0F] MBAP checking error
The example shows that 15 bytes of the response have been read, and the last byte has not been read and comes in the response to the next request.
Of course, I can correct my code so that it reads all the bytes of the response and ignores the last one, but I think that this is not entirely correct. I tried 3 different public ways (one console app, two libraries) and they all don’t work. Can you fix it in the firmware of the device?
Datakom support answer: It is not checksum at the end of modbus packet. Otherwise, it would be a variable value. It is line termination byte and it is default 1A. You can discard this value.