Hi,
I currently have a working project with BG96, embed TLS and LWM2M.
I'm investigating some problems that occur when the connectivity is interrupted during TLS handshake.
If interruption happens, I use coap_security_destroy() to clear the session and call lwm2m_bootstrap() after that.
Most of the times this is ok and everything recovers just fine.
But when you interrupt the connectivity between specific packets during TLS handshake, it looks like mbed does not initiate a new TLS session.
I want to know if I need more than coap_security_destroy() to clear all TLS remnants?
What I also see in the log is that the ssl->state does not go beyond state 2, which is MBEDTLS_SSL_SERVER_HELLO (normally it goes beyond 15).
Most ssl functions also return MBEDTLS_ERR_SSL_CONN_EOF but I think it's just a waiting state, waiting for new data?
I do not know how to enable MBEDTLS logging. I just put printf statements in the SDK16 files such as ssl_tls.c and ssl_cli.c
If I look at the tcpdump, I do not see any new packets being send from the NRF (client) to the server after the interruption.
How do I enable mbedtls logging?