I have an Arduino UNO setup with a SIM900 Shield. I want to make http/s requests using AT commands. I can already perform GET requests via http. But i can’t get them to work with https. Please help me find the issue.
I am trying to perform a GET request to the following URL: https://worldtimeapi.org/api/timezone/America/Vancouver/
By executing the following AT-Commands
// first i reset the services and connection
AT+HTTPTERM -> OK
AT+CIPSHUT -> OK
AT+SAPBR=0,1 -> OK
// then i reopen the connection and initialize the http service
AT+SAPBR=3,1,"Contype","GPRS" -> OK
AT+SAPBR=3,1,"APN","internet.blau.de" -> OK
AT+SAPBR=1,1 -> OK
AT+HTTPINIT -> OK
AT+HTTPPARA="CID",1 -> OK
// then i initialize the https request
AT+HTTPPARA="URL","https://worldtimeapi.org/api/timezone/America/Vancouver/" -> OK
AT+HTTPSSL=1 -> OK
// but when performing the request, i receive an error response with code 601
AT+HTTPACTION=0 -> OK +HTTPACTION:0,601,0
When performing the request like this but with http (using http protocol in url and skipping the HTTPSSL=1 command) i receive a 200 response with the expected body.
According to some other posts and sources i found while investigating, 601 means connection issues. But i can establish the connection using my browser or Postman. And when looking up the connection status of my SIM900 everything seems fine as well.
AT+SAPBR=2,1 -> +SAPBR: 1,1,"10.217.95.14"
AT+SAPBR=4,1 -> +SAPBR:
CONTYPE: GPRS
APN: internet.blau.de
PHONENUM:
USER:
PWD:
RATE: 2
AT+CGATT? -> +CGATT: 1
AT+HTTPSSL=? -> +HTTPSSL: (0-1)