Pixhawk 6C disconnects over WiFi

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:

  1. Changing the firmware on my Pixhawk 6C (using the latest commit on master, using v1.13.0 to v1.13.2)
  2. Changing the vehicle parameters, resetting them to various defaults
  3. 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.
  4. 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.

Here are some screenshots showing the issues:

  1. MAVProxy disconnecting:

With --show-errors flag

  1. QGroundControl disconnecting:

Before disconnection

After disconnection

image

Thank you in advance!

1 Like

What software/firmware is running on the ESP8266? Could it be that it goes into power save mode after 2 mins?

For the ESP8266, I’m running mavesp8266 Firmware version 1.2.2 from here, as pointed to by the PX4 documentation.

For ESP32, I’m running DroneBridge

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.

Update:

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!

Interesting. If you can give me all the steps or docs required I can try to reproduce this next week.

Hi Julian, thanks for this! Here are the things required to reproduce:

  • Holybro Pixhawk 6C with the following versions:
    image
    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:

Please let me know if any further information is required on your end. Thanks again!

1 Like

Thanks for the steps! I was able to reproduce it with the ESP8266 wifi module from a Pixracer.

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.:

MAV_1_RATE to 2000
MAV_1_MODE to 2

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.

Hm, so that would mean your issue is different from what I have been able to reproduce. :thinking:

When it happens for you, what does mavlink status say?

Here’s the result of running status using mavproxy before the link goes down:

Here are the results of running status using mavproxy after the link goes down (ran it twice to show that all the values do not update):

Sorry, what I mean as mavlink status entered in the NuttShell, so using a console or using Tools/mavlink_shell.py via USB.

Hi, sorry for the delayed reply. Here’s what I got when I used the QGroundControl shell to query mavlink status via USB.

Before the disconnect:


After the disconnect (first screenshot shows that the link switched from UDP to serial port ttyACM0):



So, I don’t see a difference on instance #0, right? Does rx rate go to 0 after a while?

It looks like you have two instances configured for baudrate 921600. I assume you only need one of the two, right?

Also, it looks like flow control is ON for both but I believe it should be OFF for the Wifi link. Have you tried setting it off?