Chapter 2. API Reference
E (1692332) MB_CONTROLLER_MASTER: mbc_master_get_parameter(111): SERIAL master
parameter failure error=(0x107) (ESP_ERR_TIMEOUT).
→
ErrorDescription
0x106 ESP_ERR_NOT_SUPPORTED
- Invalid register request - slave
returned an exception because
the requested register is not
supported.
0x107 ESP_ERR_TIMEOUT - Slave
response timeout - Modbus
slave did not send response dur-
ing configured slave response
timeout.
0x108 ESP_ERR_INVALID_RESPONSE
- Received unsupported re-
sponse from slave or frame
check failure. Master can not
execute
command
because the command is either
not supported or is incorrect.
0x103 ESP_ERR_INVALID_STATE
- Critical failure or FSM se-
quence failure or master FSM
is busy processing previous
request.
Application Example
The examples below use the FreeModbus library port for serial TCP slave and master implementations accordingly.
The selection of stack is performed through KConfig menu option"Enable Modbus stack support ... " for appropriate
communication mode and related configuration keys.
•
protocols/modbus/serial/mb_slave
•
protocols/modbus/serial/mb_master
•
protocols/modbus/tcp/mb_tcp_slave
•
protocols/modbus/tcp/mb_tcp_master
Please refer to the specific example README.md for details.
Protocol References
• https://modbus.org/specs.php: Modbus Organization with protocol specifications.
API Reference
Header File
•
components/freemodbus/common/include/esp_modbus_common.h
Espressif Systems
Table 11: Table 5 Modbus error codes and troubleshooting
Possible solution
Refer to slave register map. Check the master data dictionary for cor-
rectness.
Measure and increase the maximum slave response timeout idf.py menu-
config,
option CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND.
Check physical connection or network configuration and make
sure that the slave response can reach the master side.
application has some high performance tasks with higher prior-
ity than
CONFIG_FMB_PORT_TASK_PRIO
to place Modbus tasks on the other core using an option
FIG_FMB_PORT_TASK_AFFINITY. Configure the Modbus task's
priority
CONFIG_FMB_PORT_TASK_PRIO
sufficient processing time to handle Modbus stack events.
Check the physical connection then refer to register map of your slave to
configure the master data dictionary properly.
handler
Make sure your physical connection is working properly. Increase task
stack size and check Modbus initialization sequence.
Submit Document Feedback
632
get␣
If the
it is recommended
CON-
to ensure that the task gets
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?