Mavlink-router and mavftp

Hi,

I am currently playing around with an Nordic nRF9160 LTE Cat. M1 modem for MavLink telemetry.

In it’s simplest form the flow of data is like this:
FC serial @ 57600 ↔ nRF9160 serial ↔ mavlink frames to UDP packets ↔ port forwarding to Mission Planner.

In this simple form I have seen MavFTP for parameter fetch working.

Then I soon moved on to a slightly more sophisticated setup:

FC serial @ 57600 ↔ nRF9160 serial ↔ mavlink frames to UDP packets ↔ mavlink-routerd on a server ↔ (wireguard VPN if client is external) ↔ TCP connection to Mission Planner.

A video about his: Mavlink long-range telemetry radio over LTE Cat M1 - YouTube

The mavlink-router is this one: GitHub - mavlink-router/mavlink-router: Route mavlink packets between endpoints

In the setup with the mavlink-router mavftp often does not work (but I do see a succesfull parameter fetch every now and then). Other than mavftp the setup seems to work fine; parameters are fetched one-by-one and Mission Planner is happily interacting with the vehicle, both a real one and SITL.

No parsing is done on the mavlink frames; they are just parsed and validated using the fastmavlink library so I can put an integer number of valid mavlink frames in each UDP packet.

There is a little loss between FC and server (defined as number of mavlink frames decoded and validated from serial and mavlink frames arriving at the UDP endpoint). On my desk it is limited to <1%. But this is the same in both cases.

After the basic setup desccribed above I did improve security somewhat and added AES128 encryption to the UDP packets. For this I also enlarged the over-the-air UDP packet size to reduce the overhead of the encryption, and I had to add a decryption service in front of mavlink-router that receives encrypted UDP and forwards the decrypted data to mavlink-router over TCP. This does increase latency with a few hundreds of milliseconds, which does not seem to make it work any better or worse.

Probably there is a stupid user bug in my code; I am not really a software engineer. But I am still suspecting that adding mavlink-router broke mavftp.

Are there known issues with mavlink-router and parameter fetch using mavftp?

Software:

  • Arduplane 4.3.2 on the vehicle, 4.4 SITL running in WSL1.
  • MissionPlanner 1.3.80 running on Windows 11
  • mavlink-router pulled and built from Git sources running on Ubuntu 22.04.