Configuration

Configuration Options for DroneBridge for ESP32

Web Interface

  1. Connect to the wifi DroneBridge for ESP32 with password dronebridge

  2. In your browser type: dronebridge.local (Chrome: http://dronebridge.local) or 192.168.2.1 into the address bar. You might need to disable the cellular connection to force the browser to use the WiFi connection

  3. Configure as you please and hit save & reboot

UART Parameters

For the Official DroneBridge for ESP32 Board HW v1.0 & HW v1.1

UART TX Pin: 5 UART RX Pin: 4 UART RTS Pin: 6 UART CTS Pin: 7

DroneBridge for ESP32 Modes

DroneBridge for ESP32 supports the following modes:

MavLink IndexDroneBridge for ESP32 ModeEncryptionDescriptionNotes

1

WiFi Access Point Mode

WPA2 PSK

ESP32 launches classic WiFi access point using 802.11b rates

Any WiFi device can connect

2

WiFi Client Mode

min. WEP

ESP32 connects to an existing WiFi access point. LR Mode supported

Encryption defined by access point. Multiple drones can connect to one AP and GCS. 802.11b rates

3

WiFi Access Point Mode LR

WPA2 PSK

ESP32 launches WiFi access point mode using espressifs LR mode

Only ESP32 LR Mode enabled devices can detect and connect to the access point. Data rate is reduced to 0.25Mbit. Range is greatly increased.

4

ESP-NOW LR Mode AIR

AES256-GCM

ESP32 is able to receive ESP-NOW broadcast packets from any GCS in the area and forwards them to the UART. Broadcasts to all GND stations in the area.

Connectionless protocol. Data reate is reduced to 0.25Mbit. Range is greatly increased compared to WiFi modes. Custom encryption mode for ESP-NOW broadcasts and protocol.

5

ESP-NOW LR Mode GND

AES256-GCM

ESP32 is able to receive ESP-NOW broadcast packets from any drone in the area and forwards them to the UART. Broadcasts to all AIR stations in the area.

Connectionless protocol. Data rate is reduced to 0.25Mbit. Range greatly increased compared to WiFi modes. Custom encrpytion mode for ESP-NOW broadcasts and protocol.

WiFi Access Point Mode

ESP32 will create a Wi-Fi Access Point to which other ground control stations (GCS) can connect. UDP and TCP connections are accepted. All traffic is secured using WPA2-PSK.

Configuration

A single ESP32 is used and connected via the UART serial interface to the flight controller.

  • Set the Mode to WiFi Access Point Mode and define an SSID and password for the access point.

  • Define the correct pins (for official boards see above) and baud rate for the UART serial interface to the flight controller.

  • Set the desired protocol and packet size.

Save the settings and restart the ESP32. After that, you are able to connect to the access point using WiFi. Once connected open the GCS and connect via UDP or TCP to the ESP32s IP address (default is 192.168.2.1 if not defined otherwise in the web interface)

WiFi Client Mode

ESP32 will try to connect to the specified WiFi Access Point.

In case of a UDP connection, the ground station must send at least one packet (e.g. MAVLink heartbeat etc.) to the UDP port of the ESP32 to register as an endpoint. The ESP32 will then broadcast UDP messages to that packet's origin (port&ip). Otherwise, the ESP32 will not be aware of the potential clients. The ESP32 on its own will not simply start broadcasting UDP messages. For QGroundControl a Server Address can be specified when setting up a UDP connection. Add the ESP32s IP and port there:

Alternatively, you can manually add a UDP target via the web interface using the "+" under "connected UDP clients".

WiFi Access Point Mode LR

The same as the WiFi Access Point Mode only with espressifs' own LR mode enabled. This means that only other DroneBridge for ESP32 devices can see and connect to the access point (the access point is invisible to laptops and phones etc.). Thanks to LR mode the data rate is reduced and the max. possible range greatly increased. Read more about it here!

An additional serial-to-USB adapter that connects to the configured UART of the GND ESP32 is necessary on the ground. The GCS then receives the data via that serial device (e.g. COMx on Windows).

ESP-NOW LR Mode GND & ESP-NOW LR Mode AIR

DroneBridge for ESP32s`custom ESP-NOW implementation using ESP-NOW broadcast packets with an AES256-GCM encrypted payload. Like with all LR modes it requires you to have ESP32 devices as AIR and GND unit and an serial-to-USB adapter to connect a GCS. More robust mode compared to the WiFi LR Mode since the ESP-NOW protocol is connectionless. The specified WiFi password is used for encryption.

You will not be able to change the config once ESP-NOW mode is enabled since the web interface will be unavailable! Short press the boot button on the ESP32 to enable WiFi access point mode to be able to change settings.

Notes on security: The AES-GCM encryption uses random IVs. If an attacker can listen to all of the traffic (encrypted using the same password), he has a 50% chance of decrypting/cracking your password after 2^48 packets. For you, this means you should change your password from time to time to be on the secure side. Generally, changing the password every 2^32 packets is advised to reduce the probability of a successful decryption attack to 1 in 4 billion. Since telemetry is not generating a massive amount of packets/second you should be fine :)

Configuration

Configure the ESP32 devices the following way depending on their role. Recommendation: the web interface will not be available in ESP-NOW mode. It is recommended that the serial configuration be first tested using WiFi Client Mode or WiFi Access Point Mode. So first make sure you have a working setup when using a standalone ESP32 in Client or AP mode, then add the second ESP32 and configure both in ESP-NOW mode.

Drone Configuration

  • Mode: ESP-NOW LR Mode AIR

  • Define a secure password - SSID is ignored (all ESP32s must share the same password)

  • Set the channel to a number between 1-11 (all ESP32s must share the same channel)

  • Set the TX & RX pin according to your configuration (official ESP32C3 board: TX=5, RX=4) and optionally the RTS & CTS pin if flow control shall be used

  • Set the serial protocol according to your needs. (for MAVLink the max. packet size shall be >=64 bytes)

Save the settings and trigger a reboot!

Ground Configuration

  • Mode: ESP-NOW LR Mode GND

  • Define a secure password - SSID is ignored (all ESP32s must share the same password)

  • Set the channel to a number between 1-11 (all ESP32s must share the same channel)

  • Set the TX & RX pin according to your configuration. Set with the default firmware you need to connect a UART to USB adapter to the ESP32. Define the pins used for the connection here. If you are running the experimental USBSerial firmware, you will not be able to see these options since all serial data is sent via the USB port.

  • Set the serial protocol according to your needs. (for MAVLink the max. packet size shall be >=64 bytes)

Other Parameters

  • Wifi SSID: Up to 31 characters long. WiFi must be at least WEP protected.

  • Wifi password: Min. 8 characters, max 63 characters long. WiFi must be at least WEP encrypted. No support for unencrypted networks!

  • UART baud rate: Same as you configured on your flight controller. Try baud rates at the lower end if you see data but your GCS is not showing any of it.

  • UART TX Pin & UART RX Pin: The pins you want to use for TX & RX (UART). Check the pin out of the manufacturer of your ESP32 device. You must enter the GPIO number. Flight controller UART must be 3.3V or use an inverter. If pins are the same for TX & RX the UART connection will not be established (UART remains closed).

  • RTS PIN Number & CTS PIN Number: Set to different pins to enable UART HW flow control. Enter the GPIO pin number of the connected pin on your ESP32.

  • UART RTS Threshold: Set any number of bytes between 0-127. It is used only when UART flow control is enabled.

  • UART serial protocol: MultiWii-based, fully transparent (no parsing - all kinds of data allowed as long as it is a continuous stream) or MAVLink-based - configures the parser. With MAVLink the packets get aggregated till no more complete packet fits into the buffer. With MAVLink the ESP32 will also inject Radio Status messages into the telemetry stream so the GCS can see the telemetry radios RSSI in all modes.

  • Maximum Packet Size: Only used with 'serial protocol' set to transparent or MAVLink. The maximum length of the packet. ESP-NOW only supports packets <250bytes. The packet size will be capped/internally set to 250 bytes if specified higher.

  • LTM frames per packet: Buffer the specified number of packets and send them at once in one packet

  • Gateway IP address: IPv4 address you want the ESP32 access point to have

Resetting the ESP32

If you made a configuration error and want to reset the settings of the ESP32 you can do so using the BOOT Button in the release v2.0 and onwards.

  • A short press/click of the boot button will reset the Mode and WiFi settings of the ESP32 to Access Point mode with dronebridge as the password. That way you can check the configuration.

  • A long press (>1.8s) of the boot button will reset all settings back to defaults. The WiFi Access Point password is dronebridge.

Last updated