I am using an ESP8266 with the esp-open-sdk with the C language.
I have tried to use this code to get the timestamp but it is failing everytime - I am only getting 0 :
timestamp = sntp_get_current_timestamp();
os_printf("time : %d and %s\n", timestamp, sntp_get_real_time(timestamp));
As you may have understand from the subject, i am trying to connect to a server to do an https request (i am using the espconn_secure_*** functions) but it is failing everytime.
It may be because of the time (can't authenticate the certificate because of the validity over time) or because of a non-supported protocol. The TLS protocol is used for the secure transaction, the server is using TLSv1.2 and i read on internet that the ESP8266 was only supporting TLSv1.1; Is that right?
Another strange thing is that after i try to establish the tcp connection, i get the timestamp correctly.
You can see next how i am trying to connect to the server - at address 0x70000 there is the CA of the server i am trying to connect the ESP:
Am i using espconn_secure_ca_enable correctly? Am i giving him the correct document to process? Is this function necessary?
Any remarks or commentary are highly appreciated.
Who is online
Users browsing this forum: rfsmartqiao and 2 guests
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
We also have a RTOS version and a MESH version too!
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!