Developer settings for Anafi Ai¶
Before deploying your first mission onto your drone it is necessary to enable some drone developer settings. Those settings are accessible through the mobile application FreeFlight7.
Go to parameters (top right corner), select the Advanced tab (top, third tab) and select the Developer tab (bottom left).
In this tab, three developer settings are available:
Direct connection to the drone¶
The ANAFI Ai firmware disables the possibility to connect to a drone directly from a PC or a smartphone (not through a SkyController) by default.
Thus, it is not possible to connect to a drone anafi-ai.local address over wifi without first enabling the Direct connection setting of the drone.
Note
For GroundSdkDemo use either the Developer Mode peripheral or the Network Control peripheral to switch the Direct connection mode from secure to legacy.
Shell access¶
To enable this option, a security ADB public key needs to be authorized by the drone firmware. A default ADB public key is available on your local machine at this path:
/home/[user]/.android/adbkey.pub
A new ADB key pair can be generated with this following command:
$ adb keygen [myfile]
Copy-paste the ADB public key in the text area that appears after enabling the Shell access option in FreeFlight7.
Reboot the drone. The remote shell can now be accessed with the following commands:
$ adb connect anafi-ai.local:9050
$ adb shell
Note
The drone must be connected to the computer through Wi-Fi.
Air SDK missions logs¶
When this option is enabled, the missions can emit log entries to rotating log files. To learn more about how to write logs from your mission, please refer to the ulog documentation.
Important
/!\ Mission logs are not encrypted and all missions and other users have access to the logs. Therefore sensitive information should not be logged by a mission, and before a mission is distributed logs should be cleaned up /!\
To retrieve mission logs you have to plug your drone to a computer with a USB cable. The logs will be available at /missions-data/FDR/log.bin
These files can be read with the Parrot Logan tool. Logan can be installed with the following command (it is assumed that steps described in section Adding Linux packages are already completed):
$ sudo apt-get install parrot-tools-logan-lite
Live access to mission logs¶
Regardless of the previous setting, mission logs are available within an adb shell session with the following command:
$ ulogcat -b autopilot