So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Vincent_Vbs
#85911 Trouble to establish connection are not related to Mqtt as I though.
I found that use of espconn_tcp_set_max_con_allow(&esp_conn, 1);
when using esp as TCP server in a first period of time will impact establishing connection to the server (running this time as client) in the second period of time.
Now I added in the uninit of my TCP server :
espconn_tcp_set_max_con_allow(&esp_conn, espconn_tcp_get_max_con()); // solve troubles to establish connection as client
User avatar
By davydnorris
#85917 As mentioned before, try to increase your SSL memory using:

espconn_secure_set_size(ESPCONN_CLIENT, size);

Try size of 4096 or 5192 and see if it works, then decrease until it doesn't.
User avatar
By Vincent_Vbs
#85960 I already use 5192.
Then I tried values 6000 and 10240 and get following :

Code: Select allvalue 6000
client handshake start.
espconn_mbedtls.c 652, type[RootCertificate.cer],length[969]
E:M 528
client handshake failed!
Reason:[-0x4290]
user_esp_platform_recon_cb, (user_esp_platform.c, #1981) : user_esp_platform_recon_cb err 46


value 10240
client handshake start.
espconn_mbedtls.c 652, type[RootCertificate.cer],length[969]
client handshake failed!
Reason:[-0x7200]
user_esp_platform_recon_cb, (user_esp_platform.c, #2062) : user_esp_platform_recon_cb err -114

Any idea ?
In fact this error appears in a specific build. I met one time and backup the project folder to investigate more but I don t think something relevant cause this in my development.

What is the meaning of the number after "E:M" ? Also I already met "E:M 0". At which error code / source refer the previous [-0x4290] and [-0x7200] ?
Thank to everybody
User avatar
By davydnorris
#85962 Ah actually what SDK release are you using??

There is a bug in the most recent SDK builds caused by some changes they made a in October last year. You may be hitting that problem