UART/MAVLink¶
MAVLink
defines the communication stack for serial data exchange, covering transport and presentation up to the application layer.
The software implementation is included in the MAVLink Library.
The MAVLink Message Structure consists of:
- System ID: Identifies the source system sending the message (e.g., external Mission Planner / Drone). The receiving system verifies if the message is intended for itself.
- Component ID: Specifies the subsystem within the source system (e.g., the sensor / battery / controller).
- Message ID: Indicates the type and purpose of the message (e.g., as defined in the
commonmessage definitions). - Payload: Contains the actual data transmitted in the message.
External Links¶
- MAVLink Developer Guide
- MAVLink message definitions:
common - MAVLink Python library:
pymavlink - MAVLink Pythod library documentation
UART Communication Limitations¶
- No messages are received if no other participant is present
- UART communicates only between two participants (no acknowledge implemented by MAVLink)
- UART requires proper wiring and voltage levels
- e.g. by ensuring TX/RX lines are connected correctly and both devices share a common ground
- Baud rate and protocol settings must match on both devices for reliable communication
- MB Implementation issue if baud rate is more than 500k -> the ISR can not handle buffer switching fast enough
- Too many messages may overflood the bus