In many real-world IoT scenarios remote farms, off-grid cabins, or disaster zones—internet access is unreliable or completely unavailable. But that doesn’t mean your IoT project has to stop working. Thanks to technologies like ESP-NOW and LoRa, you can still build powerful, wireless ESP32-based systems that don’t rely on Wi-Fi or mobile networks.
In this post, we’ll explore how to build offline ESP32 IoT projects using ESP-NOW and LoRa for peer-to-peer or long-range communication. Whether you’re working on remote environmental monitoring, emergency alert systems, or mesh-based automation, ESP32 IoT Project with ESP-NOW will open new possibilities.
🔧 What You’ll Learn
- What ESP-NOW and LoRa are, and when to use each
- How to set up ESP-NOW communication between ESP32 boards
- How to use LoRa modules with ESP32 for long-range transmission
- Sample projects you can build without internet access
What is ESP-NOW?
ESP-NOW is a wireless communication protocol developed by Espressif that allows smart devices to communicate directly, quickly, and with low power consumption, no router required. It works alongside Wi-Fi and Bluetooth LE, and is compatible with ESP8266, ESP32, ESP32-S, and ESP32-C series SoCs. This protocol is widely used in applications such as smart home devices, remote controls, and sensor networks. Looking for an ESP32 vs. ESP8266 comparison? see Introduction and comparison of ESP32 and ESP8266.
🔹Key Features of ESP-NOW:
- Peer-to-peer communication
- No Wi-Fi network required
- Very low power consumption
- Supports broadcasting to multiple nodes
- Data payloads up to 250 bytes
What is LoRa?
LoRa (Long Range) is A low-power, long-range wireless communication technology developed by Semtech, designed mainly for the Internet of Things (IoT), enabling the transmission of small data packets across extensive distances.
🔸Key Features of LoRa:
- Communication over several kilometers
- Low power, battery-friendly
- Suitable for low-bandwidth sensor data
- Requires LoRa modules (like SX1278 or Ra-02) paired with ESP32
LoRa operates on unlicensed radio frequencies that are available globally.
The most commonly used LoRa frequency bands include:
- 868 MHz for Europe
- 915 MHz for North America
- 433 MHz band for Asia
ESP-NOW vs LoRa: Which One Should You Use?
Feature | ESP-NOW | LoRa |
Range | ~100 meters (urban) | Up to 10 km (open area) |
Data Rate | Higher | Very Low |
Power Usage | Low | Very Low |
Setup Complexity | Easy (built into ESP32) | Medium (needs external module) |
Best Use Case | Local mesh or broadcast | Remote sensing, agriculture, alerts |
See Best IoT Microcontrollers for 2025 Projects
Initiators and Responders
A device on an ESP32 IoT Project with ESP-NOW network can work in one of two roles:
Initiator: This is the device that starts the communication. It needs to know the MAC address of the device it’s sending data to.
Responder: This is the device that listens for and receives the data.
In a one-way (half-duplex) setup, one device sends (Initiator), and the other simply receives (Responder).
But in a two-way (full-duplex) setup, both devices take turns sending and receiving, so each one acts as both an Initiator and a Responder.
ESP-NOW technology comes with the following limitations:
- A maximum of 10 encrypted peers is supported in Station mode, and up to 6 in SoftAP or SoftAP + Station mode.
- While multiple unencrypted peers are allowed, the total number of peers—including both encrypted and unencrypted—must remain below 20.
- The payload size is restricted to 250 bytes.
Just keep in mind, LoRa isn’t the best choice for projects that:
- Require high data-rate transmission
- Need very frequent transmissions
- Operate in highly congested networks
ESP-NOW is very versatile and you can have one-way or two-way communication in different Project with ESP-NOW and LoRa setups.
Offline ESP32 IoT projects: One-Way Communication
In this setup, the Initiator ESP32 sends data to the Responder ESP32 and can determine whether the message was successfully received.
Although this way is simple, the configuration is highly useful for remote control applications.
Basic ESP-NOW Setup for ESP32
Here’s a simple example of sending sensor data between two ESP32 boards using ESP-NOW.
📋 Requirements:
- 2x ESP32 boards
- Arduino IDE
Getting ESP32 MAC Address Easily
To send data using ESP-NOW, you need to know the MAC address of the ESP32 you want to reach. Think of it like the device’s home address, it tells your board exactly where to deliver the message.
Every ESP32 has its own unique MAC address, and that’s how we identify which board to communicate with.
- Include WiFi library: Add
#include <WiFi.h>
at the top of your code. - Get MAC address: Use
WiFi.macAddress()
to get it as a string. - Print it: Show the MAC in Serial Monitor with
Serial.println()
.
|
Another way to find the ESP32 MAC address is this: Once you’ve uploaded the code, open the Serial Monitor with the baud rate set to 115200. Then, press the RST/EN button on your ESP32. You should see the MAC address appear in the output.
📒 Note: Be sure to save your board’s MAC address, you’ll need it later to make sure your data gets sent to the right ESP32 using ESP-NOW.
Alright, now that we have the MAC addresses of the boards, let’s move on to programming the sender and receiver boards.
Sender Code:
|
Receiver code:
|
Basic LoRa Setup for ESP32
You’ll need LoRa modules (e.g., Ra-02 SX1278) and the RadioHead or LoRa Arduino library.
📋 Requirements:
- 2x ESP32 boards
- Arduino LoRa library
- 2x SX1278 LoRa modules (🛒 Buy)
- Jumper wires
Sender Code Example:
|
Receiver Code:
|
ESP-NOW Multi Device Setup with ESP32: Control Multiple Boards from One Master
With ESP-NOW, you can easily set up one ESP32 as a central controller to wirelessly send data or commands to multiple ESP32 boards. It can transmit the same or different commands to each device. This setup is ideal for building a remote control system ESP32 IoT Project with ESP-NOW, where a central ESP32 controls several others positioned throughout a house.
ESP-NOW Multi Device Setup with ESP32: One Device Receiving Data from Multiple Masters
This setup is ideal for aggregating data from several sensor nodes into a single board, which can, for example, be configured as a web server to display data from all connected devices. This configuration allows a single ESP32 to efficiently collect data from multiple master devices, simplifying management and enabling centralized processing. It’s perfect for IoT networks where sensor data needs to be monitored and controlled from one point.
Offline ESP32 IoT projects: Two-Way Communication
In two-way communication, both devices can send and receive data from each other. This makes it possible to have a back-and-forth flow of information, so the devices can interact in real-time. It’s great for projects where both sides need to communicate—like remote controls or smart IoT devices that need to respond to each other. . You can add more boards to this configuration and have something that looks like a network in iot lora project (all ESP32 boards communicate with each other).
📒 Note: The official ESP-NOW documentation doesn’t actually use terms like ‘sender/master’ or ‘receiver/slave’—every ESP32 board can act as either one, depending on the situation. However, to keep things simple and easy to follow, we’ll use the terms ‘sender’ and ‘receiver’ (or ‘master’ and ‘slave’) throughout this guide.
🛒 Shop LoRa modules & components
Final Thoughts
You don’t always need internet to build a reliable and functional IoT system. ESP-NOW and LoRa empower makers and engineers to build resilient, decentralized, and battery-efficient networks. If your next iot lora project needs to work offline, over long distances, or in emergency conditions, give these technologies a try, you might be surprised how much you can achieve without Wi-Fi.
Have you used ESP-NOW or LoRa in your own projects? What worked, what didn’t, and what surprised you?
Drop a comment below and let’s start a conversation! 👇
FAQ:
Can ESP-NOW and LoRa be used together in the same ESP32 project ?
Yes. The ESP32 supports using ESP-NOW and LoRa simultaneously, as they operate on different hardware interfaces, ESP-NOW uses Wi-Fi (2.4 GHz), while LoRa uses a separate radio module (typically via SPI). This allows one ESP32 to act as a local controller via ESP-NOW and a long-range node via LoRa, without needing internet access.
Do I need a Wi-Fi router or internet connection to use ESP-NOW or LoRa?
No. Both ESP-NOW and LoRa work completely offline. ESP-NOW creates a direct device-to-device communication network (like a mesh or point-to-multipoint), while LoRa uses long-range, low-power radio communication. Neither requires a router, SIM card, or Wi-Fi network in iot lora project.
How far can ESP-NOW and LoRa transmit, and which should I use?
ESP-NOW is best for short-range (up to ~200 meters line-of-sight). LoRa is ideal for long-range (up to 1–5 km in rural areas, and ~500–800 meters in urban environments). You can use ESP-NOW for local communication between nearby ESP32 boards and LoRa to bridge longer distances or remote nodes in your offline IoT setup.
2 Responses