Closed franz-hoepfinger-4diac closed 3 months ago
@kumajaya as you are currently for me the person knowing most about the modbus code: could you please be so kind and have a look on that PR?
@kumajaya please also look into matrix, there i described the Errors without this PR:
mainly:
i used a Waveshare https://www.waveshare.com/wiki/Modbus_RTU_IO_8CH and it did only lit on every 2nd LED.
the Reading did work correct, just the writing not.
here a picture, i just realized Matrix not showing any pictures in the Moment.
Without this Change on a Digital Out Module Writing Coils, only each 2nd Coil is activated.
@azoitl @diplfranzhoepfinger I was able to reproduce the issue and this patch fixes it.
But I also found another issue, reuse previous connection not always working. The first client (with "modbus[rtu:/dev/ttyS0:9600:N:8:1::4:2000:i0..7]" parameter) always succeeds in reading Modbus data but the other clients (with "modbus[rtu:/dev/ttyS0:::::::2000:i8..15:]" parameter, "modbus[rtu:/dev/ttyS0:::::::2000:i16..23:]" parameter and so on) do not always do so.
Without this Change on a Digital Out Module Writing Coils, only each 2nd Coil is activated.
@azoitl @diplfranzhoepfinger I was able to reproduce the issue and this patch fixes it.
so THIS Fix can be merged,
but
But I also found another issue, reuse previous connection not always working. The first client (with "modbus[rtu:/dev/ttyS0:9600:N:8:1::4:2000:i0..7]" parameter) always succeeds in reading Modbus data but the other clients (with "modbus[rtu:/dev/ttyS0:::::::2000:i8..15:]" parameter, "modbus[rtu:/dev/ttyS0:::::::2000:i16..23:]" parameter and so on) do not always do so.
we need another Fix for this.
Would say so too.
Without this Change on a Digital Out Module Writing Coils, only each 2nd Coil is activated.