Mavproxy heartbeat creating a GCS failsafe problem

I have the following problem.

I am running pixhawk together with a raspberry as a companion running mavproxy.

I route the mavlink to my control station (running mission planner) with UDP.

My problem is, as i understand, that mavproxy generates locally the heartbeat on the companion so the pixhawk never detects a ground station link down and never goes in failsafe.

Is there a way to disable local heartbeat and use the one from mission planner so that i understand if the radio link is up or not?

I am using an ipmesh as a radio link from uav to CGS.



set heartbeat 0 in the MAVProxy console

is there a way to have mavproxy start it that way, without setting it in console everytime? Maybe a switch when starting it? something like --earthbeat=0


Yep, you can use the --cmd option: --cmd=“set heartbeat 0;”

hello, thank you, will try it!!

Hopefully it’ll pass the CGS heartbeat this way.


I tried setting set heartbeat 0 from console. It didn’t give any error but i guess it still sends it.

The only way i have to let the system know the link is down is by disconnecting serial from companion computer. If i just turn down the radio link the system doesn’t see any link down.

So i guess mavproxy still sends pixhawk heartbeat.

I seem to not be able to have the ground station send a heartbeat, no matter what.


I just tested this in SITL using APM:Plane and it does work. Entering set heartbeat 0 will cause the GCS failsafe to trigger.

Have you got FS_GCS_ENABL set to a non-0 value in your parameters? The failsafe won’t trigger otherwise.

Yes, i have cgs fail safe enabled.


You may need to add the set heartbeat 0 to the mavinit script for MAVProxy. Have a look at for details.

Strange thing is that even if i start mavproxy from console and set heartbeat 0 it still doesn’t work. The only way to make it work is phisically disconnect serial cables from pixhawk to raspberry.


Tried what adviced but still no avail. Mavproxy continues to send Pixhawk heartbeat so there is no way to let Quad know the ground station is offline. I am wondering how do all people using Mavproxy and a companion manage this situation as it could get people in trouble.

All i want it to do is pass along GCS heartbeat and do not sent it from companion to pixhawk but it looks like a difficult task.


Could you post the exact scripts and commands you’re using on your companion computer and GCS?

Hello Stephen, thank you for your help.

Adding set heartbeat 0 to mavinit.scr file in my quad directory did the trick!!! Thank you again.

For future reference and people that will need to do same as i did these are the steps:

1 go in the directory that has the name of your quad (the name of the quad you start mavlink with)
2 create mavinit.scr file and add line in it set heartbeat 0
3 reboot

Done, now mavlink will not pass heartbeat to pixhawk anymore and will pass only GCS heartbeat so that in case radio link goes down GCS failsafe is invoked.