<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/14940">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">common: trx_if.adoc: Add documentation about TRXDv1 and SETFORMAT<br><br>Change-Id: I320539fc9ffb7dd0f09ec18892299bd603cd7a85<br>---<br>M common/chapters/trx_if.adoc<br>1 file changed, 139 insertions(+), 7 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/40/14940/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/common/chapters/trx_if.adoc b/common/chapters/trx_if.adoc</span><br><span>index 0dda0f0..58d0f49 100644</span><br><span>--- a/common/chapters/trx_if.adoc</span><br><span>+++ b/common/chapters/trx_if.adoc</span><br><span>@@ -141,20 +141,63 @@</span><br><span> |13| PDTCH+PACCH+PTCCH</span><br><span> |===</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+==== TRXD header version negotiation</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Messages on DATA interface may have different header formats, defined by a</span><br><span style="color: hsl(120, 100%, 40%);">+version number, which can be negotiated on the control interface. By default,</span><br><span style="color: hsl(120, 100%, 40%);">+the Transceiver will use the legacy header version (0).</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The header format negotiation can be initiated by the BTS using 'SETFORMAT'</span><br><span style="color: hsl(120, 100%, 40%);">+command. If the requested version is not supported by the transceiver, status</span><br><span style="color: hsl(120, 100%, 40%);">+code of the response message should indicate a preferred (basically, the latest)</span><br><span style="color: hsl(120, 100%, 40%);">+version. The format of this message is the following:</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+CMD SETFORMAT <timeslot> <ver_req></span><br><span style="color: hsl(120, 100%, 40%);">+RSP SETFORMAT <ver_resp> <ver_req></span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+where:</span><br><span style="color: hsl(120, 100%, 40%);">+* `<ver_req>` is the requested version (suggested by the BTS),</span><br><span style="color: hsl(120, 100%, 40%);">+* `<ver_rsp>` is either the applied version if matches `<ver_req>`, or a</span><br><span style="color: hsl(120, 100%, 40%);">+  preferred version if `<ver_req>` is not supported.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+If the transceiver indicates `<ver_rsp>` different than `<ver_req>`, the BTS is</span><br><span style="color: hsl(120, 100%, 40%);">+supposed to re-initiate the version negotiation using the suggested `<ver_rsp>`.</span><br><span style="color: hsl(120, 100%, 40%);">+For example:</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+  BTS -> TRX: CMD SETFORMAT 2</span><br><span style="color: hsl(120, 100%, 40%);">+  BTS <- TRX: RSP SETFORMAT 1 2</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  BTS -> TRX: CMD SETFORMAT 1</span><br><span style="color: hsl(120, 100%, 40%);">+  BTS <- TRX: RSP SETFORMAT 1 1</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+If no suitable `<ver_rsp>` is found, or the `<ver_req>` is incorrect, the status</span><br><span style="color: hsl(120, 100%, 40%);">+code in the response shall be `-1`.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+As soon as `<ver_rsp>` matches `<ver_req>` in the response, the process of</span><br><span style="color: hsl(120, 100%, 40%);">+negotiation is complete. Changing the header version is supposed to be done</span><br><span style="color: hsl(120, 100%, 40%);">+before `POWERON`, but can be also done afterwards.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> === TRXD protocol</span><br><span> </span><br><span> Messages on the data interface carry one radio burst per UDP message.</span><br><span> </span><br><span> ==== Uplink Data Burst</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-.TRXD Uplink data burst message structure</span><br><span style="color: hsl(120, 100%, 40%);">+Uplink data burst message structure differs from version 0 to 1. Basically,</span><br><span style="color: hsl(120, 100%, 40%);">+version 1 contains an extended header with regards to version 0, and the final</span><br><span style="color: hsl(120, 100%, 40%);">+padding existence is completely dropped.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+.TRXDv0 Uplink data burst message structure</span><br><span> [packetdiag]</span><br><span> ----</span><br><span> {</span><br><span>        colwidth = 32</span><br><span>        node_height = 40</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-    0-3:    VER</span><br><span style="color: hsl(120, 100%, 40%);">+   0-3:    VER(0)</span><br><span>       4:      RES</span><br><span>  5-7:    TN</span><br><span>   8-39:   FN</span><br><span>@@ -165,8 +208,27 @@</span><br><span> }</span><br><span> ----</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+.TRXDv1 Uplink data burst message structure</span><br><span style="color: hsl(120, 100%, 40%);">+[packetdiag]</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+        colwidth = 32</span><br><span style="color: hsl(120, 100%, 40%);">+ node_height = 40</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    0-3:    VER(1)</span><br><span style="color: hsl(120, 100%, 40%);">+        4:      RES</span><br><span style="color: hsl(120, 100%, 40%);">+   5-7:    TN</span><br><span style="color: hsl(120, 100%, 40%);">+    8-39:   FN</span><br><span style="color: hsl(120, 100%, 40%);">+    40-47:  RSSI</span><br><span style="color: hsl(120, 100%, 40%);">+  48-55:  TOA256</span><br><span style="color: hsl(120, 100%, 40%);">+        56-63:  MTS</span><br><span style="color: hsl(120, 100%, 40%);">+   64-71:  C/I</span><br><span style="color: hsl(120, 100%, 40%);">+   72-127: ...Payload...</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> VER: 4 bits::</span><br><span style="color: hsl(0, 100%, 40%);">-TRXD header version, shall be 0.</span><br><span style="color: hsl(120, 100%, 40%);">+TRXD header version, v0 and v1 are specified so far.</span><br><span> </span><br><span> TN: 3 bits::</span><br><span> Timeslot number.</span><br><span>@@ -184,13 +246,83 @@</span><br><span> TOA256: 8 bits (1 byte)::</span><br><span> Timing of Arrival in units of 1/256 of symbol, big endian.</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+MTS: 8 bits (1 byte)::</span><br><span style="color: hsl(120, 100%, 40%);">+Contains the Modulation and Training Sequence information. See <<coding-mts>></span><br><span style="color: hsl(120, 100%, 40%);">+for more information on the encoding.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+C/I: 16 bits (2 bytes)::</span><br><span style="color: hsl(120, 100%, 40%);">+Contains the Carrier-to-Interference ratio in centiBels, big endian. The C/I</span><br><span style="color: hsl(120, 100%, 40%);">+value is computed from the training sequence of each burst, where the "ideal"</span><br><span style="color: hsl(120, 100%, 40%);">+training sequence can be compared with the actual training sequence and then</span><br><span style="color: hsl(120, 100%, 40%);">+express that in centiBels.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> Payload: 148 bytes for GSM, 444 bytes for EDGE::</span><br><span style="color: hsl(0, 100%, 40%);">-Contains the uplink burst. Soft symbol estimates, 0 -> definite "0", 255 -></span><br><span style="color: hsl(0, 100%, 40%);">-definite "1".</span><br><span style="color: hsl(120, 100%, 40%);">+Contains the uplink burst. Unlike the downlink bursts, the uplink bursts are</span><br><span style="color: hsl(120, 100%, 40%);">+designated using the soft-bits notation, so the receiver can indicate its</span><br><span style="color: hsl(120, 100%, 40%);">+assurance from 0 to -127 that a given bit is 1, and from 0 to +127 that a given</span><br><span style="color: hsl(120, 100%, 40%);">+bit is 0. The Viterbi algorithm allows to approximate the original sequence of</span><br><span style="color: hsl(120, 100%, 40%);">+hard-bits (1 or 0) using these values. Each soft-bit (-127..127) of the burst is</span><br><span style="color: hsl(120, 100%, 40%);">+encoded as an unsigned value in range (0..255) respectively using the constant</span><br><span style="color: hsl(120, 100%, 40%);">+shift. This way:</span><br><span style="color: hsl(120, 100%, 40%);">+* 0 -> definite "0"</span><br><span style="color: hsl(120, 100%, 40%);">+* 255 -> definite "1".</span><br><span> </span><br><span> PAD: 2 bits (optional)::</span><br><span> Padding at the end, historical reasons (OpenBTS inheritance). Bits can take any</span><br><span style="color: hsl(0, 100%, 40%);">-value, but 0 is preferred.</span><br><span style="color: hsl(120, 100%, 40%);">+value, but 0 is preferred. Only expected on TRXDv0 headers.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[[coding-mts]]</span><br><span style="color: hsl(120, 100%, 40%);">+===== Coding of MTS: Modulation and Training Sequence info</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+3GPP TS 45.002 version 15.1.0 defines several modulation types, and a few sets</span><br><span style="color: hsl(120, 100%, 40%);">+of training sequences for each type. The most common are GMSK and 8-PSK (which</span><br><span style="color: hsl(120, 100%, 40%);">+is used in EDGE).</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+.MTS field structure</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">++-----------------+---------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| 7 6 5 4 3 2 1 0 | bit numbers (value range)             |</span><br><span style="color: hsl(120, 100%, 40%);">++-----------------+---------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| X . . . . . . . | IDLE / nope frame indication (0 or 1) |</span><br><span style="color: hsl(120, 100%, 40%);">++-----------------+---------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| . X X X X . . . | Modulation, TS set number (see below) |</span><br><span style="color: hsl(120, 100%, 40%);">++-----------------+---------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| . . . . . X X X | Training Sequence Code (0..7)         |</span><br><span style="color: hsl(120, 100%, 40%);">++-----------------+---------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+IDLE / nope frame indication::</span><br><span style="color: hsl(120, 100%, 40%);">+The bit number 7 (MSB) is set to high when either nothing has been detected, or</span><br><span style="color: hsl(120, 100%, 40%);">+during IDLE frames, so noise levels can be delivered, and avoid clock gaps on</span><br><span style="color: hsl(120, 100%, 40%);">+the BTS side. Other bits are ignored, and should be set to low (`0`) in this</span><br><span style="color: hsl(120, 100%, 40%);">+case.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Modulation and TS set number::</span><br><span style="color: hsl(120, 100%, 40%);">+GMSK has 4 sets of training sequences (see tables 5.2.3a-d), while 8-PSK (see</span><br><span style="color: hsl(120, 100%, 40%);">+tables 5.2.3f-g) and the others have 2 sets. Access and Synchronization bursts</span><br><span style="color: hsl(120, 100%, 40%);">+also have several synchronization sequences.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+.Modulation and TS set number</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">++-----------------+---------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| 7 6 5 4 3 2 1 0 | bit numbers (value range)             |</span><br><span style="color: hsl(120, 100%, 40%);">++-----------------+---------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| . 0 0 X X . . . | GMSK, 4 TS sets (0..3)                |</span><br><span style="color: hsl(120, 100%, 40%);">++-----------------+---------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| . 0 1 0 X . . . | 8-PSK, 2 TS sets (0..1)               |</span><br><span style="color: hsl(120, 100%, 40%);">++-----------------+---------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| . 0 1 1 X . . . | AQPSK, 2 TS sets (0..1)               |</span><br><span style="color: hsl(120, 100%, 40%);">++-----------------+---------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| . 1 0 0 X . . . | 16QAM, 2 TS sets (0..1)               |</span><br><span style="color: hsl(120, 100%, 40%);">++-----------------+---------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| . 1 0 1 X . . . | 32QAM, 2 TS sets (0..1)               |</span><br><span style="color: hsl(120, 100%, 40%);">++-----------------+---------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+| . 1 1 1 X . . . | RESERVED (0)                          |</span><br><span style="color: hsl(120, 100%, 40%);">++-----------------+---------------------------------------+</span><br><span style="color: hsl(120, 100%, 40%);">+----</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Training Sequence Code::</span><br><span style="color: hsl(120, 100%, 40%);">+The Training Sequence Code used to decode the burst.</span><br><span> </span><br><span> ==== Downlink Data Burst</span><br><span> </span><br><span>@@ -211,7 +343,7 @@</span><br><span> ----</span><br><span> </span><br><span> VER: 4 bits::</span><br><span style="color: hsl(0, 100%, 40%);">-TRXD header version, shall be 0.</span><br><span style="color: hsl(120, 100%, 40%);">+TRXD header version, v0 and v1 are specified so far.</span><br><span> </span><br><span> TN: 3 bits::</span><br><span> Timeslot number.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/14940">change 14940</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/14940"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-gsm-manuals </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I320539fc9ffb7dd0f09ec18892299bd603cd7a85 </div>
<div style="display:none"> Gerrit-Change-Number: 14940 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>