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