How to debug firmwares#

Logs from the firmware#

Before launching the simulation, you can start ulogcat to see the logs produced by the simulated firmware. Note that it has to be started in sudo. Example:

$ sudo ulogcat -v long -C

Logs from firmwared#

It is also advised to activate more logs from the service ‘firmwared’. They will appear in the ulog stream like the ones from the firmware. To do that, execute the following commands.

$ echo 'FIRMWARED_DUMP_PROFILE = "y"' | sudo tee -a "/etc/firmwared.conf"
$ echo 'FIRMWARED_VERBOSE_HOOK_SCRIPTS = "y"' | sudo tee -a "/etc/firmwared.conf"
$ sudo systemctl restart firmwared.service


The simulated drone can be accessed via the tool “ADB”.

To open a shell, do the following while a simulation is running.


$ adb connect anafi.local:9050
$ adb -s anafi.local:9050 shell


$ adb connect anafi-ai.local:9050
$ adb -s anafi-ai.local:9050 shell