AT+CIPSTART With SSL only working for some websites
Posted: Fri Feb 24, 2017 11:04 pm
I am running into an interesting (and very annoying) problem. I am attempting to post to an Amazon API Gateway (REST). Like most REST services it requires the use of HTTPS. The code works with some websites but not others. I am using the latest AT command set on an ESP8266 WROOM-02.
I am sending the chip the following commands. The commands are successful with some sites, but apparently not with the one I am trying to test (app.sniffergps.com). They do however work when the web address is http://www.posttestserver.com and google.com. sparkfun.com and cnn.com also fail.
What am I doing wrong, and how can I make this work with my website?
This is what I am sending and receiving:
We have also tried
------UPDATE----------
I found out through sniffing the packets when the command AT+CIPSTART was issued that I was receiving a Handshake Failed (40) error.
Apparently this chip does not support SNI, and that is causing the server to error.
Does anyone know if there is a way to make this chip support SNI?
I am sending the chip the following commands. The commands are successful with some sites, but apparently not with the one I am trying to test (app.sniffergps.com). They do however work when the web address is http://www.posttestserver.com and google.com. sparkfun.com and cnn.com also fail.
What am I doing wrong, and how can I make this work with my website?
This is what I am sending and receiving:
Code: Select all
ATE0\r\n
--> ATE0\r\r\n\r\nOK\r\n
AT\r\n
--> \r\nOK\r\n
AT+CWMODE=3\r\n
--> \r\nOK\r\n
AT+CWQAP\r\n
--> \r\nOK\r\n
AT+CWJAP="<ssid>","<password>"\r\n
--> WIFI CONNECTED\r\n
--> WIFI GOT IP\r\n
--> \r\nOK\r\n
AT+CIPSSLSIZE=4096\r\n
--> \r\nOK\r\n
AT+CIPSTART="SSL","app.sniffergps.com",443\r\n
--> CLOSED\r\n\r\nOK\r\n
AT+CIPSEND=170\r\n
--> link is not valid\r\n\r\nERROR\r\n
We have also tried
Code: Select all
AT+CIPSTART="SSL","app.sniffergps.com",443,1000\r\n
------UPDATE----------
I found out through sniffing the packets when the command AT+CIPSTART was issued that I was receiving a Handshake Failed (40) error.
Apparently this chip does not support SNI, and that is causing the server to error.
Does anyone know if there is a way to make this chip support SNI?