A simple wireless communication project using LoRa modules to send messages between an ESP32 WROVER-E and a Raspberry Pi Zero.
- ESP32 WROVER-E development board
- RYLR998 LoRa module (915MHz)
- Jumper wires
- Breadboard (optional)
- Raspberry Pi Zero (or any Pi with GPIO)
- RYLR998 LoRa module (915MHz)
- Jumper wires
ESP32 WROVER-E RYLR998
GPIO 21 → TX
GPIO 22 → RX
3.3V → VCC
GND → GND
Pi Zero RYLR998
GPIO 14 (TX) → RX
GPIO 15 (RX) → TX
3.3V → VCC
GND → GND
- Install ESP32 board support in Arduino IDE
- Select "ESP32 Dev Module" as board
- Upload the ESP32 transmitter code
- Open Serial Monitor at 115200 baud to see transmission status
-
Enable UART in raspi-config:
sudo raspi-config # Interface Options → Serial Port # Enable serial port hardware, disable serial console
-
Add to
/boot/firmware/config.txt:enable_uart=1 -
Install required Python package:
python3 -m venv venv source venv/bin/activate pip install pyserial -
Run the receiver:
python3 simple_receiver.py
- Configures ESP32 WROVER-E as LoRa transmitter
- Sends "Hello from ESP32!" every 5 seconds
- Uses address 1, sends to address 2
- Configures Pi Zero as LoRa receiver
- Listens for messages from ESP32
- Uses address 2, receives from address 1
Both devices must have matching LoRa settings:
- Frequency: 915MHz (US) - Change to 868MHz for Europe
- Network ID: 7
- Addresses: ESP32=1, Pi=2
-
Start the receiver on Pi Zero:
python3 simple_receiver.py
-
Power up the ESP32 - it will automatically start transmitting
-
Expected output on Pi:
LoRa configured - listening for messages... From 1: Hello from ESP32! From 1: Hello from ESP32!
- Check wiring connections
- Verify both devices have same frequency/network settings
- Ensure Pi UART is properly enabled
- Check for other processes using
/dev/serial0
- Ensure antennas are properly connected
- Check for interference from other devices
- Verify 3.3V power supply is stable
- Try different locations/orientations
# Check if serial port exists
ls -l /dev/serial*
# Test basic communication
echo "AT" > /dev/serial0The receiver shows signal strength indicators:
- RSSI: Received Signal Strength (-30 dBm is excellent, below -80 dBm is poor)
- SNR: Signal-to-Noise Ratio (positive values are good)
// ESP32 code
lora.println("AT+BAND=868000000"); // For Europe// ESP32 code
delay(10000); // Send every 10 seconds instead of 5// ESP32 code
String message = "Sensor reading: " + String(analogRead(A0));Typical range depends on environment:
- Open field: 2-10 km
- Urban environment: 200m-2km
- Indoor: 50-200m
- US: 915MHz ISM band, no license required
- Europe: Use 868MHz instead of 915MHz
- Other regions: Check local regulations
This project is open source. Feel free to modify and distribute.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
For issues or questions:
- Check the troubleshooting section
- Review RYLR998 datasheet
- Open an issue on GitHub
Note: This is a basic implementation. For production use, consider adding error handling, encryption, and proper protocol design.