- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I like to enable and change the socket-tcp-keepalive option.
Here is my environments.
- WICED SDK 2.3.1
- ThreadX/NetX Duo, BCMUSI11
Here is my source for <TCP Keep Alive>.
.......................
wiced_tcp_create_socket(&socket_tcp, interface);
nx_tcp_socket_keepalive_enabled = 1;
nx_tcp_socket_keepalive_timeout = 10; // 10Sec
nx_tcp_socket_keepalive_retries = 1;
.......................
But, after this implementation, WICED module didnt send <Keep Alive Packet>.
Is it wrong?
Thanks in advance
Steve
- Labels:
-
TCPIP
- Tags:
- 10sec
- 2.3.1
- 810403
- advance
- bcmusi11
- change
- enable
- environments
- implementation
- interface
- module
- nx_tcp_socket_keepalive_enabled
- nx_tcp_socket_keepalive_retries
- nx_tcp_socket_keepalive_timeout
- option
- send
- socket-tcp-keepalive
- source
- steve
- threadxnetx
- useor
- wiced
- wiced_tcp_create_socket&socket_tcp
- wrong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have same issue with 2.4.x SDK?
Let me know if this is still an issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay..
About this issue, I'll check it and let you know that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like that <tcp_keep_alive feature> is not supported yet.
I just checked the source of WICED SDK 2.4.0.
<Wiced/Network/NetXDuo/wiced/tcpip.c>
............
wiced_result_t wiced_tcp_enable_keepalive(wiced_tcp_socket_t* socket, uint16_t interval, uint16_t probes, uint16_t _time )
{
UNUSED_PARAMETER(socket);
UNUSED_PARAMETER(interval);
UNUSED_PARAMETER(probes);
UNUSED_PARAMETER(_time);
/* Not supported in current version of SDK . TO DO */
return WICED_SUCCESS;
}
............
Could you know me when I can use <tcp_keep_alive feature> in WICED?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi nikvh,
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?
Thank you,
cg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all
Is there any updates for this issue?
As cg said, it worked well as below, but 7200 seconds is very long....
Could you let me know how I change the TCP-Keep-Alive settings?
Regards, Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gangi,
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?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sam.lin
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
FYI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex Yoon,
Thanks a lot for your test report.