1 Star 0 Fork 0

NightBreeze/modbus-esp8266

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Modbus\TCP Security Example

Target Platforms:

  • ESP8266 (CLient/Server)
  • ESP32 (Client only)

Sample certificates

cert.cmd Script to recreate all the certificates in the catalog. Requires OpenSSL installed.

Good issue explanation to read

Client

bool connect(const char* host, uint16_t port, const char* client_cert = nullptr, const char* client_private_key = nullptr, const char* ca_cert = nullptr);
bool connectWithKnownKey(IPAddress ip, uint16_t port, const char* client_cert = nullptr, const char* client_private_key = nullptr, const char* key = nullptr);
  • const char* host Host name to connect to
  • uint16_t port Host port
  • const char* client_cert Client's certificate
  • const char* client_private_key Client's private key
  • const char* ca_cert Certificate of CA. Can be omitted (or set NULL) to escape certificate chain verifying.
  • IPAddress ip Host IP address to connect to
  • const char* key Server's public key

All certificates must be in PEM format and can be stored in PROGMEM.

Server

void server(uint16_t port, const char* server_cert = nullptr, const char* server_private_key = nullptr, const char* ca_cert = nullptr);
  • uint16_t port Port to bind to
  • const char* server_cert Server certificate in PEM format.
  • const char* server_private_key Server private key in PEM format.
  • const char* ca_cert Certificate of CA.

All certificates must be in PEM format and can be stored in PROGMEM.

Modbus Library for Arduino

ModbusRTU, ModbusTCP and ModbusTCP Security

(c)2020 Alexander Emelianov

The code in this repo is licensed under the BSD New License. See LICENSE.txt for more info.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/d__xin/modbus-esp8266.git
git@gitee.com:d__xin/modbus-esp8266.git
d__xin
modbus-esp8266
modbus-esp8266
master

搜索帮助