I created a small proof of concept of mavftp-cli tool to help me fetch files from serial based flight controllers.
It provides the basic functionalities but I believe that is already helpful if someone wants to download a standalone binary to grab some files.
The repository is available here: GitHub - patrickelectric/mavftp-cli: A command line interface to help with mavftp access
The idea in the future is to allow the same ftp functionality though mavlink2rest.
USAGE:
mavftp-cli [OPTIONS] <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--connection <connection> Connection string [default: tcpout:0.0.0.0:5760]
SUBCOMMANDS:
crc Calculate CRC32 for a file
create Create a file
help Prints this message or the help of the given subcommand(s)
list List files in a directory
mkdir Create a directory
read Read a file
remove Remove a file
reset Reset sessions
rmdir Remove a directory
write Write to a file
$ ./mavftp-cli --connection serial:/dev/ttyACM2:115200 list
Type Name Size
----------------------------------------
F ./.Trash-1000 39 B
F ./.Trashes 39 B
D ./.fseventsd
F ./.metadata_never_index 39 B
D ./APM
F ./dataman 61.1 KB
D ./log
F ./param_import_fail.bson 16.0 KB
F ./param_import_fail.txt 1.1 KB
F ./parameters_backup.bson 454 B
$ ./mavftp-cli --connection serial:/dev/ttyACM2:115200 read ./APM/LOGS/00000001.BIN
[00:00:01] [##############################] 514.02 KiB/514.02 KiB (0.0s)
calculated crc: 0xd33fda9f
$ ls -lah 00000001.BIN
-rw-r--r-- 1 patrick patrick 515K Mar 19 11:19 00000001.BIN