FreeCalypso > hg > gsm-net-reveng
annotate doc/BFI-payload-fill @ 26:f80e64139670
trau-ul-decomp program written
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 24 Jun 2024 01:50:02 +0000 |
parents | 86a10ba0a1f8 |
children |
rev | line source |
---|---|
15
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 The traditional TRAU-UL frame format of GSM 08.60 & 08.61 for FR/HR/EFR codecs |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 always includes a full payload in every frame, even those marked as BFI=1. |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 Hence a question naturally arises: what does a traditional T1/E1 BTS put in the |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 payload bits of its TRAU-UL output when there are no "received, but erroneous" |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 bits for this frame, i.e., when the speech frame position was stolen for FACCH, |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 or when nothing at all was received (no burst midambles detected), with nothing |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 to run the channel decoder on? A satisfactory answer to this question will be |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 needed by anyone who sets out to do either of the following: |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 a) build a new (FOSS-based) T1/E1 BTS; |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 b) implement GSM 08.62 TFO (in-band) in a soft transcoder that works with an |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 IP-based GSM RAN. |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 Case (a) is probably only a theoretical thought exercise, but case (b) is quite |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 real: I (Mother Mychaela) do very much desire to bring back in-band TFO, and do |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 so under current economic conditions that call for IP transport within GSM RAN |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 and an IP interface to G.711 PSTN. For the latter problem, the enhancements of |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 TW-TS-001 & TW-TS-002 help greatly (and are required for proper implementation |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 of TFO), but the question still remains of what should be emitted in TFO frames |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 when a no-data BFI comes in. (Most BFIs on OsmoBTS are the no-data kind; there |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 is currently little opportunity for BFI-with-data UL output.) |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 In order to get better insight into this question, we (the small community of |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 people who care about this topic) need to look at the Abis UL output from real |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 historical E1 (or T1) BTS implementations, and see what they actually put out |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 under these conditions. I (Mother Mychaela) do not currently own any T1/E1 BTS |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 hardware, but thankfully there are some published capture files in Osmocom which |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 we can look at. The two binary files in trau-files directory of this repository |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 have been copied from libosmo-abis/contrib/trau2rtp, where they were committed |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 some time in Anno Horribilis (2020). |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 Analysis of Osmocom contrib/trau2rtp files |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 ========================================== |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 The README file in libosmo-abis/contrib/trau2rtp describes the origin of |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 e1_ts2_efr.bin and e1_ts2_fr.bin thusly: |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 > The input data (*.log.bz2) was generated using strace on an osmo-nitb process |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 > while a MO-to-MT call was running on two sub-slots of TS2. |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 > |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 > The strace log is converted to a binary stream of the raw 64bit E1 slot |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 > using strace-write-parse.py |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 Unfortunately there is no annotation as to what make/model of E1 BTS was used |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 in the OsmoNITB test call setup that produced these logs. The same README file |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 later says: |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 > The code has been tested against BS-11 and RBS6000/DUG20 in both modes |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 > (loop vs. RTP) and for FR and EFR. |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 but that note seems to refer to the workflow of the trau2rtp.c program operating |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 directly on a "live" DAHDI timeslot, not to the provenance of the included |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 capture files. |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 However, despite not knowing the specific BTS model that produced the TRAU-UL |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 frame streams that have been preserved for posterity in those Osmocom-published |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 capture files, we can make some observations after parsing them with our |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 trau-parse utility in trau-decode directory: |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 * In both FR and EFR captures, sub-timeslot 1 comes to life first (the idle fill |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 pattern of 2'b01 changes to TRAU-UL frames), then sub-timeslot 2. Thus we can |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 infer that subslot 1 is the MO leg of the test call, and subslot 2 is the MT |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 leg. |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 * The FR capture looks like I expected: every TRAU-UL frame (right from the |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 point where the sub-timeslot comes to life) is of type FR UL, and various bits |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 are set as I expected from the reading of GSM 08.60 spec. |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 * The EFR capture exhibits this strange oddity: each subslot starts out emitting |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 FR UL frames, then switches to emitting EFR frames some significant time |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 later. (920 ms later on the MO leg and 740 ms later on the MT leg in this |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 test call capture.) I have no clue why this oddity is occuring: is it perhaps |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 an artifact of OsmoNITB initially activating the GSM timeslot as FR and then |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 switching to EFR? Or is it a quirk intrinsic to whatever BTS model these |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 captures came from? |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 BFI output seen in these Osmocom-published captures |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 =================================================== |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 Having done the preliminary analysis presented above, we can return to our |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 original question: what did that model-unknown E1 BTS emit in its BFI frames, |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 those marked with C12=1? The evidence in the artifacts under examination |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 indicates that at least this particular E1 BTS model uses the buffer method, |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 similar to what is done on the mobile side of GSM Um in the well-studied |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 Calypso DSP. |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 What I mean by "the buffer method" is that the Rx Radio Subsystem (as defined |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 in GSM 06.31, 06.41 and 06.81 specs) maintains a buffer, potentially persisting |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 from one Rx frame position to the next, that holds the output of GSM 05.03 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 channel decoder block and the associated SID detector. Under good Rx |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 conditions, those that lead to BFI=0 output, this buffer gets overwritten with |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 new bits on every frame, and its potentially persistent nature is not apparent. |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 However, when no new traffic bits were received, neither good nor bad, the |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 buffer holds its previous content - and this buffer content gets emitted in |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 subsequent BFI=1 frames. How can we tell by black-box observation whether a |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 given implementation uses this buffer method? When the buffer method is used, |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 the following output should be visible at the observed interface (TRAU-UL frames |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 on the BTS side or Calypso DSP a_dd_0[] buffer on the MS side): |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 * When a certain frame position gets stolen for FACCH in the middle of what is |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 otherwise a stream of good traffic frames (the transmitter is not cut off as |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 in DTX), the BFI=1 output corresponding to the FACCH position will have the |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 same bit content as the previous good traffic frame. |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 * During times of prolonged absence of radio Rx (DTX pauses, or times during |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 channel activation or shutdown), there will be occasional appearances of new |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 bits (frame positions in which some radio noise was decoded as a frame), |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 followed by exact repetitions of previous "garbage" bit content. |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 The behavior just described is indeed what we see in the TRAU-UL captures under |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 examination, with one exception. The exception is that in the case of plain FR |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 (not in EFR), whenever this BTS emitted a repetition of previous buffer content |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 (no new decoded bits, good or bad), 4 out of 260 bits got corrupted, or rather |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 overwritten with a fixed pattern. These 4 bits are those that appear at the |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 very end of class 2 portion in GSM 05.03 bit order; in the state of "old buffer |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 output" they get replaced with 4'b1001. When reordered from GSM 05.03 into TRAU |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 frame bit order (the natural bit order of codec parameters), these 4 bits end up |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 in disparate places, hence when we look at the output of trau-parse, we see what |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 looks like corruption in the lsb of 4 different speech parameters: |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 * The lsb of 2nd LARc becomes 0; |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 * The lsb of 6th LARc becomes 1; |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 * The lsb of second-to-last Xmc becomes 1; |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 * The lsb of the very last Xmc becomes 0. |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 The presence of this corruption (can't really call it a bug, as the output from |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 the BTS under these conditions is officially undefined garbage) does not |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 invalidate the buffer hypothesis, but on the contrary, further confirms that |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 this hypothesis is most likely correct. |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 EFR CRC observations |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 ==================== |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 Taking advantage of EFR being more compact than the original FR (244 bits |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 instead of 260), the TRAU frame format for EFR adds 5 CRC-3 fields, covering |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 some of the "most important" bits of the payload. I was wondering if perhaps |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 some T1/E1 BTS may be transmitting intentionally bad CRC to indicate that they |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 got no payload bits at all, i.e., BFI with no data - but at least the (unknown) |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 BTS model from which these Osmocom-published captured were taken always emitted |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 good CRC in every TRAU-UL frame, including buffer-output frame positions which |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 were clearly "BFI with no new bits". |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 Ideas for software implementation of TFO |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 ======================================== |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 The main motivator for seeking answers to the question of BFI payload fill is |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 deciding what to put in those payload bits in the case of TFO frame output when |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 the RTP-based source is BFI with no data. From the standpoint of implementation |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 costs (both the effort of implementation and CPU load in operation), the buffer |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 method looks very attractive. One implementation strategy would be to have an |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 array of 320 bits (with each bit expanded to a byte at this stage) in the |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 per-call state structure, holding the TFO frame to be transmitted. This way |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 bits that never change (sync pattern, frame type bits etc) would only be |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 initialized once and then reused for the duration of the call; the frame output |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 function executing every 20 ms would fill in the new Dn bits most of the time, |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 set new C12-15, and do the final step of packing the content of this buffer |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 into the two lsbs of outgoing PCM samples. With this approach, the processing |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 of BFI-no-data frames would entail simply skipping the step that writes the new |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 Dn bits (and associated C13-14), leaving the old bits in place - apparently the |
86a10ba0a1f8
doc/BFI-payload-fill: article written
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 exact same approach used by T1/E1 BTS and MS DSP implementors. |