LWIP, FreeRTOS

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LWIP, FreeRTOS

634 次查看
a8Chcx
Contributor V

Hi,

I am using MCUXpresso V11.5 with SDK2.11.0 for FRDM-K66F...

I tried https client and works fine. When I do more testing, I found my application struck @lwip_recv_from function if my network disconnected. I checked LWIP function, I am using blocking call from LWIP.

1. Can anyone tell me how to use no-blocking lwip_recv in stead of blocking call?

2. I am using "connect()" and it will take about 20s to see failed if there is no network cable connected. Can I change the timeout for 2s because the real connection is less than 1s?

Thanks,

Christie

 

0 项奖励
2 回复数

600 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi @a8Chcx 

 

It is possible to use non-blocking lwip_recv.

You need to enable LWIP_SO_RCVTIMEO in lwipopts.h

Please refer to below link for more details.

https://lwip.fandom.com/wiki/Netconn_receive_timeout

 

Regards

Daniel

0 项奖励

598 次查看
a8Chcx
Contributor V

Hi Daniel,

 

Thanks.

It works fine.

Can you tell me how to change the delay for connect()? For now, it will take around 30s to get failed, that is too long...

Thanks,

Christie

 

标记 (1)
0 项奖励