Configuration
Configuration Options for DroneBridge for ESP32
Last updated
Was this helpful?
Configuration Options for DroneBridge for ESP32
Last updated
Was this helpful?
Connect to the wifi DroneBridge for ESP32
with password dronebridge
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
Configure as you please and hit save & reboot
For the Official DroneBridge for ESP32 Board HW v1.0, HW v1.1 & HW v1.2. This configuration is only valid for the official boards! If you did not connect the flow control lines, set RTS and CTS pins to 0 to disable flow control. Check the Flow Control section for more details.
UART TX GPIO/Pin: 5
UART RX GPIO/Pin: 4
UART RTS GPIO/Pin: 6
UART CTS GPIO/Pin: 7
DroneBridge for ESP32 supports the following modes:
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.
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.
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)
ESP32 will try to connect to the specified WiFi Access Point.
You can specify the access point's SSID and password in the web interface using the respective fields. The access point must support at least WEP encryption.
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".
For MissionPlanner you must choose UDPCI as a connection means. That way you can specify the ESP32's IP and port. The ESP32's IP address is displayed in the web interface.
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. Or use the USBSerial
or noUARTConsole
firmware flavour to use the onboard USB connector.
The GCS then receives the data via that serial device (e.g. COMx on Windows).
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 a Serial-to-USB adapter to connect a GCS. This is a 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 :)
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.
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!
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 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)
Mode
SYS_ESP32_MODE
SSID
Cannot be configured via MAVLink
Specifies the name of the Wi-Fi network in access point and client mode. Up to 31 characters long. WiFi must be at least WEP protected.
Password
Cannot be configured via MAVLink
Wi-Fi access point or ESP-NOW password used for encryption. Min. 8 characters, max 63 characters long. WiFi must be at least WEP encrypted.
Channel
WIFI_AP_CHANNEL
Wi-Fi access point or ESP-NOW channel.
Gateway IP address
Cannot be configured via MAVLink
IP address you want the access point to have
UART TX PIN
SERIAL_TX_PIN
TX GPIO of the ESP32. If the pin matches the RX pin, the UART will not be opened.
UART RX Pin
SERIAL_RX_PIN
RX GPIO of the ESP32. If the pin matches the TX pin, the UART will not be opened.
UART RTS Pin
SERIAL_RTS_PIN
RTS GPIO of the ESP32. If the pin matches the CTS pin, flow control will be disabled.
UART CTS Pin
SERIAL_CTS_PIN
CTS GPIO of the ESP32. If the pin matches the RTS pin, flow control will be disabled.
UART RTS threshold
SERIAL_RTS_THRES
Threshold of hardware RX flow control to prevent FIFO overload. Set any number of bytes between 0-127. Best to leave at 64.
UART serial protocol
SERIAL_TEL_PROTO MSP/LTM = 1 MAVLink = 4 TRANSPARENT = 5
Configures the parser. Set to transparent for no parsing. When not set to transparent it will detect individual messages of the data stream. In MAVLink mode it can inject RADIO_STATUS and heartbeat packets. This allows the ESP32 to register with the GCS. Support for MAVLink parameter protocol.
UART baud
SERIAL_BAUD
UART baud rate. Must be the same as with the autopilot. Try baud rates at the lower end if you see data but your GCS is not showing any of it.
Maximum packet size
SERIAL_PACK_SIZE
Maximum packet size in transparent mode. When not in pransparent mode the parser will try to fill it with the maximum amount of complete messages without plitting the messages. Max. for ESP-NOW mode is <250bytes (internally capped when set higher)
Serial read timeout [ms]
SERIAL_T_OUT_MS
Maximum amount of time to wait for a new serial bite. When reached even an uncomplete message will be sent via radio.
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
.
MissionPlanner supports TCP, UDP and serial connections to the ESP32. To use UDP with the ESP32 in Wi-Fi Client mode you must choose UDPCI as a connection protocol. That way you can specify the ESP32's IP and port. The ESP32's IP address is displayed in the web interface.
MissionPlanner fully supports all DroneBridge for ESP32 modes since it was fixed. The fix will be part of the upcoming releases of MissionPlanner.
Until then you can download & use the nightly build for that fix here. For it to work you must select "Disable RTS reset ..." within MissionPlanner's settings. In case you already tried connecting (without having this setting changed) you need to unplug & replug the GND-ESP32 running USBSerial.
MissionPlanner can detect the ESP32, if the serial protocol of the ESP32 is configured to MAVLink. That is because all ESP32s will register as a MAVLink device with the GCS.
You can also change some of the settings of the ESP32 via MissionPlanner. Select the respective ESP32 from the drop-down and switch to the CONFIG-Tab. There you can change the parameters as usual. Be careful, the settings will be applied immediately and the ESP32 will reboot. This can lead to a permanent connection loss of the telemetry link if the settings are no longer in synch.
When the serial protocol of the ESP32 is configured to MAVLink, QGroundControl can detect the ESP32. That is because all ESP32s will register as a MAVLink device with the GCS.
Known Issues with QGroundControl
Regarding the use of QGroundControl with the USBSerial
firmware:
The GND-Unit ESP32 must be reset after every disconnect of QGroundControl. Press the reset button on the board once, then reconnect.
Regarding the use of QGroundControl with the noUARTConsole
firmware:
The GND-Unit ESP32 must be re-configured after every disconnect of QGroundControl. QGroundControl is currently triggering a reset of the settings on reconnect.
The ESP32 will appear as Component 68.
At the moment QGroundControl will only show the settings of the ESP32 AIR-Unit even when there is a GND-Unit connected as well.