LWIP, FreeRTOS

cancel
Showing results for 
Search instead for 
Did you mean: 

LWIP, FreeRTOS

190 Views
a8Chcx
Contributor IV

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 Kudos
2 Replies

156 Views
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 Kudos

154 Views
a8Chcx
Contributor IV

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

 

Tags (1)
0 Kudos