STM32H745: unable to open 2 sockets at the same time #64875
-
Hello community ! I'm writing an application that need to open multiple sockets at the same time. I'm using One sockets is fine (http client connecting to a server using TLS, port 443), but then I'm not able to open a new socket. I need to close the first one and wait a bit to permit a second socket to be used. I don't know at all which settings I should modify, I have already checked at the menuconfig but don't find anything related to this in the Networking or STM32 Ethernet Driver sections. Thanks for any ideas that may help! Joel |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 3 replies
-
Please check the values of following options
The issue is probably related to one of those options to be too small. Note that one TLS connection uses two sockets so you might hit a limit. I suspect the |
Beta Was this translation helpful? Give feedback.
-
Thanks @jukkar for the quick answer to this topic! All these values were the default, so:
Just to give more details about this, I added an errno log, and the exact error is Joel |
Beta Was this translation helpful? Give feedback.
-
Following reading #38191 I have also increased the followings: CONFIG_NET_BUF_RX_COUNT=64 But still no progress so far :-( |
Beta Was this translation helpful? Give feedback.
-
Hmm, perhaps this is related to TLS. Can you try without TLS, do you get the same result? |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
@jukkar maybe you know is there a good tutorial somewhere to perform debugging ? I mean something official supported by Zephyr. If i go step by step probably I can catch the error when this occurs. I found several vscode information but plenty of them outdated or too much specific, not succeed to use it properly :( |
Beta Was this translation helpful? Give feedback.
-
@jukkar I just increased By the way, 100000 looks very large and 60000 was already very large. Any advice to configure this ? I will check in parallel other topics about this setting, I need more documentation about that, if no information found I will open anew discussion. |
Beta Was this translation helpful? Give feedback.
@jukkar I just increased
CONFIG_MBEDTLS_HEAP_SIZE=100000
(with no real hope this can fix the issue to be honest), and it's now working properly ! i have also setCONFIG_POSIX_MAX_FDS=16
.By the way, 100000 looks very large and 60000 was already very large. Any advice to configure this ? I will check in parallel other topics about this setting, I need more documentation about that, if no information found I will open anew discussion.