I was trying to POST and GET some JSON data to and from the AWS cloud respectively using the SIM 800 module. I'm initially trying it out directly from my PC over a terminal UART software and inputting AT commands in manually.
HTTP GET is working fine over SSL (AT+HTTPSSL=1
) for websites like Google and Quora, as in, they return back <html>
data.
1) I looked into first going through the AWS IoT route using HTTP as mentioned in the link here. But it requires not only a single certificate for HTTP SSL but also requires the root CA certificate and the private key and I guess it is not possible to add these apart from a single certificate using AT commands on the SIM 800. If there is a way to do so then can anyone please elaborate on it like the process flow and commands to do so?
2) I then tried to go the API route. I created an API gateway in AWS which is internally linked with some cloud logic. I want to actually do HTTP POST (https technically) of JSON data to the AWS cloud but I created a test API gateway for HTTP GET which does the addition of operands written in the URL and sends back data in the form of JSON. An HTTP GET over SSL however to a URL like https://XXXX.execute-api.us-west-2.amazonaws.com/XXX/calc/4/2/+
fails with a 606 error code
. In the SSL application note of SIM 800 606 error code means
"SSL alert message with a level of fatal result in the immediate termination of the connection"
What am I doing wrong over here?
Also, I tried HTTP GET over SSL on https://httpbin.org/ip too and got the same 606 error. Is it because the SIM 800 expects an <html>
and instead it gets JSON or is it something else?
For my AT command routine on the SIM 800 from the PC via Terminal software I usually do (for API gateway method):
AT+SAPBR=3,1,"CONTYPE","GPRS"
AT+SAPBR=3,1,"APN","XXXX"
AT+SAPBR=1,1
AT+HTTPINIT
AT+HTTPSSL=1
AT+HTTPPARA="CID",1
AT+HTTPPARA="URL","https://XXXX.execute-api.us-west-2.amazonaws.com/XXX/calc/4/2/+"
AT+HTTPACTION=0
Thanks in advance.