AVSystem / Anjay

C implementation of the client-side OMA LwM2M protocol
Other
188 stars 68 forks source link

How to session with lwm2m server using mbedtls? #27

Closed Soohyun-Hong closed 4 years ago

Soohyun-Hong commented 5 years ago

Hi,

I want to session with server using mbedtls.

//Source code result = mbedtls_ssl_handshake(get_context(socket)); LOG(ERROR, "mbedtls_ssl_handshake retun : %d", result); //(I added log for debugging.)

// Error log result is -26880 result is -26880 result is -26880 result is -26880 result is -26880 result is -26880 result is -26624

//#define MBEDTLS_ERR_SSL_WANT_READ -0x6900 /*< No data of requested type currently available on underlying transport. / //#define MBEDTLS_ERR_SSL_TIMEOUT -0x6800 /*< The operation timed out. /

  1. Has anyone had a experience before?
  2. Do I need to add more code?

I wonder if you can help me.

Regards, Sean

kFYatek commented 5 years ago

The MBEDTLS_ERR_SSL_WANT_READ result is normal, that's why we're not logging it every time. The MBEDTLS_ERR_SSL_TIMEOUT is pretty self-explanatory - the client did not receive any response from the server in time.

What server are you trying to connect to? Are you sure that it is up and that the DTLS connector listens on the same port that you have configured on the client (usually 5684)?

kFYatek commented 4 years ago

This issue is almost a year old now, I'm assuming that the problem has been resolved. I'm closing this for now.