libmodbus base on v3.1.10

Stéphane Raimbault fc73565da7 Fix remote buffer overflow vulnerability (closes #25, #105) 11 anni fa
debian 6952802102 Build Debian debug package for libmodbus 12 anni fa
doc a11805cbfd Explain how to define response timeouts when many RTU slaves 11 anni fa
m4 c83fd17927 Fix m4 warnings from autotools 12 anni fa
src fc73565da7 Fix remote buffer overflow vulnerability (closes #25, #105) 11 anni fa
tests fc73565da7 Fix remote buffer overflow vulnerability (closes #25, #105) 11 anni fa
.dir-locals.el 66c59d6f85 Change indent level from 8 to 4 14 anni fa
.gitignore f47628a051 Ignore autogenerated files for libmodbus-dbg Debian package 12 anni fa
AUTHORS c3993f1552 Add oldfaber to AUTHORS 12 anni fa
COPYING a017c19f2a GNU licenses updated to the version 3. 15 anni fa
COPYING.LESSER 12753875b5 Revert libmodbus licence from LGPLv3 to LGPLv2.1 13 anni fa
MIGRATION 7e673738b6 Minor change about version to MIGRATION 14 anni fa
Makefile.am 134ff0eabe Update references to README.md 12 anni fa
NEWS e48efd3852 Update NEWS file 12 anni fa
README.md 2a9a7ddf84 Improved README file 11 anni fa
acinclude.m4 8513555868 Fix check on file doc/libmodbus.7 in acinclude.m4 (closes #28) 13 anni fa
autogen.sh 1a4fb4eb8e Check return value of autoreconf. Thanks to Lauri Nurmi. 11 anni fa
configure.ac 702d2603b3 Portable use of bswap_32 12 anni fa
libmodbus.pc.in 63871ff304 Add modbus directory to include path of pkg-config file 14 anni fa
libmodbus.spec.in 134ff0eabe Update references to README.md 12 anni fa

README.md

A groovy modbus library

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 Schneider at www.schneiderautomation.com.

The license of libmodbus is LGPL v2.1 or later and the licence of programs in tests directory is GPL v3.

The documentation is available as manual pages (man libmodbus to read general description and list of available functions) or Web pages www.libmodbus.org/documentation/. The documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 (Unported) (http://creativecommons.org/licenses/by-sa/3.0/).

The official website is www.libmodbus.org.

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

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 need to install http://code.google.com/p/msinttypes/ to fill the absence of stdint.h.

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.

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).

Report a Bug

Before reporting a bug, take care to read the documentation (RTFM!) and to provide enough information:

  1. libmodbus version
  2. OS/environment/architecture
  3. libmodbus backend (TCP, RTU, IPv6)
  4. Modbus messages when running in debug mode (man modbus_set_debug)

To report your problem, you can:

If your prefer live talk when your're looking for help or to offer contribution, there is also a channel called #libmodbus on Freenode.