I am trying to make HTTPS GET/POST requests to the following server using AT commands.
AT+CIPSTART="TCP","54.166.71.140 ",443
I get errors when i use port 443 but on port 80 the requests are successful.
How can i get around this issue ? what could be potential solutions ?
-
read the reference, pleaseJuraj– Juraj ♦2020年12月10日 12:29:00 +00:00Commented Dec 10, 2020 at 12:29
-
1are you referring to this docuement ? docs.espressif.com/projects/esp-at/en/latest/AT_Command_Set/…omkar joglekar– omkar joglekar2020年12月10日 12:31:48 +00:00Commented Dec 10, 2020 at 12:31
-
1it depends. that is for AT 2.1. for AT 1.7 this espressif.com/sites/default/files/documentation/…Juraj– Juraj ♦2020年12月10日 12:35:07 +00:00Commented Dec 10, 2020 at 12:35
1 Answer 1
HTTPS requires that you make an SSL connection not a TCP connection. To do that you need to use
AT+CIPSTART="SSL","54.166.71.140 ",443
You also need to configure SSL itself.
However the SSL support is not great and struggles with some sites (no SNI support by all accounts).
So you're better off programming the ESP8266 directly with your own sketch to make any HTTPS requests and process the data for you.
-
1How do i configure the SSL, is there any reference ?omkar joglekar– omkar joglekar2020年12月10日 12:32:35 +00:00Commented Dec 10, 2020 at 12:32
-
1From the examples I've seen it looks like it's just setting the SSL buffer size. There's configuration commands but I haven't seen them being used.Majenko– Majenko2020年12月10日 12:33:29 +00:00Commented Dec 10, 2020 at 12:33
-
1That solved it :) the buffer size was 2048 by defaultomkar joglekar– omkar joglekar2020年12月10日 15:46:04 +00:00Commented Dec 10, 2020 at 15:46