With the following patch in file "modbus-serial-client.js" data can be received from a server after polling for data
var onData = function (pdu) {
this.log.debug('received data');
this.emit('data', pdu.slice(1));
The point is that every Modbus RTU response includes as first byte the slave address mirrored.
Before the patch the whole PDU as received has been handed over to the emitter. With the patch the PDU without the first byte is handed over.
With the following patch in file "modbus-serial-client.js" data can be received from a server after polling for data
The point is that every Modbus RTU response includes as first byte the slave address mirrored. Before the patch the whole PDU as received has been handed over to the emitter. With the patch the PDU without the first byte is handed over.