Ensuring Proper Initialization of the Network Stack in Zephyr for TCP Client Application #71732
Unanswered
ofirsheruni
asked this question in
Q&A
Replies: 1 comment
-
Can you send your code? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm currently running a TCP client on Zephyr, which connects endlessly to a remote server. The process involves establishing a TCP session, sending a message, closing the session, and then repeating the cycle. However, during the very first attempt to establish a TCP session, I encounter an error stating that the connect() function failed, with the errno returned being -116, representing -ENETDOWN. Only after the first try, do I see logs from the OS indicating that the network stack has initialized:
It seems like that the first connect() attempt occurs before the interface is up, but from the second try everything runs smoothly.
How can I ensure that Zephyr finishes initializing the network stack and configuring the interface before it proceeds to execute applications in the APPLICATION initialization level?
I also tried to use
CONFIG_NET_CONFIG_INIT_TIMEOUT=0
, but it didn't resolve the problem.Thank you in advance,
Ofir.
Beta Was this translation helpful? Give feedback.
All reactions