MAVLink Target System ID


I’m currently developing a ground station to control multiple UAVs simultaneously.

In order to do this I need to be able to identify each UAV over MAVLink.

Is there a way to read or write a specific target_system_id to the UAV?



It looks like the header contains the System ID according to the following link:

That answers the reading part of the question. As far as setting the ID of each MAV the closest I could find would be to send a COMMAND_LONG message using MAV_CMD 221 (MAV_CMD_DO_GUIDED_MASTER).

Can anyone confirm whether thats the intention of this command?

A bit further digging and I have found the parameter “SYSID_THISMAV” which can also be used to read and write the SYS ID of the aircraft using PARAM_REQUEST_READ (#20) and PARAM_SET (#23).

The only problem with PARAM_SET is it’s only temporary. The MAVLink documentation says to use ACTION MAV_ACTION_STORAGE_WRITE to PERMANENTLY write the RAM contents to EEPROM. However I can’t find the information in the documentation for this storage write command?