Ardupilot only connect with Authorised GCS

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

1 Like

As stated here: Library Example Sketches — Dev documentation

Also, I think it might be more appropriate if the flag checking conditions are included in the Copter.cpp file, not exactly sure.

Seems an interesting project, would like to know the proper way to implement this.