

The ESP32 SIM800L is a powerful combination of the ESP32 microcontroller and the SIM800L GSM/GPRS module. This pairing enables users to create IoT projects with cellular connectivity, allowing for SMS, voice calls, and internet access over a GSM network. The ESP32 provides robust processing power and Wi-Fi/Bluetooth capabilities, while the SIM800L adds GSM functionality, making this combination ideal for remote monitoring, IoT applications, and smart devices.








| Parameter | Value |
|---|---|
| Microcontroller | Tensilica Xtensa LX6 dual-core |
| Operating Voltage | 3.3V |
| Flash Memory | 4MB (varies by model) |
| Wi-Fi | 802.11 b/g/n |
| Bluetooth | BLE and Bluetooth Classic |
| GPIO Pins | 34 |
| Operating Temperature | -40°C to 125°C |
| Parameter | Value |
|---|---|
| Operating Voltage | 3.4V - 4.4V |
| Operating Current | 1.0A (peak), ~20mA (idle) |
| Frequency Bands | Quad-band 850/900/1800/1900 MHz |
| Communication Protocol | AT Commands over UART |
| SIM Card Support | Micro SIM |
| GPRS Data Rate | Up to 85.6 kbps |
| Operating Temperature | -40°C to 85°C |
| Pin Name | Description |
|---|---|
| VIN | Power input (5V) |
| GND | Ground |
| GPIO0 | General-purpose I/O |
| GPIO1 | UART TX (default) |
| GPIO3 | UART RX (default) |
| GPIO21 | I2C SDA |
| GPIO22 | I2C SCL |
| Pin Name | Description |
|---|---|
| VCC | Power input (3.4V - 4.4V) |
| GND | Ground |
| TXD | UART Transmit |
| RXD | UART Receive |
| RST | Reset |
| NET | Network status indicator |
TXD pin to the ESP32 RX pin (e.g., GPIO16).RXD pin to the ESP32 TX pin (e.g., GPIO17).GND pin to the ESP32 GND.Below is an example of how to send an SMS using the ESP32 and SIM800L:
#include <HardwareSerial.h>
// Create a hardware serial object for SIM800L communication
HardwareSerial sim800l(1);
void setup() {
// Initialize serial communication for debugging
Serial.begin(115200);
// Initialize SIM800L communication on UART2 (GPIO16 and GPIO17)
sim800l.begin(9600, SERIAL_8N1, 16, 17); // RX=16, TX=17
// Wait for the SIM800L to initialize
delay(3000);
Serial.println("Initializing SIM800L...");
// Send AT command to check communication
sim800l.println("AT");
delay(1000);
while (sim800l.available()) {
Serial.write(sim800l.read()); // Print SIM800L response
}
// Set SMS text mode
sim800l.println("AT+CMGF=1"); // Set SMS mode to text
delay(1000);
while (sim800l.available()) {
Serial.write(sim800l.read());
}
// Send SMS command
sim800l.println("AT+CMGS=\"+1234567890\""); // Replace with recipient's number
delay(1000);
sim800l.println("Hello from ESP32 and SIM800L!"); // SMS content
delay(1000);
sim800l.write(26); // Send Ctrl+Z to indicate end of message
delay(5000);
Serial.println("SMS sent!");
}
void loop() {
// Nothing to do here
}
AT+CSQ command to check signal strength. A value of 10 or higher is recommended for reliable operation.SIM800L Not Responding to AT Commands
SMS Not Sending
Frequent Restarts or Unstable Operation
No Network Connection
AT+CREG? command to check network registration status.Can I use the ESP32's 3.3V pin to power the SIM800L? No, the SIM800L requires 3.7V to 4.2V and can draw up to 2A during operation. Use a separate power source.
How do I check the SIM800L's firmware version?
Send the AT+GMR command to the SIM800L. It will return the firmware version.
Can I use the SIM800L for internet access?
Yes, the SIM800L supports GPRS. Use AT commands like AT+SAPBR and AT+HTTP to configure and access the internet.
What is the maximum SMS length supported? The SIM800L supports SMS messages up to 160 characters in text mode. For longer messages, use concatenated SMS.
This documentation provides a comprehensive guide to using the ESP32 SIM800L module for various IoT applications.