Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1516

HTTPS request using AT commands on SIM900 fails with 601

$
0
0

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 connectionAT+HTTPTERM  -> OKAT+CIPSHUT   -> OKAT+SAPBR=0,1 -> OK// then i reopen the connection and initialize the http serviceAT+SAPBR=3,1,"Contype","GPRS"         -> OKAT+SAPBR=3,1,"APN","internet.blau.de" -> OKAT+SAPBR=1,1                          -> OKAT+HTTPINIT                           -> OKAT+HTTPPARA="CID",1                   -> OK// then i initialize the https requestAT+HTTPPARA="URL","https://worldtimeapi.org/api/timezone/America/Vancouver/" -> OKAT+HTTPSSL=1                                                                 -> OK// but when performing the request, i receive an error response with code 601AT+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: 1AT+HTTPSSL=? -> +HTTPSSL: (0-1)

Viewing all articles
Browse latest Browse all 1516

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>