Skip to main content
Associate II
July 2, 2026
Question

LWIP Receive Timeout

  • July 2, 2026
  • 1 reply
  • 51 views

Hi guys, 

I’m using lwip libray with netconn api on stm32h7, I want to enable the receive timeout using netconn_set_recvtimeout method. In order to do that LWIP_SO_RECVTIMEO macro should be set to 1 (default value is 0). There is no LWIP_SO_RECVTIMEO macro in the LWIP section of the .ioc file.

How can I configure it ? Shoudl I set another macro in the .ioc or should I change LWIP_SO_RECVTIMEO value in the header file ?

 

1 reply

ST Employee
July 9, 2026

Hello ​@bsp,

Thank you for your report.

You can enable LWIP_SO_RCVTIMEO in CubeMX by checking “Show Advanced Parameters”.
Then, you will find this option under Thread Safe APIs → Socket Options.

 

With Regards,

If your question is answered, please close this topic by clicking ""Accept as Solution"".