Reference
SIM800L
Quad-band GSM/GPRS modem — send SMS, check signal and network registration.
- Connects over
- UART (serial)
- Made by
- SIMCom
- Datasheet
- elecrow.com
Use it
hardware {
device sim800l: SIM800L
}
every 1s {
let value: bool = sim800l.ready()
log("sim800l", "ready={value}")
}
The SIM800L talks over a UART. On its own the declaration gets a free serial port; to choose the pins, declare uart modem(tx: 17, rx: 16, baud: 9600) and write device sim800l: SIM800L on modem.
Methods
-
sim800l.ready() -> bool
true if the modem answers AT with OK
-
sim800l.registered() -> bool
true when registered on the home or a roaming network
-
sim800l.signal() -> int
Signal quality 0-31 (99 = unknown); 10+ is usable
-
sim800l.send_sms(number: string, text: string) -> bool
Send an SMS in text mode; blocks up to 10 s waiting for the network
Wiring
| Pin | Connect to |
|---|---|
VCC | 4.0V from a Li-ion cell or a buck converter, never the MCU 3.3V pin |
GND | Common ground with the MCU |
TXD | To MCU RX (GPIO16 on ESP32) |
RXD | From MCU TX (GPIO17 on ESP32) via 1 kΩ |
RST | Optional, active low |
Specifications
- Voltage
- 3.4-4.4V (4.0V ideal) — NOT 3.3V, NOT 5V
- Current
- 2 A bursts on transmit; 1000 µF+ across VCC/GND
- Logic
- 2.8V — TX is fine into a 3.3V MCU, put ~1 kΩ in series on RX
- Baud
- 9600 default (autobaud on many units)
Tips
- Status LED: blink every 1 s = searching, every 3 s = registered, reboot loops = supply sag.
- Attach the antenna before power.
- Registration takes 10-60 s after power-up; poll registered() before sending.
Alternatives worth knowing:
- SIM7600: 4G/LTE — needed where 2G is switched off.