You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/guide/mavlink_version.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,6 @@ A library's MAVLink support can be determined in a number of ways:
31
31
32
32
-[HEARTBEAT](../messages/common.md#HEARTBEAT)`.mavlink_version` field contains the minor version number.
33
33
This is the `<version>` field defined in the [Message Definitions](../messages/index.md) (`version` in [common.xml](../messages/common.md) for dialects that depend on the common message set).
34
-
-[PROTOCOL_VERSION](../messages/common.md#PROTOCOL_VERSION).`version` contains the MAVLink version number multiplied by 100: v1.0 is 100, <!-- v2.0 is 200, --> v2.3 is 203 etc.
35
-
Note that the message allows for additional version information, but is not supported on all flight stacks.
36
34
37
35
::: tip
38
36
While messages do not contain version information, an extra CRC is used to ensure that a library will only process compatible messages (see [Serialization > CRC_EXTRA](../guide/serialization.md)).
@@ -44,41 +42,43 @@ Support for _MAVLink 2_ is indicated in the [AUTOPILOT_VERSION](../messages/comm
44
42
It can also be inferred from the packet start marker byte.
45
43
46
44
This is sufficient if the communication link between autopilot and GCS is completely transparent.
47
-
However, some communication links are not completely transparent as they include:
45
+
Most flight stacks now assume MAVLink 2 support based on the protocol capability or packet start marker.
46
+
This is reasonable because the majority of systems and communication links now reliably support MAVLink 2.
47
+
48
+
### Non-transparent communication links
49
+
50
+
Most flight stacks assume communication links are transparent.
51
+
Possible causes of links not being transparent are:
48
52
49
53
- Routing, which can can change or reserialize MAVLink packets (for example, there might be an intermediate router that converts between versions).
50
54
- Wireless links that rely on fixed length packetization may distort or truncate variable-length MAVLink 2 frames.
55
+
For example, older SiK Radios may consume MAVLink 2 messages.
51
56
52
-
::: info
53
-
Some flight stacks assume MAVLink 2 support based on the protocol capability or packet start marker.
54
-
This is reasonable because the majority of systems and communication links now reliably support MAVLink 2.
55
-
:::
56
-
57
-
To be certain that a link supports _MAVLink 2_ transparently, a GCS or other component can use the _MAVLink 2_ handshake protocol to test the link.
58
-
This is done by sending the [MAV_CMD_REQUEST_MESSAGE](../messages/common.md#MAV_CMD_REQUEST_MESSAGE) command with `param1=300` ([PROTOCOL_VERSION](../messages/common.md#PROTOCOL_VERSION)).
59
-
If the system supports _MAVLink 2_ and the handshake it will respond with [PROTOCOL_VERSION](../messages/common.md#PROTOCOL_VERSION)**encoded as MAVLink 2 packet**.
57
+
To be certain that a link supports _MAVLink 2_ transparently, a GCS or other component might send the [MAV_CMD_REQUEST_MESSAGE](../messages/common.md#MAV_CMD_REQUEST_MESSAGE) command with `param1` set to the id of a _MAVLink 2_ message (with `id > 256`) that is supported by the flight stack.
58
+
If the system supports _MAVLink 2_ and the handshake it will respond with the message **encoded as MAVLink 2 packet**.
60
59
If it does not support _MAVLink 2_ it should `NACK` the command.
61
60
The GCS should fall back to a timeout in case the command interface is not implemented properly.
62
61
63
-
::: tip
64
-
If the target system does not support `PROTOCOL_VERSION` you can request any other message that it is able to emit.
65
-
:::
66
-
67
-
The diagram below illustrates the complete sequence.
GCS->>Drone: MAV_CMD_REQUEST_MESSAGE(param1 = id of SOME_MAVLINK2_MESSAGE)
76
71
GCS->>GCS: Start timeout
77
-
Drone->>GCS: PROTOCOL_VERSION in MAVLink 2 framing
72
+
Drone->>GCS: SOME_MAVLINK2_MESSAGE in MAVLink 2 framing
78
73
GCS->>Drone: If ACK: Switches to MAVLink 2
79
74
Drone->>GCS: Switches to MAVLink 2 on receive
80
75
-->
81
76
77
+
::: tip
78
+
Historically the message used for testing was `PROTOCOL_VERSION`, which is now deprecated.
79
+
The protocol should work with any other MAVLink 2 telemetry message supported by the flight stack.
80
+
:::
81
+
82
82
### Semi-Transparent Legacy Radios
83
83
84
84
Some popular legacy radios (e.g. the SiK radio series) operate in semi-transparent mode by injecting [RADIO_STATUS](../messages/common.md#RADIO_STATUS) messages into the MAVLink message stream.
0 commit comments