SIM800L HTTP request

SIM800L internet Connection Tutorial – AT Command List to make HTTP/GET request

In this article we will examine how to make a HTTP/GET Request to web page using AT Command of SIM800L. We will give you the list of AT Command needed and step by step the sequence of the AT Command. For basic SIM800L tutorial, you can find it here. And if you have problems with SIM800L you can find another troubleshooting tutorial here.

If you are using arduino to make GET request you need a sketch to forward data from your computer’s serial monitor to SIM800L. Use this sketch :

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  mySerial.begin(9600);
  //pinMode(13, OUTPUT);
}

void loop() {
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}

SIM800L Arduino Wiring Diagram

Use pin 10 and 11 for a Serial connection between Arduino and SIM800L. I use a step down to make the voltage about 4.2V from the 12V power supply. So here’s the wiring diagram.


And below is step by step AT command to use

Set Connection to GPRS :

AT+SAPBR=3,1,"Contype","GPRS"

Set the APN, username and password.

AT+CSTT="3gprs","3gprs","3gprs"

(the APN, username and password i’m using is 3GPRS

Enable the GPRS

AT+SAPBR=1,1

Check if we already got IP Adress

AT+SAPBR=2,1

Enabling HTTP mode :

 AT+HTTPINIT

OPTIONAL, If you are using or SLL use :

AT+HTTPSSL=1

Setting HTTP bearer profile :

AT+HTTPPARA="CID",1

Give URL of website we want to access :

AT+HTTPPARA="URL","https://miliohm.com/miliohmSIM800L.php"

Start HTTP GET Session :

AT+HTTPACTION=0

Read the content of webpage :

AT+HTTPREAD

Terminate the session :

AT+HTTPTERM


The Detail of how to do this you can watch on video below :

6 Replies to “SIM800L internet Connection Tutorial – AT Command List to make HTTP/GET request”

  1. Hi. Thank you for this nice article.
    I have an error “+HTTPACTION: 1,606,0”. I guess it is related with web server ssl config.
    Can you share your web server’s ssl configuration?

Leave a Reply

Your email address will not be published. Required fields are marked *