# stephane/libmodbus

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

Repository: https://github.com/stephane/libmodbus
Canonical: https://ross.abutalabs.com/products/libmodbus
Homepage: http://libmodbus.org
Language: C
License: LGPL-2.1
License Family: copyleft
Topics: modbus, libmodbus, c, automation
Last push: 2026-07-02T10:16:05+00:00

## Health v2 (maintenance only)
Score: 81/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 90, release rhythm 59, longevity 100
- inputs: {"age_days": 6068, "days_push": 62, "days_rel": 62, "gap_med": 308.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4239, forks 1950 (observed 2026-08-28T04:08:39.607995+00:00)

## What it is
libmodbus is a free, dependency-free C library for sending and receiving data with devices that speak the Modbus protocol over serial (RTU) or Ethernet (TCP). It runs on Linux, macOS, FreeBSD, QNX, Windows, and even MCUs via the Embox RTOS.

## Use cases
- communicate with a Modbus RTU device over a serial port
- read registers from a PLC over Modbus TCP
- implement a Modbus server/slave in C
- integrate industrial sensors into a Linux application
- poll Modbus devices on an embedded MCU
- build a Modbus master client for Windows

## When to choose
- you need a mature, well-audited, dependency-free C implementation of Modbus
- you need cross-platform RTU and TCP support including embedded targets
- you want a library packaged in major Linux distributions with good documentation

## When to avoid
- you need protocols beyond Modbus (e.g. CANopen, EtherCAT, PROFINET)
- you want a high-level managed-language binding without writing C
- LGPL-2.1 licensing constraints are unacceptable for your product (consider the commercial promodbus license instead)

## Facets
- artifact type: library
- maturity: stable
- function: sdk, networking, developer-tools
- domain: iot, embedded-systems, developer-tools
- platform: windows, bsd, cross-platform, c, embedded
- tags: modbus, rtu, modbus-tcp, serial-communication, industrial-automation, plc, scada, automation, linux, macos

## Member repositories
- stephane/libmodbus (main) score 81

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:39.607995+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:22:16.106663+00:00, confidence not recorded.
  - readme: https://github.com/stephane/libmodbus (fetched 2026-08-28T04:08:39.607995+00:00, sha dddac3ecc487)
  - homepage: http://libmodbus.org (fetched 2026-08-29T09:12:03.080444+00:00, sha ba63636b00d2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
