I've enabled "Both NL & CR" and now I'm getting responses
I sent the same AT commands as @ bilekj sent to the ESP8266, the response is below. I skipped the AT+CWJAP command as my Wifi auto connected due to the persistent connection. I'm getting successful responses.
I did notice it took quite a few seconds for the AT+CIPSTART command to respond, longer than the the WiFiEspAT library waited before giving the AT firmware not responding error. I wonder if it's worth tweaking the library to give some extra seconds to wait for a response?
ready
WIFI CONNECTED
WIFI GOT IP
AT
OK
AT+RST
OK
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x4010f000, len 3584, room 16
tail 0
chksum 0xb0
csum 0xb0
v2843a5ac
~ld
ready
WIFI CONNECTED
WIFI GOT IP
AT+CIPMUX=1
OK
AT+CIPRECVMODE=1
OK
AT+CWMODE?
+CWMODE:1
OK
AT+CIPSTATUS
STATUS:2
OK
AT+CIPSTART=4,"SSL","api.github.com",443
4,CONNECT
OK
4,CLOSED
AT+GMR
AT version:1.7.0.0 (partial)
SDK version:2.2.2-dev(38a443e)
Compile time:Oct 14 2022 22:21:22
Version ESP_ATMod:0.3.5
OK
So another step forward. I set the Serial3.setTimeout(2000) and the WiFiSSLClient was able to connect to api.github.com.
I then changed the hostname to an AWS API Gateway and I can see that the ESP8266 gives returns IP ERROR to the AT+CIPSTART command.
I've started googling what this means, but no luck so far. I'll keep at it.
I can see that the Github API is using TLS 1.3 whereas AWS API Gateway uses TLS 1.2.
Connected to WiFi network.
Starting connection to server...
esp INFO: free linkId is 4
esp INFO: start SSL to ic7co5dblh.execute-api.us-east-1.amazonaws.com:443 on link 4
esp> AT+CIPSTART=4,"SSL","ic7co5dblh.execute-api.us-east-1.amazonaws.com",443 ...sent
esp> IP ERROR ...ignored
esp> ERROR ...error
esp ERROR: expected OK got ERROR
disconnecting from server.
@bilekj what does IP Error mean in response to AT+CIPSTART?
ready
WIFI CONNECTED
WIFI GOT IP
AT+RST
OK
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x4010f000, len 3584, room 16
tail 0
chksum 0xb0
csum 0xb0
v2843a5ac
~ld
ready
WIFI CONNECTED
WIFI GOT IP
AT+CIPMUX=1
OK
AT+CIPRECVMODE=1
OK
AT+CWMODE?
+CWMODE:1
OK
AT+CIPSTATUS
STATUS:2
OK
AT+CIPSTART=4,"SSL","ic7co5dblh.execute-api.us-east-1.amazonaws.com",443
IP ERROR
ERROR
It's a bug, thanks!
The IP address is limited to 40 characters (function void cmd_AT_CIPSTART(), variable char remoteAddr[41] - needs expand to say 100).
I will fix it today.
I've had to play with the headers but I've managed to finally send a message from the Arduino to Amazon's API Gateway. It's taken two weeks of small steps to get this working, including setting up the AWS Architecture.