I am customising the Ardupilot to connect only with the Authorised GCS. In order achieve this, I am following the below approach:
sending a text message (GCS_SEND_TEXT) to GCS from the setup() sketch of AP_vehicle.cpp. Upon receiving the message, I am sending a customized flag from GCS using a custom mavlink command. I am taking this flag as condition to enter into the loop() sketch in the AP_vehicle.cpp.
This approach is not working and getting “Link 1 down”. Please let me know, if this is right approach,else propose a better approach to achieve this functionality