Conversation
| The `[;comp=<id>]` part is optional (if omitted, the resource is downloaded from the current component). | ||
| The `;comp=<id>` part is optional (if omitted, the resource is downloaded from the current component). |
There was a problem hiding this comment.
Is all of this correct? Specifically, this was indicating that you specify the brackets for the componennt, while I think that those were probably supposed to be BNF indicating "optional".
The implication though is that there are three slashes to indicate a camera if you don't have a component ID or drive: mftp:///camera.xml
Can you clarify what works now?
en/services/ftp.md
Outdated
| In the [MAVLink FTP URL Scheme](#mavlink-ftp-url-scheme) a virtual drive is specified using the `@<drive>` prefix, such as `@LOG` for log files. | ||
| When encoded in the [FILE_TRANSFER_PROTOCOL](#FILE_TRANSFER_PROTOCOL) this prefix should be prepended when a path is being specified. | ||
| For example, when [Listing a directory](#list_directory) the request might encode `data[0]` as `@LOG/path_in_log/`, and the recipient would be expected to map this to the underlying file system. | ||
| If the full path including drive is not known, the recipient would NAK with [FileNotFound](#error_codes) (this is just another "not found" error case). |
There was a problem hiding this comment.
So my understanding is that we're just prefixing the virtual drive as the first part of the path. The recieving system has to do the mapping. If a system returns a full path it would also have to include the prefix.
|
|
@peterbarker what's wrong with QGC just displaying the files as it finds them and the user to download what they need? It doesn't have to be machine readable but if you know to look in |
I agree. If a flight stack wants to clutter up their logs directory with some other data, that's a problem, but it is their own problem. Is the rest of it sane? |
|
Regarding the specific LOG_FILES messages: for PX4 it was/is actually a pain because QGC would have to come up with its own name and date/version scheme for the filenames separate from what it is on the SD card, which means it's not trivial to compare later which log files have already been downloaded and which ones haven't. |
|
On Wed, 11 Feb 2026, Hamish Willee wrote:
[5368500?s=20&v=4] hamishwillee left a comment (mavlink/mavlink-devguide#668)
@peterbarker what's wrong with QGC just displaying the files as it finds them and the user to download what they need? It
doesn't have to be machine readable but if you know to look in @log folder, that's a start.
I agree. If a flight stack wants to clutter up their logs directory with some other data, that's a problem, but it is their own problem.
Of course after uploading a GCS still needs to understand the log format, but that is true with the old method too.
No, it's a problem for things that want to automate things when unexpected
stuff pops up.
Is the rest of it sane?
Not necessarily. You're assuming the files exist in a directory. They
don't on many ArduPilot boards. Logs stored in *actual* dataflash don't
necessarily. We can determine a list of logs for the existing mavlink
interface, but trying to treat them like files is *not* going to work well
(e.g. you can't delete a single file)
This may have changed with the advent of littlefs in ArduPilot - but there
I don't know what capabilities are available and what aren't. What I'm
saying is that there's currently an abstraction which let's the autopilot
present the data in a consistent format which you are intending to remove.
All that being said, tridge has expressed interest in having a file in
ArduPilot's @sys which points to where the log files are or something to
allow something to FTP the files down from a discovered location. What
you're suggesting here is a standardised version of that.
|
Sure, a tool that downloads flight logs just has to know what the filename/folder logic looks like for the particular flight stack. However, a more generic ground station like QGC can just present the folders and users will figure out which file they need, I'd say.
We're not removing or breaking anything. We're just encouraging/recommending to use FTP in the future. If you stick with the LOG_FILES API, that's fine in my eyes. Once or if you figure out how to present it as files, then you can swap, or offer both.
Yes, I was thinking that too. I feel like AP has already a lot of the plumbing around making things files. |
|
Thanks @julianoes @peterbarker
|
peterbarker
left a comment
There was a problem hiding this comment.
I'd also point out that while ArduPilot doesn't support COMPONENT_METADATA (except in a branch) it would appear the correct way to point to where the logs for the vehicle are stored. For vehicles which are streaming directly into "the cloud" (several ArduPilot partners do this) the place to find the logs isn't on the vehicle. So discovering where you can download logs directly via mavftp may not be the be-all-and-end-all the process. Frankly I think we might just ignore that and go with the virtual filesystem thing as a viable option for now - it wouldn't preclude pointing there in the component metadata later.
@peterbarker Sorry, I was still editing #668 (comment) - it has new comments. I added a similar comment re component metadata and I hadn't even thought of the cloud use case. Could not agree more that it provides a more flexible way to point to logs, but does not preclude using a virtual FS. Can you look at the other stuff I suggested to address the data flash issues. Essentially I think the issues you have raised are all mitigated - can you accept the idea in principle? Then I can update to capture that stuff and re-review and take to our various communities to discuss. |
Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
In mavlink/mavlink#2409 (comment) we discussed supporting LOG upload using MAVFTP and a virtual drive. This has a number of benefits - with a virtual drive the upload can be flight-stack agnostic, MAVFTP is quite efficient, and also allows for checking CRCs etc, so you can know what you have already downloaded.
To do this we need to formalise how MAVFTP virtual drives work, and also agree the names for virtual drives.
@julianoes @peterbarker I have done so here. But since ArduPilot already uses this for parameters (right) it should be checked to make sure it is compatible. Questions inline