Libmodbus Versions Save

A Modbus library for Linux, Mac OS, FreeBSD and Windows

v3.0.2

1 year ago

Yet another stable release with minor fixes.

  • Update Debian package.
  • Documentation fixes and additions.
  • Add missing C++ macros in public headers. Thanks to Bernhard Agthe.
  • Protects modbus_mapping_free against NULL argument. Thanks to Andrea Mattia.
  • Fix check on file doc/libmodbus.7 in acinclude.m4 (closes #28)
  • Close file descriptor when the settings don't apply in RTU. Original patch provided by Thomas Stalder.
  • unit-test.h is now generated to avoid config.h dependency.
  • Request for Windows Sockets specification version 2.2 instead of 2.0. Thanks to Pavel Mazniker for the report.

v3.0.3

1 year ago

This new bugfix release contains the following changes:

  • Fix another Visual C++ 2008/2010 deficiency (closes #53)
  • Add -lsocket to compile on QNX
  • Fix TCP PI init under Windows. Thanks to oldfaber.
  • Fix a missing free in random-test-client Thanks again to Stefan Finzel.
  • Fix OMG bug in modbus_mapping_free not freeing memory. Thanks to Stefan Finzel for the bug report.
  • Fix semicolon typo and unistd.h include under Windows. Thanks to Andrew Kravchuk.

v3.1.1

1 year ago

More robust to exploits, more compliant and better handling of connect/close sequences. Windows support still broken.

  • New unit tests
  • Fix remote buffer overflow vulnerability (closes #25, #105)
  • Explain how to define response timeouts when many RTU slaves
  • Fix receiving of incorrect queries in write_single and mask_write_register. Thanks to James Nutaro.
  • Check return value of autoreconf. Thanks to Lauri Nurmi.
  • Constant for broacast and test ordering
  • Fix the fix of device string check
  • Various changes to try to improve broken Windows support
  • Try to fix MinGW compilation
  • Portable use of bswap_32
  • Improve support of MacOS X
  • Fix socket value on init/close
  • Returns -1 on invalid mode in modbus_rtu_set_rts
  • Protect all public functions against invalid context
  • Sleep for delay of response timeout before reconnect (closes #77). Thanks to Karl Palsson.
  • Baud rate until 4,000,000 (POSIX), 1,000,000 (Windows) (closes #93)
  • New modbus_get|set_float_dcba to get|set float in inversed byte order
  • Remove unsupported -Wtype-limits for GCC < 4.3.5 (closes #109).
  • Enable out-of-source build. Thanks to Yegor Yefremov.
  • Fix alignment problem on ARMv5 platform
  • Improvement to Debian package. Thanks to Alexander Klauer.
  • Improve support of VS 2005. Thanks to Petr Gladkiy.
  • Add documentation for modbus_mask_write_register (closes #91). Thanks to Martijn de Gouw.
  • Avoid C99 declaration in win32 section code (closes #92). Thanks to oldfaber and endrelovas.
  • Add a windows scripting host configure file. Thanks to oldfaber and Stéphane Raimbault.
  • Fix typo in modbus_strerror documentation. Thanks to Mirko Rajkovaca.
  • Rename reserved C++ keywords of modbus_mask_write_register. Thanks Tobias Doerffel.
  • Another quick workaround for deficient OS (closes #63)
  • Add support for Mask Write Register
  • Fix missing close on socket in random-test-server. Thanks to Damian Zieliński.
  • Use nonblocking sockets on Win32 and OS X/iOS too. Thanks to Julian Raschke.
  • Fix all compilations warnings spotted by new compilation flags
  • Major update of build system
  • Calculate RTS activation time by send length
  • Dynamic memory allocation of device name (closes #11)
  • Add unit tests for modbus_mapping_new
  • Add Visual Studio 2008 project files by oldfaber
  • Fix missing argument in synopsis section of modbus_rtu_set_serial_mode
  • Fix wrong constant names to create version number
  • More compilation fixes for Windows by oldfaber.
  • Fix wrong constant names to create version number. Thanks to Denis Davydov.

All changes w/o attribution by @stephane

v3.0.5

1 year ago

libmodbus v3.0.x branch has been updated to include important fixes from v3.1.1.

  • Fix remote buffer overflow vulnerability
  • Fix receiving of incorrect queries in write_single

v3.0.4

1 year ago
  • autogen.sh creates symlinks instead of copies
  • Add missing m4 directory (closes #103)
  • Fix alignment problem on ARMv5 platform. Thanks to Alexander Dahl.
  • Remove useless test on error_recovery argument. Thanks to Carlos Tangerino.

v3.1.0

1 year ago

OK last year, I've silently released libmodbus v3.1.0 and it's never too late to announce it!

Major changes to handle many slaves in RTU mode, non blocking connections and RTS flow control.

  • Fixes for Microsoft Visual C++ compiler
  • Fixes for Windows. Thanks to oldfaber
  • Return value of _modbus_tcp_pi_connect() on failure (closes )
  • Avoid ioctl call on non-RS485 ports. Thanks to Michael Haberler
  • Display node and service in PI and port in IPv4 at connection
  • Return -1 on getaddrinfo error and print error in debug mode
  • More robust way to establish the connection in non blocking mode
  • TCP - Socket in non blocking mode by default. Thanks to Thomas Stalder
  • Apply CLOEXEC flag for TCP protocol independent too (IPv6)
  • New RTU receive() to ignore confirmation from other slaves (closes #18)
  • Move RTU filtering in CRC check to avoid useless call to modbus_reply
  • Unique transaction identifier by TCP connection
  • Use accept4 with SOCK_CLOEXEC when available (Linux)
  • Open fd and socket with the CLOEXEC flag when available
  • Exception response on report slave ID wasn't detected (closes #27)
  • Provides a way to disable the byte timeout (Alex Stapleton)
  • Added slave ID check for response messages (Alex Stapleton)
  • RTS flow control with modbus_rtu_set_rts and modbus_rtu_get_rts functions by Torello Querci and Stéphane Raimbault.

v3.1.2

1 year ago

This new development release contains new features about server listening and timeout handling.

If you still want to listen any addresses in your TCP IPv4 server, you must now set the IP address to NULL in modbus_new_tcp before listening. Now, modbus_tcp_listen only listen the IP address set in the Modbus context (see documentation).

This release introduces API changes on modbus_get_byte_timeout, modbus_get_response_timeout, modbus_set_byte_timeout, modbus_set_response_timeout to ease writing of language bindings.

  • Rewrite documentation building system
  • Fix timeouts in unit tests
  • Don't flush on illegal address errors in single write functions
  • Fix compilation on compilers not supporting c99 mode. Thanks to Michael Heimpold.
  • Update license for the tests in Debian packaging (#221)
  • Move check of device earlier to avoid a free call
  • Unit test for baud rate check and error message.
  • Fix crash modbus_new_rtu when baud is 0. Thank you to Daniel Schürmann.
  • Removed function prototype without implementation Thank you Andrej Skvortzov.
  • Switch test programs to a BSD license
  • Fix remote buffer overflow vulnerability on write requests
  • Avoid twice connect() in source code (closes #194)
  • Fix compilation with MinGW (GCC 4.8.1) under Win7 (closes #163) Thank you MarjanTomas and SwissKnife.
  • Fix TCP IPv4 modbus_connect() on win32 (closes #100 and #165) Thank you Petr Gladkiy and Marjan Tomas.
  • Fix 24a05ebd3c0 - win32: init of modbus_tcp_pi_listen (#187)
  • INADDR_* macros are defined in host byte order
  • Filter of IP addresses in IPv4 server (closes #190)
  • Allow to listen any hosts in IPv6 (closes #32)
  • Define and public export of MODBUS_MAX_PDU_LENGTH (closes #167)
  • Truncate data from response in report_slave_id to new max arg (closes #167)
  • Fix response timeout modification on connect (closes #80)
  • New API to set/get response and byte timeouts. New unit tests and updated documentation.
  • Export Modbus function codes supported by libmodbus
  • Fix bandwidth-server-one (closes #152)
  • Check debug flag in RTU code
  • Remove warnings caused by shadowed 'index' variable. Thanks to Åke Forslund.
  • Use accept4 in TCP PI if available
  • Add documentation for tcp[_pi]_accept (closes #31)
  • Fix mistake in modbus_tcp_listen documentation
  • Add documentation for modbus_tcp_pi_listen
  • Fix for MinGW and Windows (#144, #169, #175, #180, #181, #187) Thanks to Marjan Tomas.
  • Many other fixes (#134, #157, #158, #183, #184) and improvements.

All changes w/o attribution by @stephane

v3.1.3

1 year ago

Many fixes and improvements on data mapping, float handling and RTS.

The structure modbus_mapping_t has been extended to include the new start addresses (ABI break).

New function: modbus_mapping_new_start_address

  • New bswap macros for Max OSX by Jakob Bysewski.
  • Fix "wildcard address" in TCP IPv6 by Shoichi Sakane.
  • Introduce offsets in modbus mappings with modbus_mapping_new_start_address. Thanks to Michael Heimpold and Stéphane Raimbault.
  • Fix address range in random-test-client. Thanks to Martin Galvan.
  • Add an option to disable tests compilation by Yegor Yefremov.
  • Define MSG_DONTWAIT to MSG_NONBLOCK on AIX (#294). Thanks to Fabrice Cantos.
  • Fix building when byteswap.h is not defined by Tomasz Mon.
  • Add some more macros for data manipulation and documentation.
  • Remove duplicate install of modbus.h (closes #290). Thanks to Daniel Sutcliffe.
  • Move MIGRATION and README.md to dist_doc_DATA target.
  • Change order of few functions in modbus RTU code.
  • Add entries for modbus_rtu_[get|set]_delay in documentation index.
  • Implemented runtime configurable RTS delay by Jimmy Bergström.
  • Add an entry in libmodbus index page for modbus_rtu_set_custom_rts.
  • Add support for user defined RTS toggle function by Jimmy Bergström.
  • Added ILLEGAL_DATA_ADDRESS tests for modbus_write_register[|s]. Thanks to Andrey Skvortsov.
  • Update documentation of modbus_rtu_set_rts
  • Fix rts signal switch time by Hiromasa Ihara.
  • Improve new_rtu and set_slave documentation (related to #276).
  • Fix late check of ctx in modbus_reply[|_exception] (closes #269).
  • Wait the server for 1 second before running tests (help Travis).
  • A libmodbus context isn't thread safe and won't be (closes #246).
  • Fix buffer overflow in modbus_mask_write_register (#265).
  • Minor adjustments to README about AsciiDoc.
  • Export MODBUS_MAX_ADU_LENGTH and documentation (ref #241).
  • Explicit check against Modbus broadcast address.
  • Do not reply on broadcast requests (fixes #153). Thanks to Michael.
  • Add Travis support.
  • Run unit tests with standard: make check (closes #205, closes #238). This patch has been developed by Andrey Skvortsov, Michael Heimpold and Stéphane Raimbault.
  • modbus_send_raw_request: limit request length (fixes #207). Thanks to Hanno Neuer for spotting this security flaw.
  • Add new contributors to AUTHORS
  • Introduce SPDX license identifiers. Thanks to Michael Heimpold.

All changes w/o attribution by @stephane

v3.1.4

1 year ago

Small fixes, Cygwin improvements and fix missing script in tarball

  • C_PROG_RANLIB is rendered obsolete by LT_INIT
  • Improve ifdef around bswap_16 for __CYGWIN__
  • Improve Cygwin support. Thanks to StalderT.
  • Another round of DRY in modbus_reply()
  • Rename raw_rep to raw_rsp in unit-test-client
  • Fix wrong function name in debug message
  • Fix handling of invalid function code (closes #315)
  • Add debug message on unknown function and new unit test
  • DRY in modbus_reply by improving response_exception()
  • Fix typo in 3053bd0adb
  • CID 69145 - Argument cannot be negative in unit-test-server
  • CID 69142 - Unchecked return value in unit-test-server
  • Fix CID 69140 - Bad bit shift operation (coverity) in tests
  • Rewrite and rename README as README.md in tests/
  • Github's contributing and issue template files
  • Fix small leak (64 bytes in TCP) in unit-test-client
  • Add unit-tests.sh to tarball
  • Add ./configure.scan to .gitignore
  • Move setting of option inside the relevant conditional group
  • Add links to new modbus_*_float_* functions in index
  • Slight change to modbus_report_slave_id doc.

v3.1.7

2 years ago

What's Changed

All changes w/o attribution by @stephane.

New Contributors

Full Changelog: https://github.com/stephane/libmodbus/compare/v3.1.6...v3.1.7