My problem is that I do not want to use AT commands everywhere to get/post data to my web server because it is brainstorming with all the delay and anything. I want to use library like gsm.h or something similar. Is there simple libraries which I can use to do the HTTP/HTTPS request (get/post) to my web server?

This code is my attempt with gsm.h, but it does not work. I suppose it only works with Arduino + Telefonica GSM/GPRS shield, not Sim808:

 Web client

This sketch connects to a website through a GSM shield. Specifically,
this example downloads the URL "http://www.arduino.cc/asciilogo.txt" and
prints it to the Serial monitor.

* GSM shield attached to an Arduino
* SIM card with a data plan

created 8 Mar 2012
by Tom Igoe



// libraries
#include <GSM.h>

// PIN Number
#define PINNUMBER ""

// APN data
#define GPRS_APN       "GPRS_APN" // replace your GPRS APN
#define GPRS_LOGIN     "login"    // replace with your GPRS login
#define GPRS_PASSWORD  "password" // replace with your GPRS password

// initialize the library instance
GSMClient client;
GPRS gprs;
GSM gsmAccess;

// URL, path & port (for example: arduino.cc)
char server[] = "arduino.cc";
char path[] = "/asciilogo.txt";
int port = 80; // port 80 is the default for HTTP

void setup() {
// initialize serial communications and wait for port to open:
    while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only

    Serial.println("Starting Arduino web client.");
    // connection state
    boolean notConnected = true;

    // After starting the modem with GSM.begin()
    // attach the shield to the GPRS network with the APN, login and password
    while (notConnected) {
       if ((gsmAccess.begin(PINNUMBER) == GSM_READY) &
          notConnected = false;
       } else {
          Serial.println("Not connected");


    // if you get a connection, report back via serial:
    if (client.connect(server, port)) {
       // Make a HTTP request:
       client.print("GET ");
       client.println(" HTTP/1.1");
       client.print("Host: ");
       client.println("Connection: close");
    } else {
      // if you didn't get a connection to the server:
      Serial.println("connection failed");

void loop() {
     // if there are incoming bytes available
     // from the server, read them and print them:
     if (client.available()) {
        char c = client.read();

     // if the server's disconnected, stop the client:
     if (!client.available() && !client.connected()) {

        // do nothing forevermore:
        for (;;)

Is there GSM/GPRS library that I can use with Sim808?

  • What does Google tell you? – Majenko Aug 1 '17 at 10:24

Start Arduino IDE, open the Library manager, search for SIM800 and there is 3 libraries available there that you can install. The advantage is that this libraries is kept up to date and when a new version is available you will get a notice to upgrade.

There is a HTTP PUT/GET library "HttpClient" that can be installed the same way as above.


If you googlem using "sim800 library arduino" you will find several libraries like:


or on github:


And as I understand it the 808 is GSM/GPRS + GPS, so the GPS features isn't normally covered by these libraries.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.