Hi,
I'm working with the DA16200 Dialog Semiconductor kit and I have configured DA16200 as a TLS server using the example project "tls_server_sample".
".
The setup currently handles one client using mbedtls_net_accept() and mbedtls_ssl_handshake() functions.
() functions
However, I'd like to understand how to detect more than one TPC/IP client connection . Specifically:
How can I detect when a second client tries to connect to the server?
What's the best way to queue or reject additional connections once one client is active?
If it is allowed only one TLS client at a time, what's the recommended method to enforce that?
Hi DonatoC,Thank you for posting your question online.The DA16200 as a TCP Server can support up to 7 TCP clients.
The DA16200 supports TLS v1.2
DonatoC said:I have configured DA16200 as a TLS server using the example project "tls_server_sample".
Please refer on UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide on section 12.1.1.1 TLS ServerHowever, let me check with the Wi-Fi team if this can be changed via SW.Best Regards,OV_Renesas
thank you for your support.
My question specifically concerns the mechanism for detecting when a client connects to the TCP server.
In the provided tls_server_sample.c example, the TLS handshake is initiated with mbedtls_net_accept() and mbedtls_ssl_handshake() ; however, the actual point where a new TCP client connection is accepted by the server via accept() or similar is not clearly distinguishable or externally hookable for event notification.
tls_server_sample.c
() ;
accept()
How to detect when a client connect to the DA16200 server? For example, is there a callback or flag I can monitor before or during mbedtls_net_accept() to handle multiple connections or manage connection sessions?
mbedtls_net_accept()
Hi DonatoC,Thank you for the reply and apologies for the delay but I was OOO.The steps for TLS session:
but from my understanding, you want to manage the connection sessions.. so this kind of steps could be available. this is based on the mbedtls example.mbedtls/programs/ssl/ssl_pthread_server.c at development · Mbed-TLS/mbedtls
To check in detail what could be available for you to check the client connection, this log may be helpful..
[2025-06-12 15:28:23.753] Waiting for a remote connection...................................... //Ssl_srv.c (core\system\src\crypto\mbedtls) [2025-06-12 15:28:39.286] mbedtls_ssl_handshake:6836: => handshake [2025-06-12 15:28:39.286] [2025-06-12 15:28:39.286] mbedtls_ssl_handshake_server_step:3977: server state: 0 [2025-06-12 15:28:39.286] [2025-06-12 15:28:39.286] mbedtls_ssl_flush_output:2582: => flush output [2025-06-12 15:28:39.286] [2025-06-12 15:28:39.286] mbedtls_ssl_flush_output:2594: <= flush output [2025-06-12 15:28:39.286] [2025-06-12 15:28:39.286] mbedtls_ssl_handshake_server_step:3977: server state: 1 [2025-06-12 15:28:39.286] [2025-06-12 15:28:39.286] mbedtls_ssl_flush_output:2582: => flush output [2025-06-12 15:28:39.286] [2025-06-12 15:28:39.286] mbedtls_ssl_flush_output:2594: <= flush output [2025-06-12 15:28:39.302] [2025-06-12 15:28:39.302] ssl_parse_client_hello:1199: => parse client hello [2025-06-12 15:28:39.302] [2025-06-12 15:28:39.302] mbedtls_ssl_fetch_input:2374: => fetch input [2025-06-12 15:28:39.302] [2025-06-12 15:28:39.302] mbedtls_ssl_fetch_input:2531: in_left: 0, nb_want: 5 [2025-06-12 15:28:39.349] Performing the TLS handshake...################################ [2025-06-12 15:28:39.302] mbedtls_ssl_fetch_input:2531: in_left: 0, nb_want: 5
Please also note that DA16200 configured as TLS server can support up to 2 TLS clients.Best Regards,OV_Renesas
debug_sdk.zip