stephane / libmodbus

A Modbus library for Linux, Mac OS, FreeBSD and Windows
http://libmodbus.org
GNU Lesser General Public License v2.1
3.44k stars 1.75k forks source link

write_xxxx on broadcast shouldn't wait for a reply #372

Open karlp opened 7 years ago

karlp commented 7 years ago

Related to https://github.com/stephane/libmodbus/issues/153

That commit fixed the server side to not reply on broadcasts, but the client side still expects replies to commands like write_register, write_registers, write_bit and write_bits, even when the slave has been set to 0. See for instance https://github.com/stephane/libmodbus/blob/master/src/modbus.c#L1244-L1253

When the server side is (correctly) not replying, this causes device timeouts on each request.

Potentially should be a "compliance quirk" as well for people that sometimes want replies to broadcasts?

stephane commented 6 years ago

379