Chapter 2. API Reference
Type Definitions
typedef struct mdns_search_once_s mdns_search_once_t
Asynchronous query handle.
typedef struct
mdns_ip_addr_s
mDNS query linked list IP item
typedef enum
mdns_if_internal
typedef struct
mdns_result_s
mDNS query result structure
typedef void
(*mdns_query_notify_t)(mdns_search_once_t
Enumerations
enum mdns_ip_protocol_t
mDNS enum to specify the ip_protocol type
Values:
MDNS_IP_PROTOCOL_V4
MDNS_IP_PROTOCOL_V6
MDNS_IP_PROTOCOL_MAX
enum mdns_if_internal
Values:
MDNS_IF_STA = 0
MDNS_IF_AP = 1
MDNS_IF_ETH = 2
MDNS_IF_MAX
2.3.11 ESP-Modbus
Overview
The Modbus serial communication protocol is de facto standard protocol widely used to connect industrial electronic
devices. Modbus allows communication among many devices connected to the same network, for example, a system
that measures temperature and humidity and communicates the results to a computer. The Modbus protocol uses
several types of data: Holding Registers, Input Registers, Coils (single bit output), Discrete Inputs. Versions of the
Modbus protocol exist for serial port and for Ethernet and other protocols that support the Internet protocol suite.
There are many variants of Modbus protocols, some of them are:
• Modbus RTU —This is used in serial communication and makes use of a compact, binary representation of
the data for protocol communication. The RTU format follows the commands/data with a cyclic redundancy
check checksum as an error check mechanism to ensure the reliability of data. Modbus RTU is the most
common implementation available for Modbus. A Modbus RTU message must be transmitted continuously
without inter-character hesitations. Modbus messages are framed (separated) by idle (silent) periods. The
RS-485 interface communication is usually used for this type.
• Modbus ASCII —This is used in serial communication and makes use of ASCII characters for protocol
communication. The ASCII format uses a longitudinal redundancy check checksum. Modbus ASCII messages
are framed by leading colon (":") and trailing newline (CR/LF).
• Modbus TCP/IP or Modbus TCP —This is a Modbus variant used for communications over TCP/IP
networks, connecting over port 502. It does not require a checksum calculation, as lower layers already provide
checksum protection.
The following document (and included code snippets) requires some familiarity with the Modbus protocol. Refer to
the Modbus Organization's with protocol specifications for specifics.
Espressif Systems
mdns_ip_addr_t
mdns_if_t
mdns_result_t
621
Submit Document Feedback
*search)
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers