Checklist
How often does this bug occurs?
always
Expected behavior
During initialization of a Modbus Master, the port value set in .tcp_opts.port in the mb_communication_info_t struct is used.
Actual behavior (suspected bug)
The value of CONFIG_FMB_TCP_PORT_DEFAULT is used
Error logs or terminal output
Steps to reproduce the behavior
- Set
CONFIG_FMB_TCP_PORT_DEFAULT to port X
- When initializing a Modbus master, set
mb_communication_info_t.tcp_opts.port to port Y
- Open a TCP server on port X and observe that packets are arriving there
Project release version
v2.1.1
System architecture
ARM 64-bit (Apple M1/M2, Raspberry Pi 4/5)
Operating system
MacOS
Operating system version
Sequoia 15.6.1
Shell
ZSH
Additional context
No response