descriptionlibmodbus mirror
homepage URLhttp://libmodbus.org/
repository URLhttps://github.com/stephane/libmodbus
ownerkirr@navytux.spb.ru
last changeTue, 22 Oct 2024 14:52:57 +0000 (22 16:52 +0200)
last refreshThu, 21 Nov 2024 07:52:36 +0000 (21 08:52 +0100)
content tags
add:
README.md

A groovy modbus library

Build Status Coverity Scan Build Status

Overview

libmodbus is a free software library to send/receive data with a device which respects the Modbus protocol. This library can use a serial port or an Ethernet connection.

The functions included in the library have been derived from the Modicon Modbus Protocol Reference Guide which can be obtained from www.modbus.org.

The license of libmodbus is LGPL v2.1 or later.

The official website is www.libmodbus.org. The website contains the latest version of the documentation.

The library is written in C and designed to run on Linux, Mac OS X, FreeBSD, Embox, QNX and Windows.

You can use the library on MCUs with Embox RTOS.

Installation

You will only need to install automake, autoconf, libtool and a C compiler (gcc or clang) to compile the library and asciidoc and xmlto to generate the documentation (optional).

To install, just run the usual dance, ./configure && make install. Run ./autogen.sh first to generate the configure script if required.

You can change installation directory with prefix option, eg. ./configure --prefix=/usr/local/. You have to check that the installation library path is properly set up on your system (/etc/ld.so.conf.d) and library cache is up to date (run ldconfig as root if required).

The library provides a libmodbus.pc file to use with pkg-config to ease your program compilation and linking.

If you want to compile with Microsoft Visual Studio, you should follow the instructions in ./src/win32/README.md.

To compile under Windows, install MinGW and MSYS then select the common packages (gcc, automake, libtool, etc). The directory ./src/win32/ contains a Visual C project.

To compile under OS X with homebrew, you will need to install the following dependencies first: brew install autoconf automake libtool.

To build under Embox, you have to use its build system.

Testing

Some tests are provided in tests directory, you can freely edit the source code to fit your needs (it's Free Software :).

See tests/README for a description of each program.

For a quick test of libmodbus, you can run the following programs in two shells:

  1. ./unit-test-server
  2. ./unit-test-client

By default, all TCP unit tests will be executed (see --help for options).

It's also possible to run the unit tests with make check.

To report a bug or to contribute

See CONTRIBUTING document.

Documentation

You can serve the local documentation with:

pip install mkdocs-material
mkdocs serve
shortlog
2024-10-22 Stéphane RaimbaultUpdate comments about old O_NDELAYmaster
2024-10-22 Stéphane RaimbaultTest filesystem provides symlink in autogen.sh (closes...
2024-10-22 Stéphane RaimbaultFix example of modbus_rtu_set_serial_mode (closes ...
2024-10-22 Stéphane RaimbaultUse O_NONBLOCK instead of deprecated O_NDELAY (closes...
2024-10-22 Lars T. KyllingstadDocument macros for error codes corresponding to Modbus...
2024-10-22 Stéphane RaimbaultBump version to 3.1.11v3.1.11
2024-10-22 Stéphane RaimbaultMinor
2024-10-22 Stéphane RaimbaultRTU - Check CRC before filtering on slave ID
2024-10-21 diplfranzhoepfingerHAVE_NETINET_IN_H as guard around header (#765)
2024-10-21 Stéphane RaimbaultUse port 502 instead of 1502 in documentation (closes...
2024-10-21 Stéphane RaimbaultPrepare NEWS file for next release
2024-10-21 Andreas NicolaiRevert "Fix float endianness issue on big endian archit...
2024-10-21 Stéphane RaimbaultFix request length check in modbus_reply in RTU
2024-10-21 Stéphane RaimbaultUpdate .clabot
2024-10-20 Stéphane RaimbaultRemove useless configure checks
2024-10-20 Stéphane RaimbaultDo not build with debug flag active by default
...
tags
4 weeks ago v3.1.11
23 months ago v3.1.10
23 months ago v3.1.9
2 years ago v3.1.8
2 years ago v3.1.7
5 years ago v3.0.8
5 years ago v3.1.6
5 years ago v3.1.5
5 years ago v3.0.7
8 years ago v3.1.4
8 years ago v3.1.3
9 years ago v3.1.2
10 years ago v3.0.6
11 years ago v3.0.5
11 years ago v3.1.1
11 years ago v3.0.4
...
heads
4 weeks ago master
4 months ago win32-configure
4 months ago ascii-support
5 years ago v3.0.X
8 years ago file-record
8 years ago read-device-id
8 years ago compliance
13 years ago v2.0.X