A firmware for the popular ESP32 modules from Espressif Systems. Probably the cheapest way to communicate with your drone, UAV, UAS, ground-based vehicle or whatever you may call them.
It also allows for a fully transparent serial to WiFi pass-through link with variable packet size (Continuous stream of data required).
DroneBridge for ESP32 is a telemetry/low data rate-only solution. There is no support for cameras connected to the ESP32 since it does not support video encoding.
- Bidirectional: serial-to-WiFi, serial-to-WiFi Long-Range (LR), serial-to-ESP-NOW link
- Support for MAVLink, MSP, LTM or any other payload using transparent option
- Affordable: ~7€
- Up to 150m range using standard WiFi
- Up to 1km of range using ESP-NOW or Wi-Fi LR Mode - sender & receiver must be ESP32 with LR-Mode enabled
- Fully encrypted in all modes including ESP-NOW broadcasts secured using AES-GCM 256 bit!
- Weight: <8 g
- Supported by: QGroundControl, Mission Planner, mwptools, impload etc.
- Easy to set up: Power connection + UART connection to flight controller
- Fully configurable through an easy-to-use web interface
- Parsing of LTM & MSPv2 for more reliable connection and less packet loss
- Parsing of MAVLink with the injection of Radio Status packets for the display of RSSI in the GCS
- Fully transparent telemetry down-link option for continuous streams
- Reliable, low latency
The number of drones is only limited by the channel capacity and the ESP32s processing power. All data is encrypted using AES256-GCM.
Officially supported and tested boards:
Do the project and yourself a favour and use one of the officially supported and tested boards below.
These boards are very low in price, have everything you need and are also very small. Perfect for use on any drone.
- Official board for DroneBridge for ESP32 ebay DE/EU
Official board for DroneBridge for ESP32 ebay EU- spares from the second batch, pre-installed and ready for use
currently shipping to EU only - contact seller for non-EU shipping options
- spares from the second batch, pre-installed and ready for use
- Official board for easy use as ground station coming soon!
For further info please check the wiki!
First download the latest release from this repository. You can find them here.
There are multiple ways how to flash the firmware.
For further info please check the wiki!
- Connect the UART of the ESP32 to a 3.3V UART of your flight controller. It is not recommended to use the ESP32s pins that are marked with TX & RX since they often are connected to the internal serial ouput. Go for any other pin instead!
- Set the flight controller port to the desired protocol.
Check out the manufacturer datasheet! Only some modules can take more than 3.3V. Follow the recommendations by the ESP32 board manufacturer for powering the device
For further info please check the wiki!
- Connect to the wifi
DroneBridge ESP32
with passworddronebridge
- In your browser type:
dronebridge.local
(Chrome:http://dronebridge.local
) or192.168.2.1
into the address bar. You might need to disable the cellular connection to force the browser to use the WiFi connection - Configure as you please and hit
save
For further info please check the wiki!
- The ESP will auto-send data to all connected devices via UDP to port 14550. QGroundControl should auto-connect using UDP
- Connect via TCP on port 5760 or UDP on port 14550 to the ESP32 to send & receive data with a GCS of your choice.
- In case of a UDP connection the GCS must send at least one packet (e.g. MAVLink heart beat etc.) to the UDP port of the ESP32 to register as an endpoint. Add ESP32 as an UDP target in the GCS
- Manually add a UDP target using the web interface
If you benefited from this project please consider a donation:
For questions or general chatting regarding DroneBridge for ESP32 please visit the Discord channel
You will need the Espressif SDK: esp-idf + toolchain. Check out their website for more info and on how to set it up.
The code is written in pure C using the esp-idf (no Arduino libs).
Compile using esp-idf v5.1 or esp-idf v5.2
- ESP32
idf.py set-target esp32 build
- ESP32S2
idf.py set-target esp32s2 build
- ESP32S3
idf.py set-target esp32s3 build
- ESP32C3
idf.py set-target esp32c3 build
Or compile all at once with release configuration running the release scripts for bash or powershell create_release_zip.sh
or create_release_zip.ps1
This project supports the v5.1.2 & v5.2.2 of ESP-IDF
Compile and flash by running: idf.py build
, idf.py flash
The web interface is built using the command idf.py frontend
. This is done automatically when compiling the entire project using idf.py build
.
The frontend is built to build/frontend
.
Alternatively, the frontend can be built using npm install && npm i -D shx && npm run build
within /frontend/
, then manually copy the content of /frontend/build
to /build/frontend
The web interface communicates with a REST: API on the ESP32. You can use that API to set configurations not selectable via the web interface (e.g. baud rate). It also allows you to easily integrate DroneBridge for ESP32.
GET http://dronebridge.local/api/settings
GET http://dronebridge.local/api/system/stats
GET http://dronebridge.local/api/system/info
GET http://dronebridge.local/api/system/clients
POST http://dronebridge.local/api/system/reboot
Send a valid JSON
{
"esp32_mode": 2,
"wifi_ssid": "DroneBridge",
"wifi_pass": "dronebridge",
"ap_channel": 6,
"trans_pack_size": 128,
"tx_pin": 4,
"rx_pin": 5,
"cts_pin": 0,
"rts_pin": 0,
"rts_thresh": 64,
"baud": 115200,
"telem_proto": 4,
"ltm_pp": 2,
"ap_ip": "192.168.2.1",
"static_client_ip": "",
"static_netmask": "",
"static_gw_ip": ""
}
to
POST http://dronebridge.local/api/settings
Send a valid JSON
{
"ip": "XXX.XXX.XXX.XXX",
"port": 452
}
to
POST http://dronebridge.local/api/settings/clients/udp
Send a valid JSON to set static IP and send the same JSON but with empty strings ("client_ip": ""
) to remove the static IP setting
{
"client_ip": "XXX.XXX.XXX.XXX",
"netmask": "XXX.XXX.XXX.XXX",
"gw_ip": "XXX.XXX.XXX.XXX"
}
to
POST http://dronebridge.local/api/settings/static-ip
Check /test
for scripts triggering the API.
To test the frontend without the ESP32 run
npm install -g json-server
json-server db.json --routes routes.json
Set const ROOT_URL = "http://localhost:3000/"
inside index.html
and the <script>
block