What is, and how does one select a System ID?

I suppose that this question, to answer fully, is multipart:

  1. What is System ID tied to? Is it tied to a session, or software, like user-agent in HTTP for instance, or something else?
  2. If System ID is tied to a session:
    2a. What allocates System IDs? Is the client in charge of selecting their own? Or is it given by some component?
    2b. Given that the client is in charge of selection, how does one prevent System ID collisions with other sessions?
  3. If System ID is tied to the software, like HTTP’s user-agent, how are collisions prevented across projects?

Thank you,
Ben

I believe you’re talking about Mavlink syid.

System ID is stored in autopilot`s EEPROM with other parameters.
It is set to 1 by default and it should be changed to unique value on all systems which you want to use at once.
There is no any collision protection.

So I assume that you mean:

  1. System ID is session-tied,
  2. System ID is authored by the client
  3. There is no expected strategy of safely selecting a unique System ID.

Is that correct?

  1. No, System ID is vehicle-tied.
  2. Yes, you can change it in Mission Planner.
  3. Yes, but GCS and autopilot IDs are unique by default and it works until you do not need to connect few vehicles to one laptop at one time.

There’s possibly a misunderstanding here that I’ve created by lack of context…

I am not using Mission Planner, I am writing a complete Mavlink library from scratch. I would like my library to have a workable strategy for selecting its own System ID, or otherwise allow the user or the app to define it as configuration.

Whether or not multiple GCS will be connected at the same time is beyond me, as I am unlikely (or hopefully not going) to be the only user of it – I wouldn’t have liked to be restricted in that fashion.

From what I gather so far it seems like System ID should be manually configured rather than determined automatically, and it’s up to the user to ensure that no collisions are made. I am unable to confirm this suspicion unfortunately, because nothing explicitly states anything about how these values are selected, or what they mean in a way that is not tautological (e.g. system id being the identifier for the system which originated the message).

1 Like

From what I gather so far it seems like System ID should be manually configured rather than determined automatically, and it’s up to the user to ensure that no collisions are made. I am unable to confirm this suspicion unfortunately, because nothing explicitly states anything about how these values are selected, or what they mean in a way that is not tautological (e.g. system id being the identifier for the system which originated the message).

Yes, it is entirely up to the user (whoever is setting up the network) to ensure that there are no collisions.

What generally happens is that each of the GCS systems gives themselves a default SYS_ID up around the top end (255 say) that does not conflict with the other well known GCS like QGC or Mission Planner. Autopilots typically assign 1 by default for a vehicle, which is stored as a parameter (ie editable). In the most common network setup there is only one vehicle and GCS that have different ids. If you start adding additional vehicles then you have to manually change the ID used for each of the subsequent vehicles.

You are very brave writing your OWN GCS - that’s decades of effort. I’d be looking at the licenses for the existing open source GCS and seeing if they can be adapted to your needs.

PS, I haven’t checked if this is covered, but if not, will be addressed by Explain SYSTEM IDS and allocation · Issue #62 · mavlink/mavlink-devguide · GitHub

1 Like