百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
E

esp-modbus

> 编程语言
开源

ESP-Modbus - 官方支持的用于 Modbus 协议的库 (串行 RS485 + 通过 WiFi 或以太网进行 TCP 通信)。

193 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

ESP-Modbus - 官方支持的用于 Modbus 协议的库 (串行 RS485 + 通过 WiFi 或以太网进行 TCP 通信)。

ESP-Modbus Library

Overview

An Espressif ESP-Modbus Library (esp-modbus) is a library to support Modbus communication in the networks based on RS485, WiFi, Ethernet interfaces. The Modbus is a data communications protocol originally published by Modicon (now Schneider Electric) in 1979 for use with its programmable logic controllers (PLCs).

  • ESP-Modbus component on GitHub

This library is to be used with Espressif’s IoT Development Framework, ESP_IDF. The packages from this repository are uploaded to Espressif’s component repository.

  • esp-modbus component in component repository

You can add the component to your project via idf.py add-dependency. More information about idf-component-manager can be found in Espressif API guide or PyPi registry.

The ESP-Modbus library can be used with ESP-IDF v5.0 and later. Some ESP-IDF releases include an earlier version of ESP-Modbus library inside freemodbus component. To use ESP-Modbus with these releases, users need to exclude the built-in freemodbus component from the build process, and update application components to depend on esp-modbus component instead. To exclude freemodbus component from compilation, add the following line to the project CMakeLists.txt file:

set(EXCLUDE_COMPONENTS freemodbus)

ESP-IDF v5.x and later releases do not include freemodbus component, so no extra steps are necessary when adding esp-modbus component.

Peculiarities Of Current Release

The current release esp-modbus corresponds to the version v2.x.x (refer to idf_component.yml file) and supports creation of several instances of modbus master and slave objects. The public API interface is changed to allow creation of multiple communication objects with its own communication parameters, and the constructor API returns the handle to the interface structure that must be used as a first parameter for each API call for this particular object. For more information about the interface API and related changes see the official documentation for this release, described below. The goal of this beta release is to introduce new features and changes to the end users and get their feedback. The appropriate information or feature requests can be shared over on discussion page of the project.

  • Discussions
  • Issues

Documentation

The documentation can be found on the link below:

  • ESP-Modbus documentation (English)

Application Examples

The examples below demonstrate the ESP-Modbus library of serial, TCP ports for slave and master implementations accordingly.

  • Modbus Serial slave example

  • Modbus Serial master example

  • Modbus TCP slave example

  • Modbus TCP master example

Please refer to the specific example README.md for details.

Protocol References

  • Modbus Organization with protocol specifications

Contributing

We welcome contributions to this project in the form of bug reports, feature requests and pull requests.

Issue reports and feature requests can be submitted using Github Issues: https://github.com/espressif/esp-modbus/issues. Please check if the issue has already been reported before opening a new one.

Contributions in the form of pull requests should follow ESP-IDF project's contribution guidelines. We kindly ask developers to start a discussion on an issue before proposing large changes to the project.

Licence

The initial ESP-Modbus project was based on FreeMODBUS library, Copyright (c) 2006 Christian Walter and licensed under the BSD 3-clause license.

Modbus Master related code is Copyright (c) 2013 Armink and licensed under BSD 3-clause license.

All original code in this repository is Copyright (c) 2016-2022 Espressif Systems (Shanghai) Co. Ltd.

The project is distributed under Apache 2.0 license. See the accompanying LICENSE file for a copy.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言