A wireless communication system built on two ESP32 using the ESP-NOW protocol. This project provides a transmitter-receiver pair for wireless data transmission.
This repository contains firmware for creating a wireless adapter system consisting of:
- Wireless Transmitter: Receives data from an HID, and packages and sends data wirelessly to the RX using ESP-NOW
- Wireless Receiver: Receives data wirelessly using ESP-NOW and delivers input-reports to a host PC.
- ESP-NOW MAC Utility: Helper utility to retrieve device MAC addresses for pairing
- Custom Components: Custom components and configuration shared across RX and TX architecture.
- ESP-NOW Protocol: Fast, wireless communication between ESP32 devices
- Low Latency: Below 5ms RTT on Average
- Bidirectional Communication: Both transmitter and receiver components
- Modular Design: Structured with custom components and decoupled architecture for easier extension
- CMake Build System: Standard ESP-IDF build configuration
WirelessAdapter/
├── wireless_transmitter-2.0/ # Transmitter firmware
│ ├── main/ # Main application code
│ ├── CMakeLists.txt # Build configuration
│ └── structure.puml # Architecture diagram
├── wireless_receiver-2.0/ # Receiver firmware
│ ├── main/ # Main application code
│ ├── CMakeLists.txt # Build configuration
│ └── structure.puml # Architecture diagram
├── espnow_getmac/ # MAC address utility
│ ├── main/ # Main application code
│ └── CMakeLists.txt # Build configuration
└── custom_components/ # Reusable components
- ESP-IDF: Espressif IoT Development Framework (version 4.x or 5.x)
- ESP32 Development Board: Any ESP32 series board that supports both ESP_NOW & USB_OTG
- USB Cable: For flashing and serial communication
- Python 3.x: Required by ESP-IDF
Follow the official ESP-IDF installation guide for your operating system.
git clone https://github.com/AndrewTheeFirst/WirelessAdapter.git
cd WirelessAdapterBefore pairing devices, you need to know their MAC addresses:
cd espnow_getmac
idf.py build flash monitorNote the MAC address displayed in the serial output.
cd wireless_transmitter-2.0
idf.py build flash monitorcd wireless_receiver-2.0
idf.py build flash monitor- Flash the
espnow_getmacutility to both ESP32 boards to obtain their MAC addresses - Update the MAC addresses in the transmitter and receiver code
- Rebuild and reflash both devices
The project uses PlantUML diagrams (structure.puml) in each component directory to document the architecture. View these files with a PlantUML viewer or plugin.
Andrew (@AndrewTheeFirst)
- ESP-IDF framework by Espressif Systems
- ESP-NOW protocol documentation and examples