2023-05-26 04:41 AM
I'm using the example for ModbusF429TCP from a GitHub repo for Modbus and get the following error: undefined reference to 'netconn_set_sendtimeout' I'm unfortunately still very new to STM32 and that's why I'm slightly overwhelmed now
GitHub repo is Modbus-STM32-HAL-FreeRTOS/Examples/ModbusF429TCP at master · alejoseb/Modbus-STM32-HAL-FreeRTOS · GitHub
2024-01-27 12:22 PM
I encountered the same error when compiling a project with the MODBUS-LIB library
My solution is put to <project>/LWIP/Target/lwipopts.h
#define LWIP_SO_SNDTIMEO 1
#define LWIP_SO_RCVTIMEO 1
On another forum library author Alejandro Mera (3 years ago) answered:
You have to enable the timeout APIs of LWIP for RX and TX in the option file, otherwise the system gets stuck when a TX or RX fails.
For example:
Modbus-STM32-HAL-FreeRTOS/Examples/ModbusF429TCP/Middlewares/Third_Party/LwIP/src/include/lwip/opt.h