I’m trying to use an ESP32 as a Wi-Fi bridge for PX4 to send MAVLink telemetry data to QGroundControl. The ESP32 is configured as a TCP server, connected to the flight controller via UART (currently using GPIO 4 for RX and GPIO 5 for TX), and acting as a transparent bridge. Here’s the setup:
- ESP32 connects successfully to the Wi-Fi access point.
- QGroundControl detects the ESP32 and establishes a connection, but the connection frequently drops with “remote host closed connection” errors.
- MAVLink packets (detected as
0xFE
or0xFD
) are being forwarded between the UART and TCP, but I’m experiencing over 60% packet loss in QGroundControl.
Debugging Steps I’ve Taken:
- Pin Reconfiguration:
- Tried alternative pins (e.g., GPIO 16/17) for UART RX/TX.
- Wi-Fi Stability:
- Conducted continuous
ping
tests with 0% packet loss but observed higher-than-expected latency (~100ms).