How does mavproxy ftp rename work?

I uploaded a couple of terrain files with the wrong name, so I want to rename them. My FC is buried deep in the plane, so it’s very difficult to remove the SDcard, but MAVFtp should work right?
So I’m connected to the vehicle using mavproxy.py. ftp list apm/terrain returns the list of files no problem, but no matter what “ftp rename” command I use, I get a status code 13 “unsupported”.

RTL> ftp rename /APM/TERRAIN/N53112.DAT N53W112.DAT
RTL> Renaming /APM/TERRAIN/N53112.DAT to N53W112.DAT
Rename failed OP seq:6 sess:2 opcode:129 req_opcode:13 size:1 bc:0 ofs:0 plen=1 [1]
AP: Unsupported FTP: 13

I’ve tried:

ftp rename APM/TERRAIN/N53112.DAT N53W112.DAT
ftp rename APM/TERRAIN/N53112.DAT APM/TERRAIN/N53W112.DAT
ftp rename N53112.DAT N53W112.DAT
ftp rename /APM/TERRAIN/N53112.DAT /APM/TERRAIN/N53W112.DAT

I also tried using Mission Planner and it just fails (i.e. does not rename) silently.

How does this work?

The answer is not well, and not for any reason I can pinpoint. The workaround is to delete the file via MAVFTP and then upload a fresh copy that is named correctly.

Which takes literally 1/2 hour per file! (over USB!)

Ouch! I didn’t realize you were using such large files.

I think it is not supported yet according to this.

OIC - the 'unsupported" message literally means unsupported. Even though rename is listed as one of the valid options when you type “ftp” by itself.

Well there you have it! I’ve noticed the same and always simply applied the above workaround, not recognizing that it was a necessary evil vs some connectivity issue as I had assumed previously.

1 Like