100% found this document useful (1 vote)
151 views102 pages

ESP32 SIM800L Publish Data To Cloud Without Wi-Fi Random Nerd Tutorials

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
151 views102 pages

ESP32 SIM800L Publish Data To Cloud Without Wi-Fi Random Nerd Tutorials

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 102

ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.

com/esp32-sim800l-publish-data-to-cloud/

ESP32 Publish Data to Cloud without Wi-Fi (TTGO


T-Call ESP32 SIM800L)

This project shows how to connect the TTGO T-Call ESP32 SIM800L board to the
Internet using a SIM card data plan and publish data to the cloud without using Wi-
Fi. We’ll program this board with Arduino IDE.

Watch the Video Tutorial


You can watch the video tutorial or continue reading for the complete project
instructions.

1 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Introducing the TTGO T-Call ESP32 SIM800L


The TTGO T-Call is a new ESP32 development board that combines a SIM800L
GSM/GPRS module. You can get if for approximately $11.

2 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Besides Wi-Fi and Bluetooth, you can communicate with this ESP32 board using
SMS or phone calls and you can connect it to the internet using your SIM card
data plan. This is great for IoT projects that don’t have access to a nearby router.

Important: the SIM800L works on 2G networks, so it will only work in your


country, if 2G networks are available. Check if you have 2G network in your
country, otherwise it won’t work.

To use the capabilities of this board you need to have a nano SIM card with data
plan and a USB-C cable to upload code to the board.

The package includes some header pins, a battery connector, and an external
antenna that you should connect to your board.

3 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

However, we had some issues with that antenna, so we decided to switch to


another type of antenna and all the problems were solved. The following figure
shows the new antenna.

Project Overview

4 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

The idea of this project is to publish sensor data from anywhere to any cloud
service that you want. The ESP32 doesn’t need to have access to a router via Wi-
Fi, because we’ll connect to the internet using a SIM card data plan.

In a previous project, we’ve created our own server domain with a database to plot
sensor readings in charts that you can access from anywhere in the world.

In this project, we’ll publish sensor readings to that server. You can publish your
sensor readings to any other service, like ThingSpeak, IFTTT, etc…

If you want to follow this exact project, you should follow that previous tutorial first
to prepare your own server domain. Then, upload the code provided in this project
to your ESP32 board.

In summary, here’s how the project works:

1. The T-Call ESP32 SIM800L board is in deep sleep mode.


2. It wakes up and connects to the internet using your SIM card data plan.
3. It publishes the sensor readings to the server and goes back to sleep.

5 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

In our example, the sleep time is 60 minutes, but you can easily change it in the
code.

We’ll be using a BME280 sensor, but you should be able to use any other sensor
that best suits your needs.

Hosting Provider
If you don’t have a hosting account, I recommend signing up for Bluehost, because
they can handle all the project requirements. If you don’t have a hosting account, I
would appreciate if you sign up for Bluehost using my link. Which doesn’t cost you
anything extra and helps support our work.

Get Hosting and Domain Name with Bluehost »

Prerequisites
1. ESP32 add-on Arduino IDE
We’ll program the ESP32 using Arduino IDE. So, you need to have the ESP32
add-on installed in your Arduino IDE. Follow the next tutorial, if you haven’t
already.

▪ Installing the ESP32 Board in Arduino IDE (Windows, Mac OS X, Linux)

2. Preparing your Server Domain


In this project we’ll show you how to publish data to any cloud service. We’ll be
using our own server domain with a database to publish all the data, but you can
use any other service like ThingSpeak, IFTTT, etc…

If you want to follow this exact project, you should follow the next tutorial to
prepare your own server domain.

▪ Visualize Your Sensor Readings from Anywhere in the World (ESP32 +


MySQL + PHP)

6 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

3. SIM Card with data plan


To use the TTGO T-Call ESP32 SIM800L board, you need a nano SIM card with a
data plan. We recommend using a SIM card with a prepaid or monthly plan, so
that you know exactly how much you’ll spend.

4. APN Details
To connect your SIM card to the internet, you need to have your phone plan
provider APN details. You need the domain name, username and a password.

In my case, I’m using vodafone Portugal. If you search for GPRS APN settings
followed by your phone plan provider name, (in my case its: “GPRS APN
vodafone Portugal”), you can usually find in a forum or in their website all the
information that you need.

I’ve found this website that can be very useful to find all the information you need.

It might be a bit tricky to find the details if you don’t use a well known provider. So,
you might need to contact them directly.

5. Libraries
You need to install these libraries to proceed with this project: Adafruit_BME280,
Adafruit_Sensor and TinyGSM. Follow the next instructions to install these
libraries.

Installing the Adafruit BME280 Library

Open your Arduino IDE and go to Sketch > Include Library > Manage Libraries.
The Library Manager should open.

Search for “adafruit bme280 ” on the Search box and install the library.

7 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Installing the Adafruit Sensor Library

To use the BME280 library, you also need to install the Adafruit_Sensor library.
Follow the next steps to install the library in your Arduino IDE:

Go to Sketch > Include Library > Manage Libraries and type “Adafruit Unified
Sensor” in the search box. Scroll all the way down to find the library and install it.

8 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Installing the TinyGSM Library

In the Arduino IDE Library Manager search for TinyGSM. Select the TinyGSM
library by Volodymyr Shymanskyy.

After installing the libraries, restart your Arduino IDE.

9 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Parts Required
To build this project, you need the following parts:

▪ TTGO T-Call ESP32 SIM800L


▪ USB-C cable
▪ Antenna (optional)
▪ BME280 sensor module (Guide for BME280 with ESP32)
▪ Breadboard
▪ Jumper wires

You can use the preceding links or go directly to MakerAdvisor.com/tools to find all
the parts for your projects at the best price!

Schematic Diagram
Wire the BME280 to the T-Call ESP32 SIM800L board as shown in the following
schematic diagram.

10 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

We’re connecting the SDA pin to GPIO 18 and the SCL pin to GPIO 19 . We’re
not using the default I2C GPIOs because they are being used by the battery power
management IC of the T-Call ESP32 SIM800L board.

Code
Copy the following code to your Arduino IDE but don’t upload it yet. First, you need
to make some modifications to make it work.

/*
Rui Santos
Complete project details at https://RandomNerdTutorials.com/esp32-sim80

Permission is hereby granted, free of charge, to any person obtaining a


of this software and associated documentation files.

11 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

The above copyright notice and this permission notice shall be included
copies or substantial portions of the Software.
*/

// Your GPRS credentials (leave empty, if not needed)


const char apn[] = ""; // APN (example: internet.vodafone.pt) use ht
const char gprsUser[] = ""; // GPRS User
const char gprsPass[] = ""; // GPRS Password

// SIM card PIN (leave empty, if not defined)


const char simPIN[] = "";

// Server details
// The server variable can be just a domain name or it can have a subdoma
const char server[] = "example.com"; // domain name: example.com, maker.i
const char resource[] = "/post-data.php"; // resource path, for e
const int port = 80; // server port number

// Keep this API Key value to be compatible with the PHP code provided in
// If you change the apiKeyValue value, the PHP file /post-data.php also

View raw code

Before uploading the code, you need to insert your APN details, SIM card PIN (if
applicable) and your server domain.

How the Code Works


Insert your GPRS APN credentials in the following variables:

const char apn[] = ""; // APN (example: internet.vodafone.pt) use ht


const char gprsUser[] = ""; // GPRS User
const char gprsPass[] = ""; // GPRS Password

12 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

In //
our Set
case,serial
the APN is internet.vodafone.pt
for debug console (to Serial . YoursMonitor,
should bedefault
different. speed 115200)
We’ve explained previous in this tutorial how to get your APN details.

Enter your SIM card PIN if applicable:

const char simPIN[] = "";

You also need to type the server details in the following variables. It can be your
own server domain or any other server that you want to publish data to.

const char server[] = "example.com"; // domain name: example.com, maker.i


const char resource[] = "/post-data.php"; // resource path, for example
const int port = 80; // server port number

If you’re using your own server domain as we’re doing in this tutorial, you also
need an API key. In this case, the apiKeyValue is just a random string that you
can modify. It’s used for security reasons, so only anyone that knows your API key
can publish data to your database.

The code is heavily commented so that you understand the purpose of each line of
code.

The following lines define the pins used by the SIM800L module:

#define MODEM_RST 5
#define MODEM_PWKEY 4
#define MODEM_POWER_ON 23
#define MODEM_TX 27
#define MODEM_RX 26
#define I2C_SDA 21
#define I2C_SCL 22

13 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Define the BME280 I2C pins. In this example we’re not using the default pins
because they are already being used by the battery power management IC of the
T-Call ESP32 SIM800L board. So, we’re using GPIO 18 and GPIO 19 .

#define I2C_SDA_2 18
#define I2C_SCL_2 19

Define a serial communication for the Serial Monitor and another to communicate
with the SIM800L module:

// Set serial for debug console (to Serial Monitor, default speed 115200)
#define SerialMon Serial
// Set serial for AT commands (to SIM800 module)
#define SerialAT Serial1

Configure the TinyGSM library to work with the SIM800L module.

// Configure TinyGSM library


#define TINY_GSM_MODEM_SIM800 // Modem is SIM800
#define TINY_GSM_RX_BUFFER 1024 // Set RX buffer to 1Kb

Include the following libraries to communicate with the SIM800L.

#include <Wire.h>
#include <TinyGsmClient.h>

And these libraries to use the BME280 sensor:

14 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

digitalWrite(MODEM_RST, HIGH);
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>

Instantiate an I2C communication for the SIM800L.

TwoWire I2CPower = TwoWire(0);

And another I2C communication for the BME280 sensor.

TwoWire I2CBME = TwoWire(1);


Adafruit_BME280 bme;

Initialize a TinyGSMClient for internet connection.

TinyGsmClient client(modem);

Define the deep sleep time in the TIME_TO_SLEEP variable in seconds.

#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds


#define TIME_TO_SLEEP 3600 /* Time ESP32 will go to sleep (in sec

In the setup() , initialize the Serial Monitor at a baud rate of 115200:

SerialMon.begin(115200);

Start the I2C communication for the SIM800L module and for the BME280 sensor
module:

15 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

SerialMon.println(" OK");
I2CPower.begin(I2C_SDA, I2C_SCL, 400000);
I2CBME.begin(I2C_SDA_2, I2C_SCL_2, 400000);

Setup the SIM800L pins in a proper state to operate:

pinMode(MODEM_PWKEY, OUTPUT);
pinMode(MODEM_RST, OUTPUT);
pinMode(MODEM_POWER_ON, OUTPUT);
digitalWrite(MODEM_PWKEY, LOW);
digitalWrite(MODEM_RST, HIGH);
digitalWrite(MODEM_POWER_ON, HIGH);

Initialize a serial communication with the SIM800L module

SerialAT.begin(115200, SERIAL_8N1, MODEM_RX, MODEM_TX);

Initialize the SIM800L module and unlock the SIM card PIN if needed

SerialMon.println("Initializing modem...");
modem.restart();
// use modem.init() if you don't need the complete restart

// Unlock your SIM card with a PIN if needed


if (strlen(simPIN) && modem.getSimStatus() != 3 ) {
modem.simUnlock(simPIN);
}

Initialize the BME280 sensor module:

if (!bme.begin(0x76, &I2CBME)) {

16 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Serial.println("Could not find a valid BME280 sensor, check wiring!"


while (1);
}

Configure deep sleep as a wake up source:

esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);

Recommended reading: ESP32 Deep Sleep and Wake Up Sources

In the loop() is where we’ll actually connect to the internet and make the HTTP
POST request to publish sensor data. Because the ESP32 will go into deep sleep
mode at the end of the loop() , it will only run once.

The following lines connect the module to the internet:

SerialMon.print("Connecting to APN: ");


SerialMon.print(apn);
if (!modem.gprsConnect(apn, gprsUser, gprsPass)) {
SerialMon.println(" fail");
}
else {
SerialMon.println(" OK");

SerialMon.print("Connecting to ");
SerialMon.print(server);
if (!client.connect(server, port)) {
SerialMon.println(" fail");
}
else {
SerialMon.println(" OK");

17 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Prepare the message data to be sent by HTTP POST Request

String httpRequestData = "api_key=" + apiKeyValue + "&value1=" +


+ "&value2=" + String(bme.readHumidity()) + "&value3=" + String(bme

Basically, we create a string with the API key value and all the sensor readings.
You should modify this string depending on the data you want to send.

The following lines make the POST request.

client.print(String("POST ") + resource + " HTTP/1.1\r\n");


client.print(String("Host: ") + server + "\r\n");
client.println("Connection: close");
client.println("Content-Type: application/x-www-form-urlencoded")
client.print("Content-Length: ");
client.println(httpRequestData.length());
client.println();
client.println(httpRequestData);

unsigned long timeout = millis();


while (client.connected() && millis() - timeout < 10000L) {
// Print available data (HTTP response from server)
while (client.available()) {
char c = client.read();
SerialMon.print(c);
timeout = millis();
}
}

Finally, close the connection, and disconnect from the internet.

client.stop();

18 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

SerialMon.println(F("Server disconnected"));
modem.gprsDisconnect();
SerialMon.println(F("GPRS disconnected"));

In the end, put the ESP32 in deep sleep mode.

esp_deep_sleep_start();

Upload the Code


After inserting all the necessary details, you can upload the code to your board.

To upload code to your board, go to Tools > Board and select ESP32 Dev
module. Go to Tools > Port and select the COM port your board is connected to.
Finally, press the upload button to upload the code to your board.

Note: at the moment, there isn’t a board for the T-Call ESP32 SIM800L, but
we’ve selected the ESP32 Dev Module and it’s been working fine.

Demonstration
Open the Serial Monitor at baud rate of 115200 and press the board RST button.

First, the module initializes and then it tries to connect to the internet. Please note
that this can take some time (in some cases it took almost 1 minute to complete
the request).

After connecting to the internet, it will connect to your server to make the HTTP
POST request.

Finally, it disconnects from the server, disconnects the internet and goes to sleep.

19 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

In this example, it publishes new sensor readings every 60 minutes, but for testing
purposes you can use a shorter delay.

Then, open a browser and type your server domain on the /esp-chart.php URL.
You should see the charts with the latest sensor readings.

20 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Troubleshooting
If at this point, you can’t make your module connect to the internet, it can be
caused by one of the following reasons:

▪ The APN credentials might not be correct;


▪ The antenna might not be working properly. In our case, we had to replace
the antenna;
▪ You might need to go outside to get a better signal coverage;
▪ Or you might not be supplying enough current to the module. If you’re
connecting the module to your computer using a USB hub without external
power supply, it might not provide enough current to operate.

21 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Wrapping Up
We hope you liked this project. In our opinion, the T-Call SIM800 ESP32 board can
be very useful for IoT projects that don’t have access to a nearby router via Wi-Fi.
You can connect your board to the internet quite easily using a SIM card data plan.

We’ll be publishing more projects about this board soon (like sending SMS
notifications, request data via SMS, etc.) so, stay tuned!

You may also like:

▪ $11 TTGO T-Call ESP32 with SIM800L GSM/GPRS (in-depth review)


▪ ESP32/ESP8266 Insert Data into MySQL Database using PHP and Arduino
IDE
▪ ESP32/ESP8266 Plot Sensor Readings in Real Time Charts – Web Server
▪ ESP32 Web Server with BME280 – Advanced Weather Station

Learn more about the ESP32 with our resources:

▪ Learn ESP32 with Arduino IDE (Course)


▪ MicroPython Programming with ESP32 and ESP8266 (eBook)
▪ More ESP32 Projects and Tutorials

Thanks for reading.

22 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

[eBook] Build Web Servers with ESP32 and


ESP8266 (2nd Edition)

Build Web Server projects with the ESP32 and ESP8266 boards to control outputs
and monitor sensors remotely. Learn HTML, CSS, JavaScript and client-server
communication protocols DOWNLOAD »

Recommended Resources

23 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Build a Home Automation System from Scratch » With Raspberry Pi,


ESP8266, Arduino, and Node-RED.

Home Automation using ESP8266 eBook and video course » Build IoT and
home automation projects.

Arduino Step-by-Step Projects » Build 25 Arduino projects with our course,


even with no prior experience!

24 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

What to Read Next…

MicroPython: Program ESP32/ESP8266 using VS Code and Pymakr

ESP32 Web Server – Arduino IDE

25 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Enjoyed
Guide forthis project?
TCA9548A I2C Stay updated
Multiplexer: by ESP8266,
ESP32, subscribing our
Arduino
newsletter!

Your Email Address

SUBSCRIBE

157 thoughts on “ESP32 Publish Data to Cloud without


Wi-Fi (TTGO T-Call ESP32 SIM800L)”

TOMAS A DALE RECINOS


September 5, 2019 at 2:56 pm

Muito Obligado Rui, thanks very much, can we see in a video how do you
insert the SIM card in the board?

Also an idea, what about a simple app using app.inventor to send an SMS
to this board and according to the SMS it checks a specific sensor and
then it sends an SMS back, so the board gets the message and the phone

26 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

number that sends the request to know the status of a sensor, for example
someone wants to know the humidity or the temperature of a far away
garden, or send a command to open a valve for 5 seconds for water, and
with this we can send commands without the need of a router, which is
GREAT !!!! THANKS AGAIN

Reply

Sara Santos
September 5, 2019 at 6:59 pm

Hi Tomas.
We’ll post more tutorials about this board: show how to make things
happen by sending SMS and request data via SMS.
So, stay tuned.
Thank you for following our work.
Regads,
Sara

Reply

Mohammed Mazed Hossain


September 7, 2019 at 4:10 pm

Make tutorial about Biometric Attendance System using Fingerprint


Sensor and this board.

Reply

27 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Rui Santos
September 13, 2019 at 9:21 am

Thanks for the suggestion!

Reply

SHREYANSH JAIN
February 2, 2020 at 1:46 pm

Can you please make a tutorial on how to use sim800l (of TTGO
T-Call) to control gpio pins instead of esp32 for controlling led or
realy.
I really liked your tutorials and thanks for such good tutorials.

Sara Santos
February 2, 2020 at 5:35 pm

Hi.
You can use the same code you would use on a regular ESP32 to
control GPIOs.
Regards,
Sara

28 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

luiz cancela
December 31, 2020 at 10:44 pm

Parabéns pelo trabalho e feliz ano novo

Reply

Sara Santos
January 3, 2021 at 11:45 am

Muito Obrigada

Reply

29 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

carlos frondizi
September 5, 2019 at 4:07 pm

Excellent as usual
Congratulations.
I was thinking on doing something very similar but with yur tutorial, things
will be much easier and fast.
Great saved me hours and hours.
carlos Frondizi

Reply

Sara Santos
September 5, 2019 at 6:57 pm

Hi Carlos.
That’s great! Thank you for following our work
Regards,
Sara

Reply

Andrew Wilson
September 6, 2019 at 2:54 pm

Thanks for the very good tutorial. I recently purchased a t-call and was a

30 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

bit fazed by the documentation. This has spelled it out perfectly. One
thought I have had is, if it takes up to one minute to connect to the
internet, the esp32 could be awake for up to 50% of the time. Depending
on the currency of the data required, it could simply take a reading once a
minute, for say 10 minutes and then connect to upload all 10 data points.

This would require keeping a counter of where in the cycle of 10 readings


it is. EEPROM I guess would be the best place to keep that variable.

This way uptime would be reduced to about 12%.

Thanks for the great resource.

Reply

Paul Hutton
September 5, 2019 at 5:37 pm

Do you have a source for the improved antenna?

Reply

Sara Santos
September 5, 2019 at 6:56 pm

31 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hi Paul.
I’ve just added a link to the antenna in the parts required.
Regards,
Sara

Reply

Paul Hutton
September 5, 2019 at 10:09 pm

Thanks, Sara……Paul

Reply

Geraldo Cartolano
September 5, 2019 at 7:51 pm

Ótimo tutorial Sara e Rui,

Voces podem nos informar qual o tamanho do pacote de dados, em bytes,


enviado em um dia ?
———————————————————————————————
Great Tutorial Sara and Rui,
Can you tell us the data packet size send in one day ?

Reply

32 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Umar
September 6, 2019 at 3:15 am

Hi, the SIM800L only support 2G right? Any possibilities we can the same
code for GSM module with 3G/4G connection for improve speed. Thanks.
By the way, great tutorial as always!!

Reply

Sara Santos
September 9, 2019 at 5:55 pm

Hi Umar.
That’s right.
The code should be compatible with other modules with just a few
changes for proper initialization.
See the TinyGSM library documentation: github.com/vshymanskyy
/TinyGSM
Regards,
Sara

Reply

Hans Middelbeek
September 6, 2019 at 9:50 am

33 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hello Sara and Rui!

A big thanks for your very informative and well organised instruction
videos!
At present I am working with the TTGO T-Call unit, and sending data works
perfect. I am very interested to know how data can be sent using JSON; do
you plan an introductory video on that in the (hopefully near) future?

Regards, Hans

Reply

Phil Baillie
September 6, 2019 at 9:59 am

As per other comments, this device and the variants of the Sim 900 are 2G
devices and this service is no longer available in my country (Australia)
and several others so please also include projects that use 3G or 4G as
well
Regards
Phil

Reply

Sara Santos
September 9, 2019 at 5:52 pm

Hi Phill.

34 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

I’ve added a big note at the beginning of the post about that.
This board is 2G, that’s why it is so cheap compared with other 3G and
4G modules (tha cost between 25$ and 50$ just the module without
ESP32).
Unfortunately, 2G is not supported in all countries.t
But, if you want to use a 3G and 4G module, most of the code should be
compatible. The TinyGSM library is compatible with a wide variety of
modules. You just need to initialize the module with the proper
configurations.
We’ll take a look at some 3G and 4G modules and probably create some
tutorials in the future.
Regards,
Sara

Reply

Jeff
October 1, 2020 at 7:24 pm

Hi Sara – I have only been able to find shields or devices for much more
than that, closer to $70-80. Do you have recommendations for any
cheaper boards/modules I can use that support LTE (as 3G is on its way
out too it seems). Thanks!

store.arduino.cc/usa/arduino-mkr-nb-1500

Reply

Sara Santos
October 2, 2020 at 8:24 am

35 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hi Jeff.
Unfortunately, 4G Shields are very expensive. Around 60$ to 80$.
I couldn’t find anything cheaper.
Regards,
Sara

Reply

Will Valintine
September 7, 2019 at 11:41 am

When the ESP is in deep sleep, are the ancillary devices unit powered
down on this device (GSM module, Serial to USB module etc)? Thinking
about optimum battery life for in the field devices… Thanks.

Reply

Rui Santos
September 13, 2019 at 9:22 am

To be honest we still need to do more power consumption tests with this


board, but you should be able to lower quite significantly with deep sleep
as used in this project

Reply

36 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Eduardo Silva Cardoso


September 8, 2019 at 1:14 am

Olá, acabou de chegar minha TTGO T-Call ESP32 SIM800L, carregar este
firmware o ESP32 fica eternamente dando a seguinte mensagem de erro,
em que essa mensagem vai se repetindo sem parar:

Rebooting…
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)


configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x
00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:956
load:0x40078000,len:0
load:0x40078000,len:13076
entry 0x40078a58
assertion “false && “item should have been present in cache”” failed: file
“/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/nvs_flash
/src/nvs_item_hash_list.cpp”, line 85, function: void
nvs::HashList::erase(size_t)
abort() was called at PC 0x400d1283 on core 0

Backtrace: 0x4008704c:0x3ffc62c0 0x4008714b:0x3ffc62e0


0x400d1283:0x3ffc6300 0x400e3b20:0x3ffc6330 0x400e3e8e:0x3ffc6350
0x400e41bd:0x3ffc63a0 0x400e3934:0x3ffc6400 0x400e3776:0x3ffc6450
0x400e380f:0x3ffc6470 0x400e385a:0x3ffc6490 0x400e1054:0x3ffc64b0
0x400e1003:0x3ffc64d0 0x400d1b6e:0x3ffc6500

Você sabe como eu poderia solucionar esse problema?

37 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Desculpe pelo post no outro tutorial que não era este

Reply

Sara Santos
September 9, 2019 at 5:42 pm

Hi Eduardo.
Those kind of errors are very difficult to troubleshoot.
Sometimes the ESP32 keeps rebooting when we don’t provide enough
power.
For example, if you’re using a USB hub, it may not provide enough
current. Or try another USB port.
At the moment, I don’t know what exactly can cause that problem.
Regards,
Sara

Reply

Ppcast
September 14, 2019 at 2:14 pm

38 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hi Sara and Rui!


Congratulations for your tuto.
Im asking about make a mesh network using this module as root node,
avoiding to use a router.
It would be posible?
Thanks for your Job.

Reply

Wagner De Queiroz
April 6, 2022 at 2:46 pm

Olá Eduardo, se você não modificou o código, verifique além de onde


está sua placa, num hub usb ou na USB do computador, o chip precisa
de muita corrente pra funcionar. Pelo log parece que seu programa não
pode ser gravado totalmente. Sei que tem um plugin para Arduino que
interpretar esse backtrace e indica onde está o erro no código.

https://github.com/me-no-dev/EspExceptionDecoder

Reply

TOMAS A DALE RECINOS


September 13, 2019 at 2:13 pm

Muito Obligado, I am from El Salvador, and I have a couple of ideas, I


found today this “GSM Module SIM800L With MIC & 3.5mm Headphone

39 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Jack” is it possible to integrate with the ESP32 to create a very simple


mobile?

Here are the ideas:

– voice to text. Sends a verbal instruction from a mobile to an ESP32

– text to voice. An ESP32 sends a SMS to another ESP32, like a


temperature warning, but you don’t need to check incoming SMS because
you will use speakers.

Reply

40 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Charles
September 15, 2019 at 10:09 pm

Hi Sara & Paul,

Great project, and well explained.

Im thinking of using this for my (snail) mailbox , so i can a notification when


i receive my newspaper or letters. (my mailbox is far away from my home)

So i will use a small switch to trigger when the mailbox receives mail
Question : how do i set it up that it triggers IFTTT, or will you do a tutorial
on that ?
I use Domoticz and that can receive triggers from IFTTT

keep up the good work

Reply

Sara Santos
September 16, 2019 at 8:53 am

Hi Charles.
You can take a look at these tutorials and see if they help.
https://randomnerdtutorials.com/esp32-esp8266-publish-sensor-readings-
to-google-sheets/
https://randomnerdtutorials.com/door-status-monitor-using-the-esp8266/
You just need to make an HTTP post request on the right webhooks URL.
Instead of searching for google sheets in the first tutorial, search for
“email”

41 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

In both cases, I recommend searching for email as people were reporting


some problems with the “gmail” option.
Regards,
Sara

P.S. It’s Sara and Rui (not Paul)

Reply

Ola Dunk
September 19, 2019 at 6:54 am

Hi,
The SIM800L module is very power hungry and needs up to 2A (Amperes)
when transmitting. The module will reboot and blink 7-8 times when the
voltage is dropping due to insuffient Power. This is well described in the
datasheet for the SIM800L. Use a Lipo battery charger and Lipo battery to
Power this Board. A fully charged Lipo will give 4.1 Volts which is optimal
for the SIM800.Max voltage is around 4.3-4.4 volts and it will send out a
Message if the voltage is to high.
I also put a 1000 micro Farad capacitor between + and – Close to the
module. Datasheets can be very useful for practical use of all kinds of
modules and parts.

Reply

hamza
October 15, 2019 at 3:58 am

42 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

how i can connect this module with lora module plz ?

Reply

Richard Addington
November 7, 2019 at 3:18 am

Many thanks Rui and Sara for another great tutorial, you have taught me a
lot about the TTGO T-Call in an easy and understandable manner. My first
remote air quality system using this module has been running well and
collecting data.
With my new knowledge I have now successfully migrated over to using a
SIM7000G module with NB IoT and an ESP32.
Eagerly awaiting another project!

Reply

Sara Santos
November 8, 2019 at 7:19 pm

43 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hi Richard.
Rui show me your project and it looks great!
Congratulations!
It’s very rewarding see what our readers can build with our tutorials.
Best wishes.
Sara

Reply

Ibrahim
December 4, 2020 at 12:22 pm

Hey Richard,

Can you post the differences in the code between the T-call and
SIM7000G?

The T-Call connects to (modem.gprs), does the SIM7000 connect to


(modem.lte)?

Reply

Zoli
December 5, 2019 at 4:42 pm

Nice tutorial!
Can anyone help me out and tell me can the TTgo T-call be powered by

44 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

the 5 v pin, or that pin is for 5 v input! I’m asking because i ordered an USB
C converter from Banggood and my bag was empty, the support was rude,
and i lost my money ! So now no usb connection, i must use the rx tx
onboard and i must power it somehow! Thanks

Reply

Sara Santos
December 7, 2019 at 11:08 am

Hi Zoli.
Yes, you can use the 5V pin for power.
Regards,
Sara

Reply

Billy
May 15, 2020 at 5:45 am

Like Sara said, you can use the 5V pin to power your device. There is
one downside to this though. Powering your TTGO ESP32 SIM800L this
way does not allow charging of the battery via the on-board battery
connector. This feature is only available when powered via USB-C.

Reply

Sara Santos
May 15, 2020 at 2:54 pm

45 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Yes, it’s true.


Thanks for pointing that out.

Reply

weetoz
December 22, 2019 at 10:17 am

Hi Sarah, hi Riu,

i tryed to upload a sketch, but doesn’t work anywell.


While loading, I keep the button pressed, but it doesn’t work.
i’d like to connect à 10µF capacitor, but there is’nt EN pin on the board.
I prefer not to weld directly on the board.
Have you an idea how to do this?

Thank you

Reply

Sara Santos
December 27, 2019 at 11:38 am

46 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hi.
You just need to press the button once. You don’t need to hold the button.
I don’t know what might be causing the issue.
Regards,
Sara

Reply

weetoz
December 29, 2019 at 9:25 am

Hi, thank you, i found how does the TTGO-Call woks.

Reply

Ryan
February 4, 2020 at 2:52 pm

Hi Sara, Firstly thank you for the amazing tutorials, they have taught me a
lot.

Having said that though, with my limited coding knowledge, I have been
trying to replace the HTTP post method above to rather work with a MQTT
broker that requires a username and password. Any pointers you can give
me here on how to do this to the example above would be greatly
appreciated.

Looking at your other tutorials with MQTT I also could not find an example

47 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

where the MQTT broker requires a username and password. Thank you in
advance for any assistance. Many Thanks

Reply

Sara Santos
February 4, 2020 at 6:23 pm

Hi Ryan.
I think this publication explains what you’re looking for: https://rntlab.com
/question/how-to-use-cloud-mqtt-broker-with-esp32-using-async-mqtt-
client-library/
Regards,
Sara

Reply

Ryan
February 4, 2020 at 6:29 pm

Thank you for the speedy reply. That’s a great resource – thank you!
Now to figure out how to make it work with the sketch above…
Thanks again

Reply

Daniel Escasa
February 7, 2020 at 5:12 am

48 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hello again, Sara and Rui, great tutorial as usual even if we might not have
2G for long here in the Philippines. I suppose I can interface an ESP32
with some LTE module to get the same result.

As an aside, T-Call implies that it can do voice calls. Have you tested that?
Can’t find anything in the tech docs, but then I haven’t looked that closely.

Lastly, what software or app did you use to create that neat Schematic
Diagram, which shows up at 3:37 in the video tutorial and again toward the
middle of this post?

Thanks again, and regards

Reply

Alberto M.
March 14, 2020 at 2:48 pm

Hi Rui, I am trying to connect to Google’s FireBase, but it is impossible,


among other things I don’t know how to connect with the API key that they
give me. What should i do to connect to the SIM800L? thanks for this
tutorial.

Reply

Alberto M.
March 14, 2020 at 2:49 pm

49 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hi Sara, I am trying to connect to Google’s FireBase, but it is impossible,


among other things I don’t know how to connect with the API key that they
give me. What should i do to connect to the SIM800L? thanks for this
tutorial.

Reply

Sara Santos
March 15, 2020 at 4:58 pm

Hi Alberto.
Unfortunately, we don’t have any tutorial about FireBase.
I’m sorry.
Regards,
Sara

Reply

vishwas
April 8, 2020 at 1:16 pm

did you get any code to connect ttgo-t-call board to firebase ? if so please
share, i am need of it very much.

Reply

50 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Eduardo Samán
March 31, 2020 at 2:18 pm

Greetings, thanks for the tutorial.


Can I connect two 18650 lithium batteries in parallel to the module (TTGO
T-Call ESP32 SIM800L)? Can the power manager supply enough current
to charge the two batteries in parallel?

Reply

Billy
May 15, 2020 at 5:35 am

I can’t see why not. The max charge current is limited to 500ma though,
so they will just take some time to charge. It will take approximately
1-hour of charge for every 500mAh of battery power consumed.

Reply

51 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Bavirishetty Manideep
April 17, 2020 at 6:18 pm

can we use a 4G sim card in this or only 2G/3G

Reply

Sara Santos
April 18, 2020 at 10:19 am

Hi.
You can use 4G card.
Regards,
Sara

Reply

52 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Richard Addington
April 18, 2020 at 11:30 am

You can use a 4G SIM card but the TTGO T-Call is only a 2G module. If
you want 4G then change to a SIM7000 series, you can use the same
code but there are some GPIO changes.

Reply

Billy
May 15, 2020 at 5:39 am

I use a 4G SIM successfully. The SIM800 only supports 2G connections


though, so as long as your service provider still supports 2G, you will be
fine.

Reply

Sara Santos
May 15, 2020 at 2:53 pm

That’s right.

Reply

53 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Paulo
April 20, 2020 at 1:33 pm

Hi, is it possible to post an image (.jpg file) as part of the http post request?
Thanks
Paulo

Reply

Billy
May 15, 2020 at 5:26 am

In the examples, you say not to use the default I2C pins as these are used
by power management. Why would this pose a problem, seeing as I2C
connected devices each have their own unique address? I am asking this
because I have run into some strange behaviour trying exactly this, even
with external discreet pull-up resistors added on the default SCL and SDA.
It is easy enough to create a second I2C interface (thanks to your
example!), but I would like to understand what the problem is.

Reply

Sara Santos
May 15, 2020 at 2:53 pm

Hi.

54 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

You can use the same I2C address without any problem.
You can learn more about I2C with the ESP32 here:
https://randomnerdtutorials.com/esp32-i2c-communication-arduino-ide/
Thank you for your comment.
Regards,
Sara

Reply

Lakmal Premaratne
June 17, 2020 at 5:25 pm

Hi Rui, do you know whether can we communicate with an https server


using TinyGSM library? According to Github project page, it supports SSL.
But I couldn’t find an example code as to how to get it done.

Reply

Sara Santos
June 20, 2020 at 2:20 pm

Hi.
At the moment, we don’t have any tutorials about that subject.
Regards,
Sara

Reply

55 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Gabriel David
November 20, 2020 at 5:51 pm

hello Sara, AWS Amazon uses SSL for Iot Core, correct? Did you ever
make that kind of connection? It’s possible? Do you indicate any
tutorial?

Reply

Connor Dorward
September 4, 2020 at 12:02 pm

Hello Lakmal, I’m also interested in communicating to an https server,


have you managed to achieve this? It seems like there is very little
documentation on this.

Reply

Richard Green
September 23, 2020 at 9:31 pm

56 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hya,
Also looking for a HTTPS connection solution for the esp32. Proving a
difficult one to resolve!

Reply

Christian
October 27, 2020 at 7:00 pm

Hi !!

Vey nice example. Also looking for a HTTPS connection solution for
the esp32

Reply

Sara Santos
October 28, 2020 at 12:14 pm

Hi.
See Rui’s answer to this question: https://rntlab.com/question/how-to-
connect-esp8266-to-ifttt-using-https-using-certificate/
Regards,
Sara

57 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Akshay
June 25, 2020 at 10:58 am

Is it possible to establish a connection between TTGO T-call and aws IoT


with SIM800L?!

Reply

Sara Santos
June 25, 2020 at 5:42 pm

Hi.
Yes, I think it should be possible.
Regards,
Sara

Reply

Ankush Goyal
July 28, 2020 at 3:50 pm

Hi Sara and Rui, thanks for this brilliant tutorial.

I tried this on my ttgo t-call module and it worked like a charm.


I just wanted to send an image (i.e. a file) instead of sensor data using http
request. Can you help me with that?

58 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Reply

Sara Santos
July 29, 2020 at 9:54 am

Hi.
At the moment, we don’t have a tutorial about that.
We’ll publish something like that soon with an ESP32-CAM, that you can
adapt to your board.
Regards,
Sara

Reply

Duckiya
October 3, 2020 at 8:06 am

+1
Very interested in using esp32-cam with sim to send an image over
GPRS at preconfigured timings.

Reply

Gyozo Szabo
July 28, 2020 at 6:47 pm

59 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hi Sara,
Congratulation for your nice project and description.
You inspired me to use http post method in my project, called “TALMOB”.
Which is an client-server based temperature logging and monitoring
application. Was developed originally with TCP connection and python on
server side…
Thank you for your great description!!!

Reply

Sara Santos
July 29, 2020 at 9:53 am

That’s awesome!
Regards,
Sara

Reply

Mezerwi
July 30, 2020 at 5:44 am

Great writeup!

ive trying to add second BME sensor. using the adafruits library i cant get
the 2nd sensor reading (return 0).

both address already set (0x77 and 0x76) via ground and vcc

60 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

do you have any other good library that support this?

Reply

Sara Santos
July 30, 2020 at 9:03 am

Hi.
Read this guide about I2C that explains how to use multiple sensors:
https://randomnerdtutorials.com/esp32-i2c-communication-arduino-ide/
Regards,
Sara

Reply

Vahe Arakelyan
August 28, 2020 at 7:58 am

It would be perfect to get version of connecting with cloud based MQTT


broker via GPRS on TTGO T-Call ESP32 SIM800L

Reply

Connor Dorward
September 7, 2020 at 3:55 pm

61 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hello, would you be able to provide a link to the antenna you used? I can’t
seem to find one anywhere. Or if you can’t provide a link, what should I
search to find one. Thanks!

Reply

Dmitry
October 1, 2020 at 11:11 pm

Thanks for great tutorial. What board do you select in Arduino IDE to work
with TTGO T-CALL?

Reply

Sara Santos
October 2, 2020 at 8:25 am

Hi.
I used ESP32 Dev module.
Regards,
Sara

Reply

62 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Gabriel David
November 6, 2020 at 9:20 am

Hey, thank you for this tutorial!

I learned much. I have same question.

I want to connect another I2C in Two Wire, BH1750.


I need to use: Wire.begin(I2C_SDA_2, I2C_SCL_2, 400000);
to start the module.

But
If a use:

I2CPower.begin(I2C_SDA, I2C_SCL, 400000);


I2CBME.begin(I2C_SDA_2, I2C_SCL_2, 400000);
Wire.begin(I2C_SDA_2, I2C_SCL_2, 400000);

// Keep power when running from battery


bool isOk = setPowerBoostKeepOn(1);
SerialMon.println(String(“IP5306 KeepOn “) + (isOk ? “OK” : “FAIL”));

IP5306 always FAIL

I’m using

I2CPower.begin(I2C_SDA, I2C_SCL, 400000);


I2CBME.begin(I2C_SDA_2, I2C_SCL_2, 400000);

// Keep power when running from battery


bool isOk = setPowerBoostKeepOn(1);
SerialMon.println(String(“IP5306 KeepOn “) + (isOk ? “OK” : “FAIL”));

63 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Wire.begin(I2C_SDA_2, I2C_SCL_2, 400000);

IP5306 always OK

But I think if it can prejudice the I2C Power

What is the right way to do this integration?

Thank you in advance for your attention

Reply

Sara Santos
November 6, 2020 at 4:53 pm

Hi.
Read this article to learn how to combine multiple I2C devices:
https://randomnerdtutorials.com/esp32-i2c-communication-arduino-ide/
Regards,
Sara

Reply

Saddam Husain
January 15, 2022 at 6:22 am

64 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

I david i have same problem how you connect BH1750 to t call board
because when i use wire.begin sensor return first reading as. 0 how to
use correct use of Both bme and Bh1750 at same time

Reply

Devis
November 6, 2020 at 11:47 am

hi Rui, nice tutorial, so basically this 800l only work on 2G, what if in my
counry has higher like 4G?
if run only in 2G I think it will slow sent the data right?

Reply

Sara Santos
November 6, 2020 at 4:58 pm

Hi Devis.
I’m not sure, but I think that if your country doesn’t support 2G, it will not
work,
Regards,
Sara

Reply

65 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Jose Manuel Perez Ruiz


December 1, 2020 at 12:20 am

HI,

I follow your excelent tutorial but at the end I just receive 0 in my database.

Any suggestion what is the possible problem?

Thank you

Reply

Mosix
December 20, 2020 at 8:31 pm

Ciao Sara, and ciao Santos,


I hope you are very well.
I’d like to connect the TTGO T-Call to Telegram using the GSM, rather than
the WIFI like in your tutorial for ESP32. Do you think is it possible? A
tutorial on it would be very usefull, I’m not been able to find anything about
it.

Reply

Sara Santos
December 21, 2020 at 10:27 am

66 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hi.
Yes, I think it should be possible.
At the moment, we don’t ave any tutorial about that.
Regards,
Sara

Reply

Mosix
December 21, 2020 at 10:52 am

Thanks for your answer Sara. In the meaning time I tried to modify the
code for connecting the TTGO CALL to TELEGRAM, but it doesn’t work.
I hope I’m wrong but perhaps the SIM800 modem does not support TLS
1.2
Merry Christmas.

Reply

Michael Thøgersen
December 23, 2020 at 12:01 pm

Hi,
Thanks for another great tutorial…

This module also contains charting circuit for the connected LiPo battery
through USB-C connector. Are there any way to connect e.g. a solar panel
directly to the board for charging? Is the USB-C connector the only way to

67 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

use the charging feature?

Thanks in advance
Michael

Reply

Elvio Spiteri
January 10, 2021 at 7:18 pm

Hello Rui & Sara, Thanks very much for this great tutorial. I was thinking if
there is a way how I can set up the data connection credentials (apn, gprs
user, gprspass) through smart config instead of pre-programming the
details. Do you have a tutorial on this?
Thanks very much for your support!

Reply

Gabriel David
January 22, 2021 at 5:24 pm

Sorry, I commented on the wrong article. This is right!

Hi, could you help me?

I made a schedule based on this to connect to Wunderground, but I am


trying a problem, after a while the message sending stops. If you restart
the ESP32 via USB, the sending returns, but by programming it remains

68 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

locked and without sending messages. I realized that the connection step
with the operator is the step that presents the error. Have you seen
anything like that?

Reply

Lucky
February 2, 2021 at 10:04 am

Hello Sara and Rui,

Thank u very much for your excellent tutorials.

Actually i’d like to send image captured by esp32 cam to server using
simcom 800a
rather using wifi.

Can u please help me with this.

Reply

MoZen
February 10, 2021 at 3:04 am

2G is pretty old, have you tried LTE on LilyGo Sim7000G?


I get the following error with 7000G;
#error “Please define GSM modem model”
Anyone had a similar issue with the 7000 G board?

69 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Thanks,
MoZen

Reply

Ranya
March 16, 2021 at 9:47 pm

Hi , Did you solve it ?

Reply

Diego
February 10, 2021 at 6:43 pm

Hello Sara and Rui.


Is it possible to adapt this example to send data to Google Spreadsheets?

Reply

Sara Santos
February 11, 2021 at 10:49 am

Hi.
Yes, I think that’s possible.
This tutorial might be helpful: https://randomnerdtutorials.com/esp32-

70 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

esp8266-publish-sensor-readings-to-google-sheets/
Regards,
Sara

Reply

Francisco
February 14, 2021 at 6:51 pm

Thank you very much for the tutorial,

I have a problem that I cannot solve. I share it with you to see if you can
help me.

I have gone through all the wiring steps and the board is working fine with
some programs, but it failed to detect the sensors. When I test the “I2C
Test” it only detects the following:

19: 46: 24.705 -> Scanning …


19: 46: 24.740 -> I2C device found at address 0x75!
19: 46: 24.775 -> done

But it doesn’t detect any sensor.

I have gone through the cabling several times and tested with the default
pins for SDA and SCL (21 and 22) and others configured ad-hoc (18 and
19, following the example).

I have also seen the entire tutorial below multiple times:

https://randomnerdtutorials.com/esp32-i2c-communication-arduino-ide/

71 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

But it only detects 0x75 …

Does anyone know what may be happening?

Thanks a lot!

Reply

Tony
March 5, 2021 at 8:23 am

Dear Sara,
dear Ruiz,

first of all I would like to say Thank you! for your extraordinary work.

Although o also like “the guy with the swiss accent” a lot, “Great Scott”,
Frans Lab, Mr. Carlson from his special “vacuum lab” and the magnificent
bright folks that brought the ACG to life again… all of those (except Great
Scott and Andreas Spiess), I stick with Randomnerdtutorials.

Your work leads to results. Real results in the perfect mixture between
laziness and keep your nose to the grindstone. All in all wonderful.

When i want to create a system that gathers a bunch of sensor data in the
field, I’m using your tutorials (especially the ones for ESP NOW).

I also tried your tutorials covering TTGO SIM800L, but with that my setup
did not work, when using TINYGSM. That reboots all the time when trying
the sketch.

SIM800-Parser

72 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

On http://www.aeq-web.com two Austrian guys use a low level approach


with direct AT-Instructions. However the problem with that is, that it is kind
of tricky to grab the results of instructions, such as “Give me the signal
strengh.” or “Show me the ‘GPS’ corrordinates”.

Playful technology created a very interesting project

https://youtu.be/mbOHl2Cnemk?t=1323

with a parser to process output of SIM800L. However this is no tutorial.


Little chance to pattern after…

Maybe there is a choice to cover the SIMXX00 again, or one of it`s


relatives (with LTE).
This could be great for citizen data, because the coverage with TTN-LORA
still is very low.

So, SIMXX00 is literally the only way to publish the data. In this respect
thank you very much for your advice with the external antenna. It is
astonishing how good the board works with the antenna that you
mentioned. I was able to transfer data very realiable even from inside
conrete basements, when my phone ceased to work.

Sorry for this far too long post and thank you again very much.

Reply

Sara Santos
March 6, 2021 at 10:57 am

Hi Tony.
I think we have a board with LTE, but I didn’t have the time to experiment
with it yet.

73 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Thanks for your comment.


Regards,
Sara

Reply

CHAM
March 8, 2021 at 9:45 am

Hi, may I know how do I send image to google drive using the combination
of GSM module and ESP32-CAM? Is it possible to achieve it?

Reply

Sayantan
March 11, 2021 at 6:14 pm

Hi, thanks for the nice and detailed tutorial, I have a question, is there any
particular reason behind using separate I2C bus for the BME280 sensor?

Reply

Sara Santos
March 12, 2021 at 12:10 am

74 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

No.
We could have used the same bus.
Regards,
Sara

Reply

Damidu Rathnayaka
August 8, 2021 at 4:55 pm

hey can i use I2C bus for Neo7m GPS module also

Reply

Sara Santos
August 9, 2021 at 9:29 am

Yes.
You can use several devices on the same I2C bus as long as each
device has a unique I2C address.
To better understand, you can take a look at this tutorial:
https://randomnerdtutorials.com/esp32-i2c-communication-arduino-ide/
Regards,
Sara

Reply

75 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Martin Rice
March 13, 2021 at 11:52 am

Hi – very useful tutorial, thanks.

However, I find that a sleep time of 3600 seconds doesn’t give any sleep
time at all! My ESP32SIM800L simply wakes up straight after going to
sleep.

I have investigated this and find that a delay of 2147 seconds seems to
work; at least the system goes to sleep for a while…I haven’t waited for it
to wake up. 2148 seconds reverts to no sleep time. 10,000 seconds gives
some sleep, but again I haven’t actually waited for it to wake up to see if it
actually sleeps for 10,000 seconds. I doubt that it does.

I’m guessing that the maximum sleep time would be 2^31 – 1 micro-
seconds, i.e. the maximum positive value a long can hold. This evaluates
to 2147.483647 seconds.

Reply

Martin Rice
March 13, 2021 at 12:19 pm

Upon further investigation, I find that the code in the Arduino/ESP32


/DeepSleep/TimerWakeUp Example includes the line (line 22)
#define uS_TO_S_FACTOR 1000000ULL
In your code you have
#define uS_TO_S_FACTOR 1000000

76 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

This should be
#define uS_TO_S_FACTOR 1000000UL
so that the arithmetic is carried out as an unsigned long variable.
My code now works for a delay of 3600 seconds.

Reply

Phillip
March 28, 2021 at 8:17 am

Hi Sara, hi Rui, thank you for the tutorial. I would like to send the data to
Thingspeak, unfortunately I always get a Bad Request message. I have
made the following adjustments:

// Server details
// The server variable can be just a domain name or it can have a
subdomain. It depends on the service you are using
const char server[] = “api.thingspeak.com”; // domain name: example.com,
maker.ifttt.com, etc
const char resource[] = “”; // resource path, for example: /post-data.php
const int port = 80;

String apiKey = “MYAPIKEY”;

String httpRequestData = “api_key=” + apiKey + “&field1=” +


String(bme.readTemperature())
+ “&field2=” + String(bme.readHumidity()) + “&field3=” +
String(bme.readPressure()/100.0F) + “”;

I tried to modify your tutorial to HTTP POST, but unfortunately I always get
the error message. Can you tell me where the error is?

77 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Regards, Phillip

Reply

Morne
March 28, 2021 at 5:00 pm

Hi, very nice tutorial. Do you know if there is a way to detect if the power to
the USB is active. I can check the battery voltage through PIN35 but cant
find a way to check the USB voltage.

Reply

Hansie
January 31, 2022 at 2:27 pm

good day can you please help me.I need to monitor the battery voltage
and dont know exactly how .

kind Regards Hansie

Reply

Sara Santos
January 31, 2022 at 10:45 pm

78 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

https://randomnerdtutorials.com/power-esp32-esp8266-solar-panels-
battery-level-monitoring/

Reply

Ariel
April 22, 2021 at 10:35 pm

Muy bueno amigo, podés hacerlo con micropython al mismo proyecto,


sería interesante. Saludos sigue así.

Reply

Kamaleshwahrran a/l naidu


April 29, 2021 at 5:21 pm

hi sara Arduino:
GPS_Tracker_with_ttgoesp32:26:74: fatal error: BlynkSimpleSIM800.h: No
such file or directory
when i try to upload my coding its showing like this where i have inserted
this library in the ide, but still getting this error. do u have this library with
u?TQ

Reply

79 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Souheil
May 1, 2021 at 5:40 pm

Hi,
Does this module has any power pin input (5v).

Reply

ilker
July 2, 2021 at 8:29 am

Thanl you for great tutorial.I have question. According to the schematic Spi
pins mosi:gpio23 cs:gpio5 and sim800l uses 5 and 23 ,does it mean I can t
use spi and sim800l at the same time?So,I have to remap spi pins ,right?

Reply

Sara Santos
July 2, 2021 at 3:46 pm

Hi.
If those pins are also being used by the SIM800 module, it is better to use
other pins for the microSD card.
You can read this tutorial to learn how to use different pins:
https://randomnerdtutorials.com/esp32-microsd-card-arduino
/#sdcardcustompins

80 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Regards,
Sara

Reply

Sopan
July 4, 2021 at 5:53 pm

Hi Rui and Sara,

Great tutorial.
I am using SIM800L with AT commands. Problem is my vendor APIs are
HTTPS instead of HTTP.

I keep getting 601 or 603 or similar errors (DNS error etc) after sending the
data via AT commands.

As well, the APIs are JSON based and need to post data via FormBody
instead of string encoding. This is another headache which I will deal with
later on :(.

May you confirm if SIM800L support HTTPS and if so point to any help
locations please?

Reply

Diego
July 20, 2021 at 3:39 am

81 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hello, I used part of the code to send data from other sensors to
thingspeak, but I only manage to send integer values and no decimal
places, I have the variables in floating type and I also tried to pass them to
string type, but I still cannot send numbers with decimals, any solution ?
Thanks in advance

Reply

José Manuel
July 20, 2021 at 9:50 am

Hi Diego, I’ve been trying the same thing but I haven’t been able. Don’t
know connect with thinkspeak.
Could you share the code .
Thanks in advance.
castrojm1 at gmail.com

Reply

Dalibor
August 17, 2021 at 11:35 am

82 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hello,
is it possible to set APN settings via SMS? If so, how? I want to use device
on several countries with different SIM card, but I do not want to flash code
every time.

Reply

ahmad idris
August 28, 2021 at 2:12 pm

Hi Rui & Sara,

I use the I2C scanner with UNO and return value of 0x76 for the BME280
but when connected to the ESP32 for this tutorial, it returned “Could not
find a valid BME280 sensor, check wiring!
“.

please advise.

Reply

Sara Santos
August 30, 2021 at 9:08 am

83 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hi.
Please double-check that you are using the right I2C pins.
Regards,
Sara

Reply

Moeen
October 4, 2021 at 1:09 pm

Sim800l is one of the greatest module ever!!!!


The project that you have done is also great!!!

Reply

José Manuel Martín


December 7, 2021 at 7:15 pm

Hi. Very good tutorial.

I have one problem. When i start the I2C communication for the SIM800L
module and for the BME280 sensor module the ID show me the following
error: call of overloaded ‘begin(int, int, int)’ is ambiguous
How can I solve this?

Thanks

84 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Reply

Sara Santos
December 8, 2021 at 3:31 pm

Hi.
Are you using the same code we use in this tutorial or did you make any
changes?
Regards,
Sara

Reply

jose manuel garcia martin


December 8, 2021 at 4:08 pm

Yes, I’m using exactly the same code.

Best regards

Reply

Sara Santos
December 8, 2021 at 5:51 pm

Hi.
I just compiled the code again, and it is working just fine for me.
I’m not sure what might be the issue.

85 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Regards,
Sara

Reply

AmaTssO
December 10, 2021 at 1:23 pm

Hi thank you for this wonderful project,


I just have a problem is that I try different sim card and I encounter the
same problem with the “APN connection faiI”,
I don’t know how to solve this

Reply

Sara Santos
December 10, 2021 at 7:25 pm

Hi.
It might be a problem related to the network provider.
I’m not sure…
Regards,
Sara

Reply

AmaTssO
December 11, 2021 at 10:30 am

86 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Thank you for your reply,


Is the esp32 code compatible with the new library update ”
TinyGsmClient.h ” and i must to change the code ?

Reply

Sara Santos
December 13, 2021 at 4:03 pm

Hi.
I haven’t tried the new library yet.
The best place to get an answer about that is the library issues page:
https://github.com/vshymanskyy/TinyGSM/issues
Regards,
Sara

Reply

ahmad
December 11, 2021 at 6:59 am

#define DUMP_AT_COMMANDS
and share what you get here, we might be able to help.

Reply

87 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

AmaTssO
December 15, 2021 at 9:59 am

OK
AT+CIPCLOSE=0,1

+CME ERROR: operation not allowed


AT+CIPSSL=0

OK
AT+CIPSTART=0,”TCP”,”****website*****”,80

OK

0, CONNECT FAIL
Connecting to ****website***
fail

Reply

AHMAD
December 15, 2021 at 1:54 pm

check to see if the website is not HTTPS

Reply

AmaTssO
December 16, 2021 at 9:48 am

88 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hi Ahmad
the website is in http, and I tried with both “http” and “https”, it gave
me the same error

Manfred
December 20, 2021 at 2:22 pm

Hi there,
I would like to connect more DS18B20 digital temperature sensors. Can
you help me how to extend the code?

Best regards
Manfred

Reply

Sara Santos
December 21, 2021 at 10:51 am

Hi.
Check out this tutorial: https://randomnerdtutorials.com/esp32-multiple-
ds18b20-temperature-sensors/
Regards,
Sara

Reply

89 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

José Manuel Martín


December 22, 2021 at 3:45 pm

Hi

Which library Wire are you using in this proyect.

Best Regards

Reply

90 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

José Manuel Martín


December 22, 2021 at 3:48 pm

I have the next error

Wire.h:80:10: note: candidate: ‘bool TwoWire::begin(uint8_t, int, int,


uint32_t)’
bool begin(uint8_t slaveAddr, int sda=-1, int scl=-1, uint32_t
frequency=0);
^~~~~
exit status 1
call of overloaded ‘begin(int, int, int)’ is ambiguous

Have to be the library right?

Regards

Reply

Fernando Simões
January 6, 2022 at 10:11 pm

Olá Rui e Sara,


Desejo-vos bom 2022
Gostaria de talvez usar o módulo TTGO-Call só que necessito saber
quantos pinos de entradas e para saídas estão disponíveis na placa assim
existe além das Uarts usadas, se está disponível uma terceira. Paro o meu
projeto necessito 5 pinos para saída e 12 pinos para entradas. Caso
possam dar essa informação fico grato.

91 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Obrigado
João

Reply

Sara Santos
January 6, 2022 at 10:58 pm

Olá.
Pode encontrar mais informação sobre a TTGO T-Call no proximo link
includingo pinout : https://makeradvisor.com/ttgo-t-call-esp32-with-
sim800l-gsm-gprs/
Esse website também é nosso.
Cumprimentos,
Sara

Reply

92 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Upul
January 9, 2022 at 3:45 pm

Hey, I am a fan of your YouTube channel and page, I am trying to transfer


some data from PC (CodeSys or TIA portal) to nodemcu (ESP8266) using
an ethernet module (ENC28J60). I have tried many times and failed. Since
you are an expert in these, can you help me out if you have the time?
much appreciated. thanks

Reply

Sara Santos
January 9, 2022 at 4:24 pm

Hi.
Unfortunately, I’m not familiar with that subject.
Regards,
Sara

Reply

Mike
January 14, 2022 at 2:24 pm

Hello,

Thank you very much for your excelent work. I would like to ask you about

93 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

using DHT22 sensor with this module. I have a problem when I start the
tcall module by feeding it. Once I feed it, it does not start untill I put away
the DHT22 sensor (I mean to unplug the feed of DHT22 sensor which is
using the 5V output PIN of the tcall and I did also use the 3.3V PIN with the
same results). Once the tcall is on I can connect again the DHT22 and it
works perfectly forever. I have a lot of different ideas about how to solve it,
but all of them include hardware modifications or power supply modification
like powering the module and the sensor from the same power source and
do not use the module power PINs.

Do you have any software solution for this problem? Or any kind of
suggestion? I’m feeding it with enough current (tried from 1A to 4A) and
5V. The wiring is as simple as DATA to digital PIN12 and GND to GND PIN
and VCC to 5V PIN (or 3.3V PIN).

Reply

Emilio
January 26, 2022 at 7:45 pm

Hi,
I need to connect to my server using https so, the code
“(!client.connect(server, port))” won’t work with 443 as port number.
Is there a work around?
Thank you!!

Reply

94 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Keith Le Breton
February 12, 2022 at 8:47 pm

Thank you for your wonderful resource, well written and tested!
I am using the TTGO T-Call ESP32 SIM800L for remote temperature
monitoring. The code works perfectly but I wish to get an SMS alarm if the
mains power is lost so that I can visit the site and restore power before the
battery runs out. I can use a crude method by simply intercepting the 5v
from the USB C connector via a breakout box but I guess that the IP5306
must have some sort of flag to say a charger is connected and this would
be a more elegant and reliable solution. Are you aware of such a register
and a method to read it? I see that the IP5306 register it is written to,
(setPowerBoostKeepOn) but I can’t find out how to read the relevant
register, if it exists, to tell me that the charger is connected. Any ideas,
pointers etc please.

Reply

Ayaz
February 25, 2022 at 7:37 am

Can we use this library for A9G

Reply

95 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Wagner De Queiroz
April 6, 2022 at 2:56 pm

Hi Sara and Rui,


I need understand some issues about TTGO board.

I made a webserver using TTGO TCall, but I like to server some html
pages from GSM to permit i access a html page of the ttgo, like inside WiFi
network.
To use the sim8000L I need use the tinyGSM only?

I tried send AT commands to serialAT but I have problems to read the


serialAT response.

Reply

Sara Santos
April 7, 2022 at 9:51 am

Hi.
No.
You can use the codes for a regular ESP32.
For example, you can use any web servers we have for the regular
ESP32 on this board. Here are examples of web servers:
https://randomnerdtutorials.com/?s=web+server
You just need to make sure you take a look at your board’s pinout which
is a bit different from a regular ESP32.
Regards,
Sara

96 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Reply

Ritesh soni
April 18, 2022 at 12:54 pm

how to solve this error

HTTP/1.1 301 Moved Permanently


Date: Mon, 18 Apr 2022 12:54:25 GMT
Transfer-Encoding: chunked
Connection: close
Cache-Control: max-age=3600
Expires: Mon, 18 Apr 2022 13:54:25 GMT

Reply

Wagner De Queiroz
May 10, 2022 at 3:37 am

301 moved,

Http 301 notification says. Your page is moved to a new address or to


inform you that page now is HTTPS…
Open at web browser the page or try this test a n computer

Telnet http://www.myurl.com 80

You will see a prompt.

97 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Type:

GET http://www.myurl.com HTTP1.1

You will see the 301 error and sometimes show the HTTPS URL to
access with port 443 ou a new location to open.

maybe your page is HTTPS only now. Try change to HTTPS. Or use
another URL.

Reply

Dionne Monteiro
May 4, 2022 at 2:10 pm

First, congratulations on the article. It’s excellent.


Recently, in April 2022, I stayed in Lisbon and did a test with the TTGO
T-Call V1.3 with Vodafone SIM, but it was unsuccessfully. TTGO T-Call
V1.3 can’t be connected to a cell network with the APN specifications. I
bought the Vodafone SIM at the shopping, so it is a common SIM card.
I did a successfully test on Brasil with Claro SIM card. So, the program and
hardware are ok.
There are new APNs on the Vodafone Network? Can I use Hologram or
Things Mobile SIM Cards with the TTGO T-Call V1.3?

Reply

Sara Santos
May 4, 2022 at 8:35 pm

98 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Hi.
I have a vodafone SIM card and it worked fine with the TTGO T-Call.
As for the other cards, they should work, but I never experimented.
Regards,
Sara

Reply

Dionne Monteiro
May 12, 2022 at 7:55 pm

Hi Sara.

Thank you.
Best regards.

Dionne

Reply

Wagner De Queiroz
May 10, 2022 at 3:14 am

Olá Dionne. Saudações do Brasil. O SIM800L é até onde sei um chip 2G.
Acredito que em Portugal as redes 2G foram banidas só restando 3G.
Pergunta a qualquer operadora em Portugal para ter resposta. No Brasil
ainda é possível usar 2G. É uma preocupação que um dia o 2G será
desativado no Brasil. Como existe milhões de modems 2G em uso aqui,

99 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

duvido que desativem no Brasil no médio prazo.

Reply

Wagner De Queiroz
May 10, 2022 at 3:30 am

Em tempo: Vodafone don’t have 2G in many places in Portugal… Look:


2G is green at map.

In Europe they are disabling 2G to use same frequency to 5G….


SIM800L uses only 2G network!

https://www.nperf.com/pt/map/PT/-/813.Vodafone/signal
/?ll=36.77895778557337&lg=-8.285985859122759&zoom=8

Reply

Leave a Comment

100 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Name *

Email *

Website

Notify me of follow-up comments by email.

Notify me of new posts by email.

Post Comment

Visit Maker Advisor – Tools and Gear for


makers, hobbyists and DIYers »

Home Automation using ESP8266 eBook


and video course » Build IoT and home
automation projects.

101 sur 102 16/05/2022, 07:04


ESP32 SIM800L: Publish Data to Cloud without Wi-Fi | Random Nerd T... https://randomnerdtutorials.com/esp32-sim800l-publish-data-to-cloud/

Build a Home Automation System from


Scratch » With Raspberry Pi, ESP8266,
Arduino, and Node-RED.

About Support Terms and Conditions Privacy Policy Refunds Complaints’ Book

MakerAdvisor.com Join the Lab

Copyright © 2013-2022 · RandomNerdTutorials.com · All Rights Reserved

102 sur 102 16/05/2022, 07:04

You might also like