mavlink / qgroundcontrol

Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
http://qgroundcontrol.io
3.17k stars 3.52k forks source link

Add Support for MAVLink2 Message Signing #8958

Closed jonas-koeritz closed 1 month ago

jonas-koeritz commented 4 years ago

Tell us a bit about the feature:

TByte007 commented 2 years ago

Is this implemented or not after 2 years :) And If I want to implement it where should I look (which part of the code) ?

HTRamsey commented 2 years ago

It was but then it wasn't. I don't think it ever got merged.

TByte007 commented 2 years ago

It was but then it wasn't. I don't think it ever got merged.

But why , it is probably one of the most useful features of MAVLink2 if you dont mind somebody else controlling / stealing your drones of course. Am I missing something ?

HTRamsey commented 2 years ago

PX4 doesn't support signing. It's unlikely signing or anything else will get added anymore at this point. It's trivial to implement if you want to do it yourself for your own use.

TByte007 commented 2 years ago

PX4 doesn't support signing. It's unlikely signing or anything else will get added anymore at this point. It's trivial to implement if you want to do it yourself for your own use.

Unlikely in PX4 or qgroundcontrol and why ? The project it dead or for some other reason ?

HTRamsey commented 2 years ago

Unlikely to be added in qgroundcontrol, I believe it's feature frozen.

TByte007 commented 2 years ago

Unlikely to be added in qgroundcontrol, I believe it's feature frozen.

Feature frozen forever or until some major release ? And if it is forever - why ?

HironariNakama commented 1 year ago

PX4 doesn't support signing. It's unlikely signing or anything else will get added anymore at this point. It's trivial to implement if you want to do it yourself for your own use.

How can I implement it myself for my own use?

tenchirocom commented 1 year ago

@HironariNakama I have implemented signing for a companion computer library and use it through MissionPlanner. However, I often use qGroundControl for flying and have been looking at it for some GCS add-ons and was trying to figure out how to turn it on, when I stumbled across this thread. Basically, you just need to compute a checksum and md hash. Then add it into the message appropriately. I have yet to build qgc, but assuming there is a layer point for communications, the messages can just be tagged there. Maybe someone has verified, but if signing is activated through MissionPlanner, should be able to see telemetry in QGC, but not change parameters or send commands. If you want to turn it on, there'd need to be a very basic ui. The MP ui is super basic. If you are interested to collaborate on this in some way, send me a message. The biggest question I have is how to do it in a way it can be easily merged with future versions. Maybe someone has experience or pointers about that.

lida2003 commented 1 year ago

does latest 4.2.6 support mavlink2 signing protocol? As I didn't find authkey settings.

tenchirocom commented 1 year ago

ArduCopter autopilot supports it. You can activate through MissionPlanner. I have not found a way to manage it through qGroundControl however.

lida2003 commented 1 year ago

ArduCopter autopilot supports it. You can activate through MissionPlanner. I have not found a way to manage it through qGroundControl however.

yeah, i have activated in mp. But i don't know where to config in qgc. googled but no guides, only this request close to what i'm talking about.

tenchirocom commented 1 year ago

I haven't tested yet, but once activated on the aircraft through MP, QCG without signing support should still display the telemetry data. However, the aircraft should refuse to respond to any commands, including the request for parameters. Not sure if that is enough for your purposes. For my scenarios, parameter configuration in the field is important. So is configuring and starting a mission. Given the issues, I assume most folks just use an encrypted radio link and don't worry about it?

lida2003 commented 1 year ago

Well, what I have met is, QGC has trouble in vechicle setup page. I'm NOT sure about the other functions in QGC, and I will never try to fly with MAVLink2-QGC.

Unless, QGC supports MAVLink2, which will be safe flying.

hamishwillee commented 10 months ago

QGC does support MAVLink 2. It just doesn't support signing. The stuff that needs to be implemented is https://mavlink.io/en/mavgen_c/message_signing_c.html There are two partial implementations in QGC that never went in, which would be a good place to understand the needed code.

tenchirocom commented 10 months ago

Thank you for this code pointer. I will take a look.

With what I've experienced implementing signing on the aircraft side, I'm wondering if anyone really uses it. Mission Planner works well enough. But between the companion computers and fcs there are a few idiosyncrasies that have me wondering if mavlink signing is the way to go or maybe the best approach is to just secure the link. Then there'd be privacy too.

mjemv commented 6 months ago

Hi @hamishwillee All, any sample code to look at in send and recv side?