diff doc/Calypso-TCH-downlink @ 136:8eb0e7a39409

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