Do you have same issue with 2.4.x SDK?
Let me know if this is still an issue.
About this issue, I'll check it and let you know that.
It looks like that <tcp_keep_alive feature> is not supported yet.
I just checked the source of WICED SDK 2.4.0.
wiced_result_t wiced_tcp_enable_keepalive(wiced_tcp_socket_t* socket, uint16_t interval, uint16_t probes, uint16_t _time )
/* Not supported in current version of SDK . TO DO */
Could you know me when I can use <tcp_keep_alive feature> in WICED?
Attached is a 7zip with new NetX and NetX_Duo libraries that have been rebuilt with NX_TCP_ENABLE_KEEPALIVE defined. This turns on TCP keep alive for every TCP connection by default and cannot be turned off. There is no need to call wiced_tcp_enable_keepalive().
Can you please try these new libraries to see if they solve the problem.
I am testing using your library. But it is not well.
Could you let me know about keep alive interval, keep alive probes and keep alive time value?
I have successfully used the above libraries to get TCP keepalive messages at two hour intervals, which from looking at the NetX_Duo UG, is the default setting. I would like to change the time and retry settings, but neither the pre-processor macros as described in the UG, nor the variables ssekim points out above seem to change these settings. Is there any way to change them without having you recompile the NetX_Duo library?
Agree 7200 may be a bit long, however; this setting is hard coded into NetX.
It is not possible to override since it is reset with every ACK.
So, this would need modification the source code, and as you know we are only allowed to provide binaries for NetX_Duo.
We will consider the side effects of making that a variable in the future. This will allow you to set it at compile time.
In the meantime use probably use FreeRTOS and LWIP, to do what you need. Is this an option?
How is the TCP keep alive support status for NetX/NetX_Duo in sdk-3.1?
Does sdk-3.1 has TCP keep alive support enable for NetX/NetX_Duo?
Does wiced_tcp_enable_keepalive() work for NetX/NetX_Duo in sdk-3.1?
For tcp keep_alive, I have tested and got following result
// result = wiced_tcp_enable_keepalive( &( para_data->socket ), ex_ptr_dct_app->tcp_keep_alive_interval, ex_ptr_dct_app->tcp_keep_alive_probes, ex_ptr_dct_app->tcp_keep_alive_time );
//result = wiced_tcp_enable_keepalive( &( para_data->socket ), 2, 2,2);
result = wiced_tcp_enable_keepalive( &( para_data->socket ), 10, 3,10);
In SDK 3.1.1 tcp_keep_enable_keepalive is working
alive_interval : seems to work
alive_time : seems to work
alive_probe : seems not working properly
while enable tcp_keep_alive enabled, when remote server socket closed,
tcp_disconnect_callback is invoked almost 120 seconds,
so keep_alive is not working with probe count, it seems to goes with maximum 120 seconds
Hi Alex Yoon,
Thanks a lot for your test report.