comparison doc/TRAU-UL-testing @ 23:bffbe80ffade

doc/TRAU-UL-testing: article written
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 23 Jun 2024 23:21:45 +0000
parents
children
comparison
equal deleted inserted replaced
22:8957383370c5 23:bffbe80ffade
1 In order to conduct behavioral reverse eng of the historical TRAU we have in
2 our lab (Nokia TCSM2), we will need to feed TRAU-UL frames to its Ater interface
3 (first GSM 08.60 FR and EFR, then later GSM 08.61 HR), exercising various
4 combinations of speech parameters and out-of-band control bits. In order to
5 conduct these exercises, we need some test file formats of our own invention:
6
7 * The source format for human editing is ASCII-based, friendly toward arbitrary
8 manipulation of speech parameters and flags. We call this ad hoc ASCII source
9 format *.tsrc, for TRAU-UL source.
10
11 * trau-ul-compile program in the present code repository will compile these
12 *.tsrc source files into *.tul (TRAU-UL) binary format;
13
14 * The Ater test program in ice1-trau-tester repository will read binary frames
15 from our ad hoc *.tul file format and turn them into actual TRAU-UL bits
16 going to E1.
17
18 *.tul binary format
19 ===================
20
21 Each frame (FR or EFR) is stored as a fixed record of 34 bytes. The format for
22 FR is:
23
24 * 33 bytes of standard RTP format representing 260 bits of payload;
25 * 1 byte of BFI+SID flags.
26
27 The format for EFR is:
28
29 * 31 bytes of standard RTP format representing 244 bits of payload;
30 * 1 byte controlling CRC inversion;
31 * 1 byte spare;
32 * 1 byte of BFI+SID flags.
33
34 Because each *.tul record begins with an FR or EFR frame in standard RTP
35 encoding, and the latter includes a signature (0xD or 0xC) in the upper nibble
36 of the first byte, each *.tul record can be trivially checked if it is for FR
37 or EFR testing.
38
39 Byte of BFI+SID flags
40 ---------------------
41
42 Bit 0x80 is BFI, bits 0x03 are SID, the rest are reserved.
43
44 EFR CRC inversion control
45 -------------------------
46
47 We can generate EFR TRAU-UL frames with either correct or inverted CRC.
48 Furthermore, GSM 08.60 frame format for EFR has 5 separate CRC fields covering
49 different parts of the frame, and we can independently control the correct-or-
50 inverted choice for each.
51
52 The CRC manipulation byte included in *.tul frames for EFR has 5 used and 3
53 reserved bits. The 5 most significant bits correspond to the 5 CRC fields in
54 GSM 08.60 frame format; control bit equal to 0 means send correct CRC, otherwise
55 send inverted CRC.
56
57 ASCII source format
58 ===================
59
60 Example for FR:
61
62 Frame_FR {
63 LARc 9 23 15 8 7 3 3 2
64 sf 40 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4 4
65 sf 40 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4 4
66 sf 40 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4 4
67 sf 40 0 0 0 4 4 4 4 3 4 4 4 4 4 4 4 4
68 }
69
70 Example for EFR:
71
72 Frame_EFR {
73 BFI 0
74 LPC 4 47 180 144 62
75 sf 342 11 0 1 15 1 13 0 3 0 3 0 3
76 sf 54 1 8 8 5 8 1 0 0 1 1 0 0
77 sf 342 0 0 0 0 0 0 0 0 0 0 0 0
78 sf 54 11 0 0 0 0 0 0 0 0 0 0 0
79 SID 0
80 }
81
82 Each frame to be encoded must be given as a block beginning with "Frame_FR {"
83 or "Frame_EFR {" opening line and closing with "}". The opening brace must be
84 on the same line as the frame type keyword, and that line must have no other
85 fields; the closing brace must be on its own line. (The actual parser is line-
86 based, despite the appearance of braces.)
87
88 Each interior line shall consist of a keyword followed by numbers; the keyword
89 indicates which part of the frame is being set. LARc for FR or LPC for EFR sets
90 the frame-global speech parameters (8 for FR and 5 for EFR); sf sets subframe
91 parameters. Every frame must have one LARc/LPC line and exactly 4 sf lines.
92
93 BFI and SID settings are optional. If BFI is not set, it defaults to 0; if SID
94 is not set, it is computed from the speech parameters per standard bit counting
95 rules of GSM 06.31 or 06.81 section 6.1.1.
96
97 For EFR only, there will also be an optional crc-inv setting that sets the CRC
98 manipulation byte, defaulting to 0 (correct CRC).
99
100 Aside from the required line structure, white space (' ' and '\t') can appear
101 anywhere and is ignored. '#' character introduces a comment, continuing to the
102 end of the line.
103
104 All keywords are case-insensitive.