Arming PX4 Plane Simulation Without connecting to QGRoundController

Hello forum members,

I’m having a problem with my plane_cam simulation. I’ve tried to arm my plane with:

vehicle.mav.command_long_send(vehicle.target_system,
                                  vehicle.target_component,
                                  mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM, 0, 1, 0, 0, 0, 0, 0, 0)

,

vehicle.arducopter_arm()

and

commander arm

but each time i try, px4 SITL returns: INFO [tone_alarm] notify negative.

I also checked “commander check” and it returns:

INFO  [commander] Preflight check: FAILED
pxh> WARN  [health_and_arming_checks] Preflight Fail: No connection to the ground control station	

How can i disable “No connection to the ground control station”? Thanks for helping out.

Update:

I managed to arm plane by setting NAV_DLL_ACT to 0 but i don’t want to disable GCS failsafe. Is there any way to introduce my python program as GCS?

Fixed the problem. If anyone also trying to develop their own GCS, you need to send heartbeat to plane continuously to acknowledge the plane it’s connected to GCS.

I am new to this stuff but this pymavlink heartbeat_send code here:

vehicle.mav.heartbeat_send(mavutil.mavlink.MAV_TYPE_GCS,
                               mavutil.mavlink.MAV_AUTOPILOT_INVALID, 0, 0, 0)

fixed my problem.