Merge branch 'main' of github.com:n7tae/M17_spec
commit
894013b697
104
M17_spec.tex
104
M17_spec.tex
|
|
@ -1592,110 +1592,6 @@ The data type specifier can also be used as a protocol specifier. For example, t
|
|||
|
||||
The data type specifier is used to compute the CRC, along with the payload.
|
||||
|
||||
\section{Useful Internet Packets}
|
||||
|
||||
In all cases, data in these packets are big endian, consistent with other IP protocols. They should \textit{NOT} contain added null bytes between data members sometimes used to make individual members start on a word boundary.
|
||||
|
||||
\subsection{Stream Mode Packets}
|
||||
|
||||
Stream Mode may be packetized using two different methods.
|
||||
|
||||
\paragraph{Single Packet Method}
|
||||
|
||||
The first method combines the LSF with the payload to produce an all-in-one 54 byte packet.
|
||||
Within a stream, the LSF data will be identical within superframes.
|
||||
This would allow late joiners to open a packet stream upon the receipt of any packet.
|
||||
A Superframe would take 6 packets for a total of 326 bytes.
|
||||
|
||||
\begin{table}[H]
|
||||
\centering
|
||||
\begin{tblr}{
|
||||
colspec={llX},
|
||||
}
|
||||
\hline
|
||||
Field & Size & Description \\
|
||||
\hline
|
||||
MAGIC & 4 bytes & Magic bytes 0x4d313720 (``M17 '') \\
|
||||
StreamID (SID) & 2 bytes & Random bits, changed for each PTT or stream, but consistent from frame to frame within a stream \\
|
||||
LSD & 28 bytes & The Link Setup Data (DST, SRC, TYPE, META field) as defined in Table \ref{lsd}. \\
|
||||
FN & 2 bytes & Frame number exactly as would be transmitted as an RF stream frame, including the last frame indicator at (FN \& 0x8000) \\
|
||||
Payload & 16 bytes & Payload (exactly as would be transmitted in an RF stream frame) \\
|
||||
CRC16 & 2 bytes & CRC for the entire packet, as defined in Section \ref{crc} \\
|
||||
\hline[2pt]
|
||||
\end{tblr}
|
||||
\caption{Steaming Mode IP Packet, Single Packet Method}
|
||||
\end{table}
|
||||
|
||||
\paragraph{Two Packets Method}
|
||||
|
||||
The second method uses two packets, a ``header'' packet for the LSD and a ``data'' packet for the payload.
|
||||
This method uses seven packet to send a superframe.
|
||||
This method is more efficient than the Single Packet Method. Late joiners can open a packet stream when they have received a header packet.
|
||||
Both types of packets would have the same SID within a transmission.
|
||||
|
||||
The first 36 byte header packet contains the LSD and SID and would be sent after the LSF RF Frame is received and when ever the LICH channel successfully produces an LSF.
|
||||
|
||||
\begin{table}[H]
|
||||
\centering
|
||||
\begin{tblr}{
|
||||
colspec={llX},
|
||||
}
|
||||
\hline
|
||||
Field & Size & Description \\
|
||||
\hline
|
||||
MAGIC & 4 bytes & Magic bytes 0x4d313748 (``M17H'') \\
|
||||
StreamID (SID) & 2 bytes & Random bits, changed for each PTT or stream, but consistent from frame to frame within a stream \\
|
||||
LSD & 28 bytes & The Link Setup Data (DST, SRC, TYPE, META field) as defined in Table \ref{lsd}. \\
|
||||
CRC16 & 2 bytes & CRC for the entire packet, as defined in Section \ref{crc} \\
|
||||
\hline[2pt]
|
||||
\end{tblr}
|
||||
\caption{Stream Mode IP Packet, Two Packet Method, Header}
|
||||
\end{table}
|
||||
|
||||
The second 26 byte data packet contains the SID, FN and Payload.
|
||||
|
||||
\begin{table}[H]
|
||||
\centering
|
||||
\begin{tblr}{
|
||||
colspec={llX},
|
||||
}
|
||||
\hline
|
||||
Field & Size & Description \\
|
||||
\hline
|
||||
MAGIC & 4 bytes & Magic bytes 0x4d313744 (``M17D'') \\
|
||||
StreamID (SID) & 2 bytes & Random bits, changed for each PTT or stream, but consistent from frame to frame within a stream \\
|
||||
FN & 2 bytes & Frame number exactly as would be transmitted as an RF stream frame, including the last frame indicator at (FN \& 0x8000) \\
|
||||
Payload & 16 bytes & Payload (exactly as would be transmitted in an RF stream frame) \\
|
||||
CRC16 & 2 bytes & CRC for the entire packet, as defined in Section \ref{crc} \\
|
||||
\hline[2pt]
|
||||
\end{tblr}
|
||||
\caption{Stream Mode IP Packet, Two Packet Method, Data}
|
||||
\end{table}
|
||||
|
||||
A Superframe would take 7 packets, one header and six data, totaling 192 bytes.
|
||||
|
||||
\subsection{Packet Mode IP Packet}
|
||||
|
||||
\begin{table}[H]
|
||||
\centering
|
||||
\begin{tblr}{
|
||||
colspec={llX},
|
||||
}
|
||||
\hline
|
||||
Field & Size & Description \\
|
||||
\hline
|
||||
MAGIC & 4 bytes & Magic bytes 0x4d313750 (``M17P'') \\
|
||||
LSF & 30 bytes & The Link Setup Frame(DST, SRC, TYPE, META field, CRC) as defined in Table \ref{lsf}. \\
|
||||
Payload & 4..825 bytes & This includes a type specifer, the user data, and a CRC \\
|
||||
\hline[2pt]
|
||||
\end{tblr}
|
||||
\caption{Packet Mode IP Packet}
|
||||
\end{table}
|
||||
|
||||
The Payload CRC is computed from the type specifer and the user data.
|
||||
The size of a payload must be at least 4, but no more than 825 bytes. Payload includes a one (to four) byte type specifier, user data and a two byte CRC.
|
||||
Packet integrity is validated by the MAGIC value, the LSF CRC and the Payload CRC.
|
||||
|
||||
\appendix
|
||||
|
||||
\chapter{Address Encoding} \label{address_encoding}
|
||||
|
|
|
|||
Loading…
Reference in New Issue