descriptionlibmodbus mirror
homepage URLhttp://libmodbus.org/
repository URLhttps://github.com/stephane/libmodbus
ownerkirr@navytux.spb.ru
last changeThu, 15 Feb 2024 16:01:41 +0000 (15 17:01 +0100)
last refreshFri, 3 May 2024 21:16:25 +0000 (3 23:16 +0200)
content tags
add:
README.md

A groovy modbus library

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-02-15 Stéphane RaimbaultAdd polar.sh to FUNDINGmaster
2024-01-24 Stéphane RaimbaultMinor to docs
2024-01-24 Stéphane RaimbaultFree addrinfo struct on getaddrinfo() errors
2023-11-06 Stéphane RaimbaultFix doc of modbus_mapping_new_start_address (#615)
2023-01-09 Stéphane RaimbaultUpdate CLA
2022-12-12 Michael Heimpolddocs: small re-wordings, fix various small typos and...
2022-12-07 Stéphane RaimbaultBump version to 3.1.10v3.1.10
2022-12-07 Stéphane RaimbaultRemove fuzzing action in waiting for a fix
2022-12-07 Stéphane RaimbaultFix setting baud rate for Linux (partial revert of...
2022-12-07 Stéphane RaimbaultSplit POSIX and Windows RTU connect functions
2022-12-03 20162026fix modbus quirks function definition
2022-12-03 Stéphane RaimbaultBump version to 3.1.9v3.1.9
2022-11-28 Stéphane RaimbaultAdjust fuzzing to run on main branch only
2022-11-28 Stéphane RaimbaultFix wrong close on recent commit 5a6efec
2022-11-28 Stéphane RaimbaultConvert a few int to unsigned int (#402)
2022-11-28 David KorczynskiAdd CIFuzz Github action
...
tags
16 months ago v3.1.10
17 months ago v3.1.9
20 months ago v3.1.8
2 years ago v3.1.7
4 years ago v3.0.8
4 years ago v3.1.6
4 years ago v3.1.5
4 years ago v3.0.7
7 years ago v3.1.4
7 years ago v3.1.3
9 years ago v3.1.2
10 years ago v3.0.6
10 years ago v3.0.5
10 years ago v3.1.1
10 years ago v3.0.4
11 years ago v3.1.0
...
heads
2 months ago master
2 years ago ascii-support
4 years ago v3.0.X
7 years ago file-record
7 years ago read-device-id
7 years ago compliance
12 years ago v2.0.X