I’ve been trying to connect my quadcopter drone (with a Pixhawk 6C board, no companion boards) to my laptop’s ground control (I’ve tried various ground control software) over WiFi (I’ve tried various WiFi modules). While initially successful, the connection always drops after roughly two minutes.
Here are the things I’ve tried:
Changing the firmware on my Pixhawk 6C (using the latest commit on master, using v1.13.0 to v1.13.2)
Changing the vehicle parameters, resetting them to various defaults
Using two different ESP8266 modules (using station mode), and I also tried using a ESP32 module (using AP mode). The modules were connected through TELEM1, but I’ve also tried configuring TELEM2 for MAVLink use and connecting the modules there. I am sure that the wiring to my WiFi module is correct.
Using different ground controls (MAVProxy and QGroundControl)
All of them faced the exact same persistent issue of the drone connecting to the ground control for a few minutes before disconnecting. I can’t reconnect unless I turn off the drone and wait for a few minutes before turning it on again (turning it back on immediately does not work, for some weird reason).
While the drone is connected, it is able to receive MAVLink commands, and I can see all the MAVLink variables under MAVLink inspector on QGroundControl, but once it disconnects, all of the MAVLink variables stop updating (0.0 Hz).
The drone is fine over a wired USB connection and doesn’t disconnect.
Can anyone suggest a reason this could be happening, or a way to debug/fix it? Based on all the things I’ve tried, it’s likely that the issue is with the PX4 board / firmware, which is why I’m posting this here.
I don’t think it goes into power saving mode after 2 minutes because I can still access the HTTP webpage (the one used to reboot, get/set status and parameters, and update firmware for the ESP8266 module) and ping the IP address of the ESP8266 and ESP32 modules after the disconnect happens.
I tried switching out the Pixhawk 6C board for another board, the UVify Draco-R, running PX4 firmware version 1.13.0 (this board was on an old hexacopter drone I had), and everything works fine with that board - the connection is stable and no disconnection happens even after 10 minutes.
Which suggests to me, the problem is definitely somewhere on the Pixhawk 6C board, either some kind of weird hardware issue, a firmware one, or perhaps even an OS issue? I’m not too sure how to continue from here, any suggestions would be welcome!
The firmware version can also be v1.13.0, v1.13.1, or v1.13.2
Any of the following WiFi modules: ESP-WROOM-32 (the version I bought was this), WeMos D1 Mini Pro ESP8266 (the version I bought was this), or NodeMCU ESP8266-v3 (the version I bought was this)
ESP8266 was flashed with firmware V1.2.2, connected to TELEM1, ser1 baud rate set to 921600. All the default firmware settings were used, but I changed the mode to station mode and connected it to my own router.
ESP32 was flashed with DroneBridge v1.0 (DroneBridgeESP32_v1_1.zip), connected to TELEM1, ser1 baud rate set to 115200. All the default firmware settings were used.
The wiring from TELEM1 to the WiFi module was like this:
Suddenly MAVLink would stop arriving in the ground station, but also the http status page (http://192.168.4.1/getstatus) did not load anymore and pings stopped.
The wifi seemed to stay connected but once I disconnected it disappeared.
Once I just restarted the ESP8266 everything was back to normal. So this tells me the ESP8266 somehow crashes or stalls.
The problem didn’t happen consistently for me but only every now and then, and I could somewhat make it happen by increasing the rate (for me MAV_1_RATE to 200000) and choosing a mode that sends a lot of data such as MAV_1_MODE to 2. At that point it would usually lose it all.
Can you check if it’s the same for you? E.g. lower the rates and check if it still happens, e.g.:
Thank you for reproducing this! I’m glad to hear that it isn’t just a problem on my side.
The parameters I used initially were the default of:
MAV_1_RATE = 1200 B/s
MAV_1_MODE = 0
I tried changing these two parameters, using 300 B/s, 600 B/s, 2000 B/s, 200000 B/s with both MAV_1_MODE = 0 and 2, but they don’t seem to affect the disconnection much. It still occurs at an average of 2 minutes, ranging from 1 minute to 2.5 minutes.
I also confirmed that I could load the http status page fine after the disconnect happens.