• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

build-aux/H31-Jul-2019-16,67412,430

doc/H03-May-2022-794705

m4/H31-Jul-2019-9,0828,208

src/H03-May-2022-5,9164,458

tests/H03-May-2022-3,2552,544

AUTHORSH A D31-Jul-2019336 88

COPYING.LESSERH A D26-Oct-201725.9 KiB503418

MIGRATIONH A D26-Oct-20171.7 KiB5435

Makefile.amH A D31-Jul-2019307 1712

Makefile.inH A D03-May-202229.6 KiB930829

NEWSH A D31-Jul-201922.2 KiB559487

README.mdH A D31-Jul-20193.2 KiB9061

acinclude.m4H A D31-Jul-20191.5 KiB3027

aclocal.m4H A D31-Jul-201941.1 KiB1,1421,037

config.h.inH A D31-Jul-20196.3 KiB230164

configureH A D31-Jul-2019608.2 KiB20,06316,946

configure.acH A D31-Jul-20194.8 KiB182157

libmodbus.pc.inH A D26-Oct-2017201 119

README.md

1A groovy modbus library
2=======================
3
4[![Build Status](https://travis-ci.org/stephane/libmodbus.svg?branch=master)](https://travis-ci.org/stephane/libmodbus)
5
6Overview
7--------
8
9libmodbus is a free software library to send/receive data with a device which
10respects the Modbus protocol. This library can use a serial port or an Ethernet
11connection.
12
13The functions included in the library have been derived from the Modicon Modbus
14Protocol Reference Guide which can be obtained from [www.modbus.org](http://www.modbus.org).
15
16The license of libmodbus is *LGPL v2.1 or later*.
17
18The documentation is available as manual pages (`man libmodbus` to read general
19description and list of available functions) or Web pages
20[www.libmodbus.org/documentation/](http://libmodbus.org/documentation/). The
21documentation is licensed under the Creative Commons Attribution-ShareAlike
22License 3.0 (Unported) (<http://creativecommons.org/licenses/by-sa/3.0/>).
23
24The official website is [www.libmodbus.org](http://www.libmodbus.org).
25
26The library is written in C and designed to run on Linux, Mac OS X, FreeBSD and
27QNX and Windows.
28
29Installation
30------------
31
32You will only need to install automake, autoconf, libtool and a C compiler (gcc
33or clang) to compile the library and asciidoc and xmlto to generate the
34documentation (optional).
35
36To install, just run the usual dance, `./configure && make install`. Run
37`./autogen.sh` first to generate the `configure` script if required.
38
39You can change installation directory with prefix option, eg. `./configure
40--prefix=/usr/local/`. You have to check that the installation library path is
41properly set up on your system (*/etc/ld.so.conf.d*) and library cache is up to
42date (run `ldconfig` as root if required).
43
44The library provides a *libmodbus.pc* file to use with `pkg-config` to ease your
45program compilation and linking.
46
47If you want to compile with Microsoft Visual Studio, you need to install
48<https://github.com/chemeris/msinttypes> to fill the absence of stdint.h.
49
50To compile under Windows, install [MinGW](http://www.mingw.org/) and MSYS then
51select the common packages (gcc, automake, libtool, etc). The directory
52*./src/win32/* contains a Visual C project.
53
54To compile under OS X with [homebrew](http://mxcl.github.com/homebrew/), you
55will need to install the following dependencies first: `brew install autoconf
56automake libtool`.
57
58Documentation
59-------------
60
61The documentation is available [online](http://libmodbus.org/documentation) or
62as manual pages after installation.
63
64The documentation is based on
65[AsciiDoc](http://www.methods.co.nz/asciidoc/).  Only man pages are built
66by default with `make` command, you can run `make htmldoc` in *doc* directory
67to generate HTML files.
68
69Testing
70-------
71
72Some tests are provided in *tests* directory, you can freely edit the source
73code to fit your needs (it's Free Software :).
74
75See *tests/README* for a description of each program.
76
77For a quick test of libmodbus, you can run the following programs in two shells:
78
791. ./unit-test-server
802. ./unit-test-client
81
82By default, all TCP unit tests will be executed (see --help for options).
83
84It's also possible to run the unit tests with `make check`.
85
86To report a bug or to contribute
87--------------------------------
88
89See [CONTRIBUTING](CONTRIBUTING.md) document.
90