Difference between revisions of "Messages Format"
Jump to navigation
Jump to search
(added s-pprz message def) |
|||
Line 8: | Line 8: | ||
==Paparazzi "PPRZ" standard message for direct serial connection== | ==Paparazzi "PPRZ" standard message for direct serial connection== | ||
===Pprzlink v1.0=== | |||
PPRZ-message: ABCxxxxxxxDE | PPRZ-message: ABCxxxxxxxDE | ||
Line 19: | Line 21: | ||
D PPRZ_CHECKSUM_A (sum[B->C]) | D PPRZ_CHECKSUM_A (sum[B->C]) | ||
E PPRZ_CHECKSUM_B (sum[ck_a]) | E PPRZ_CHECKSUM_B (sum[ck_a]) | ||
===Pprzlink v2.0=== | |||
Note that there is currently no explicit way to recognize whether the protocol is v1.0 or 2.0 so it has to be known before the communication. | |||
PPRZ-message: ABCxxxxxxxDE | |||
A PPRZ_STX (0x99) | |||
B LENGTH (A->E) | |||
C PPRZ_DATA | |||
0 SOURCE (~sender_ID) | |||
1 DESTINATION (can be a broadcast ID) | |||
2 CLASS/COMPONENT | |||
bits 0-3: 16 class ID available | |||
bits 4-7: 16 component ID available | |||
3 MSG_PAYLOAD | |||
. DATA (messages.xml) | |||
D PPRZ_CHECKSUM_A (sum[B->C]) | |||
E PPRZ_CHECKSUM_B (sum[ck_a]) | |||
==Secure Paparazzi (S-PPRZ) for serial and transparent modem communication== | |||
The overhead is 16 bytes (4 bytes of counter, 12 bytes of tag), plus the necessary key exchange at the beginning of communication. | |||
===S-Ppprzlink v1.0=== | |||
PPRZ-message: ABCxxxxxxxDE | |||
A PPRZ_STX (0x99) | |||
B LENGTH (A->E) | |||
C PPRZ_DATA | |||
0-3 COUNTER | |||
// ciphertext start | |||
4 SENDER_ID | |||
5 MSG_ID | |||
6 MSG_PAYLOAD | |||
. DATA (messages.xml) | |||
// ciphertext end | |||
7-18 TAG (12 bytes) | |||
D PPRZ_CHECKSUM_A (sum[B->C]) | |||
E PPRZ_CHECKSUM_B (sum[ck_a]) | |||
===S-Pprzlink v2.0=== | |||
In this case we decrypt only packets with matching DESTINATION (or broadcast), to avoid decrypting unwanted data. | |||
PPRZ-message: ABCxxxxxxxDE | |||
A PPRZ_STX (0x99) | |||
B LENGTH (A->E) | |||
C PPRZ_DATA | |||
0 SOURCE (~sender_ID) | |||
1 DESTINATION (can be a broadcast ID) | |||
2-5 COUNTER (4 bytes) | |||
// ciphertext start | |||
6 CLASS/COMPONENT | |||
bits 0-3: 16 class ID available | |||
bits 4-7: 16 component ID available | |||
7 MSG_PAYLOAD | |||
. DATA (messages.xml) | |||
// ciphertext end | |||
8-19 TAG (12 bytes) | |||
D PPRZ_CHECKSUM_A (sum[B->C]) | |||
E PPRZ_CHECKSUM_B (sum[ck_a]) | |||
==XBee API format== | ==XBee API format== | ||
Line 57: | Line 120: | ||
. DATA (messages.xml) | . DATA (messages.xml) | ||
I CHECKSUM (sum[B->H]) | I CHECKSUM (sum[B->H]) | ||
[[Category:Software]] [[Category:Developer_Documentation]] | [[Category:Software]] [[Category:Developer_Documentation]] |
Revision as of 17:54, 31 August 2017
Introduction
Messages Format and how to use them
For the message definitions see http://docs.paparazziuav.org/latest/paparazzi_messages.html
Types
Paparazzi "PPRZ" standard message for direct serial connection
Pprzlink v1.0
PPRZ-message: ABCxxxxxxxDE A PPRZ_STX (0x99) B LENGTH (A->E) C PPRZ_DATA 0 SENDER_ID 1 MSG_ID 2 MSG_PAYLOAD . DATA (messages.xml) D PPRZ_CHECKSUM_A (sum[B->C]) E PPRZ_CHECKSUM_B (sum[ck_a])
Pprzlink v2.0
Note that there is currently no explicit way to recognize whether the protocol is v1.0 or 2.0 so it has to be known before the communication.
PPRZ-message: ABCxxxxxxxDE A PPRZ_STX (0x99) B LENGTH (A->E) C PPRZ_DATA 0 SOURCE (~sender_ID) 1 DESTINATION (can be a broadcast ID) 2 CLASS/COMPONENT bits 0-3: 16 class ID available bits 4-7: 16 component ID available 3 MSG_PAYLOAD . DATA (messages.xml) D PPRZ_CHECKSUM_A (sum[B->C]) E PPRZ_CHECKSUM_B (sum[ck_a])
Secure Paparazzi (S-PPRZ) for serial and transparent modem communication
The overhead is 16 bytes (4 bytes of counter, 12 bytes of tag), plus the necessary key exchange at the beginning of communication.
S-Ppprzlink v1.0
PPRZ-message: ABCxxxxxxxDE A PPRZ_STX (0x99) B LENGTH (A->E) C PPRZ_DATA 0-3 COUNTER // ciphertext start 4 SENDER_ID 5 MSG_ID 6 MSG_PAYLOAD . DATA (messages.xml) // ciphertext end 7-18 TAG (12 bytes) D PPRZ_CHECKSUM_A (sum[B->C]) E PPRZ_CHECKSUM_B (sum[ck_a])
S-Pprzlink v2.0
In this case we decrypt only packets with matching DESTINATION (or broadcast), to avoid decrypting unwanted data.
PPRZ-message: ABCxxxxxxxDE A PPRZ_STX (0x99) B LENGTH (A->E) C PPRZ_DATA 0 SOURCE (~sender_ID) 1 DESTINATION (can be a broadcast ID) 2-5 COUNTER (4 bytes) // ciphertext start 6 CLASS/COMPONENT bits 0-3: 16 class ID available bits 4-7: 16 component ID available 7 MSG_PAYLOAD . DATA (messages.xml) // ciphertext end 8-19 TAG (12 bytes) D PPRZ_CHECKSUM_A (sum[B->C]) E PPRZ_CHECKSUM_B (sum[ck_a])
XBee API format
XBee-message: ABCDxxxxxxxE A XBEE_START (0x7E) B LENGTH_MSB (D->D) C LENGTH_LSB D XBEE_PAYLOAD 0 XBEE_TX16 (0x01) / XBEE_RX16 (0x81) 1 FRAME_ID (0) / SRC_ID_MSB 2 DEST_ID_MSB / SRC_ID_LSB 3 DEST_ID_LSB / XBEE_RSSI 4 TX16_OPTIONS (0) / RX16_OPTIONS 5 PPRZ_DATA 0 SENDER_ID 1 MSG_ID 2 MSG_PAYLOAD . DATA (messages.xml) E XBEE_CHECKSUM (sum[D->D]) ID is AC_ID for aircraft, 0x100 for ground station
Telemetry storage format for data logger
TLM-message: ABCDEFGHxxxxxxxI A PPRZ_STX (0x99) B LENGTH (H->H) C SOURCE (0=uart0, 1=uart1, 2=i2c0, ...) D TIMESTAMP_LSB (100 microsecond raster) E TIMESTAMP F TIMESTAMP G TIMESTAMP_MSB H PPRZ_DATA 0 SENDER_ID 1 MSG_ID 2 MSG_PAYLOAD . DATA (messages.xml) I CHECKSUM (sum[B->H])