annotate doc/Calypso-TCH-downlink @ 143:195911f2211c

document PCM format conversion utilities
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 14 Dec 2022 07:04:59 +0000
parents 8eb0e7a39409
children 486e19acc66f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
136
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 It has been discovered that the DSP ROM in the Calypso GSM baseband processor
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 implements one nifty feature which is not used at all in standard phone or modem
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 operation, but which can be used for all kinds of interesting hacks: the traffic
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 channel (TCH) bits coming out of the GSM 05.03 channel decoder in the downlink
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 direction (to be fed to one of several speech decoders) can be read out of the
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 DSP's API RAM in real time, and in the uplink direction the user can feed her
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 own bits to the input of the GSM 05.03 channel encoder, effectively suppressing
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 the output of the internal vocoder.
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 I (Mother Mychaela) previously played with this functionality back in 2016, and
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 it's been mostly shelved since then. This functionality is now getting renewed
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 attention in late 2022: now that we have a proper set of codec libraries (the
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 present package) and a proper understanding of Rx DTX handling requirements, we
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 can take another shot at decoding TCH downlink captures taken from Calypso GSM
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 MS.
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 For reasons of project resource planning, the work to study Calypso DSP downlink
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 bits in EFR mode is currently postponed until after we build our long-overdue FC
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 Venus board, but in the case of FR1 codec, we have a TCH downlink recording that
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 was captured back in 2016, and by analyzing this recording, we can make the
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 following observations:
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 * DSP status word 0 contains various flags; we already knew some of them, but
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 now we got additional knowledge:
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 bit 2 is BFI
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 bits 4:3 give a 2-bit SID flag per GSM 06.31 section 6.1.1
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 Unfortunately I couldn't find TAF anywhere - but oh well.
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 * DSP status word 1 appears to be garbage, DSP status word 2 appears to be some
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 kind of error count - no new knowledge here.
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 * By heeding the newly-understood BFI flag in DSP status word 0, we can do a
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 much cleaner decoding of TCH downlink capture than we did back in 2016.
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 The new gsmfr-cvt-dlcap utility in the present package replaces the old
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 fc-tch2fr utility from FC host tools - the latter should now be considered a
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 bogon. The output from gsmfr-cvt-dlcap is in our gsmx format, containing
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 Themyscira BFI markers in those frame positions where Calypso DSP indicated BFI
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 on TCH downlink, and it needs to be fed to gsmfr-decode from the present
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 package; our FR1 Rx DTX preprocessor will take care of SIDs and BFIs, and the
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 complete decoding chain should then closely replicate what must be happening
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 inside the original DSP.