I have been trying to arm/disarm my pixhawk using the following command
mavlink_msg_command_long_pack(GCS.ID, GCS.Component_ID, &tx_msg, 1, 250, MAV_CMD_COMPONENT_ARM_DISARM, 0, 0.0, 0, 0, 0, 0, 0, 0);
from within Matlab, but it gets rejected everytime. I am also using the 3DR radio for communication.
I have tried various combinations of Sys_ID and Comp_ID such as (1,1), (1,50), (1,0) and (1,250), with the same result.
I am not sure if I am missing a step, either in software or on the UAV itself that needs to be executed prior to arming the UAV.
My “GCS” in Matlab has the following settings, Sys_ID = 255, and Comp_ID = 190.
I would really appreciate your help on this,