cancel
Showing results for 
Search instead for 
Did you mean: 

Is the Keep Alive feature in AZURE RTOS NetX working or not?

Eakyo.1
Associate III

Hello,

I am using an STM32H5 series processor in my project and running Azure RTOS NetX on it. I have enabled the Keep Alive feature as shown in the image below. However, when I checked with Wireshark, I could not see the Keep Alive packets as expected.

To assist with troubleshooting, I am sharing the debug values and an image showing that Keep Alive is enabled.

Do you think the Keep Alive feature is working correctly? If not, what could be the reason?

cubemx.png

debug.PNG

wireshark.PNG

5 REPLIES 5
STea
ST Employee

Hello @Eakyo.1 ,

This issue was addressed in this thread How to tune azure netxduo to receive more incoming... - STMicroelectronics Community.


Regards

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
nouirakh
ST Employee

Hello @Eakyo.1 

If Keep Alive is enabled, periodic Keep Alive packets are sent to check the connection. If there is no response after a certain number of probes, the connection is considered dead and the local socket is closed.
You must consider that Keep Alive packets are not sent continuously: they are sent after a period of inactivity defined by the Keep Alive interval, make sure that you have waited long enough for the Keep Alive packets to be sent according to your configuration. Another point, sometimes network equipment or firewalls can drop Keep Alive packets. Make sure your network setup is free of such interference.

Hello @STea ,

It's not the same problem, this is actually related to Keep Alive.

Regards

 

 

 

 
 

 

 

@Hello @nouirakh ,

Thank you very much for your response.

If we reduce the Keep Alive Timeout value to seconds (currently it is 7200, which is 2 hours), would we expect the Keep Alive messages to drop more quickly? I can monitor TCP packets with Wireshark, but I can't see the Keep Alive messages.

Regards

nouirakh
ST Employee

Hello @Eakyo.1 

A shorter keep alive timeout means the system will send keep alive probes more often.
However, keep in mind that TCP keep-alive packets are not easily distinguishable in Wireshark because they are essentially empty TCP packets with no data payload. They might not even be captured unless there is an issue with the connection, you can use filters in Wireshark to show only TCP packets with the ACK flag set and no data payload, which may help identify keep-alive packets. I can think also of Keep alive settings because they are often configured at the system level and may require administrative privileges to change so, ensure that the settings are correctly applied and that the system is configured to allow keep alive packets to be sent.
Finlay If you've adjusted the Keep Alive Timeout and are monitoring with Wireshark but not seeing the keep-alive packets, ensure that the keep alive settings are correctly applied at both ends of the connection and the connection is truly idle Link.