annotate doc/TCH-special-feature @ 1033:5ab737ac3ad7

TCH special feature documentation update
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 01 Jun 2016 02:06:44 +0000
parents 759b3cbf46aa
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1017
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1 FreeCalypso GSM firmware implements an optional special feature (needs to be
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2 explicitly enabled at compile time) which we call TCH rerouting. When this
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
3 feature is enabled, it applies the following special handling to GSM voice
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
4 traffic channels (TCH):
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
5
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
6 * All downlink TCH bits passing from the channel decoder to the vocoder block
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
7 (260 bits every 20 ms) can be non-invasively intercepted and forwarded to
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
8 the external host connected to the RVTMUX serial interface;
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
9
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
10 * Using the same serial interface, the external host can supply substitute
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
11 uplink TCH bits which will be transmitted in the place of the built-in
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
12 vocoder output, i.e., the latter can be effectively suppressed.
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
13
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
14 In order to use this feature, you need to compile our firmware in the voice+SMS
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
15 pseudo-modem configuration, i.e., the configuration in which the fw expects to
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
16 be controlled via AT commands wrapped in the RVTMUX binary packet serial
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
17 interface. You can use a target GSM device that has just one accessible serial
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
18 port (Mot C1xx and Pirelli DP-L10) or one that has two Calypso UARTs (Openmoko
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
19 GTA02 or our future FCDEV3B), but in the latter case you will be using only one
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
20 UART - whichever one you have configured to be RVTMUX.
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
21
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
22 Whatever system you are building that will act as the source and sink for TCH
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
23 bits will need to interface to the FreeCalypso GSM device via a serial port in
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
24 the RVTMUX binary packet format. Your system will need to send RVTMUX packets
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
25 with AT commands inside them in order to command the FC GSM device to register
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
26 with the network and to dial and/or answer calls, and you will need to send
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
27 RVTMUX packets of a different kind in order to supply the uplink TCH bits
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
28 during calls. In the other direction, your system will receive responses to
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
29 the AT commands you send, asynchronous notifications of incoming calls and SMS,
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
30 downlink TCH bits and various debug trace output from our FreeCalypso firmware.
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
31 The last part (debug trace output) can be simply ignored and discarded if you
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
32 wish, but we strongly recommend that you provide a way to view and/or log it
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
33 for debugging purposes.
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
34
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
35 Please see the RVTMUX document for general background information regarding the
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
36 RVTMUX binary packet interface; this document should be considered required
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
37 reading for anyone interested in working with the TCH rerouting special feature.
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
38
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
39 All packets transferred over the RVTMUX interface begin and end with 0x02. If
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
40 a payload byte within a packet equals 0x02 or 0x10, it needs to be prepended
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
41 with 0x10 as a transparency escape; all other payload bytes are sent literally.
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
42 The first byte within each RVTMUX packet after the opening 0x02 is the packet
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
43 type; the two packet types you will need to handle (both generate and receive)
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
44 are 0x1A for AT commands and 0x1C for TCH configuration commands.
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
45
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
46 To send an AT command to the FreeCalypso GSM device, prepend the 0x1A packet
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
47 type in front of the "AT" characters, wrap the packet with 0x02 bytes on both
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
48 ends, and send it to the modem. Responses to AT commands and asynchronous
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
49 notification messages such as "RING" for incoming calls will be sent to the
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
50 host as RVTMUX packets also beginning with the 0x1A packet type; they will be
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
51 interspersed among other packet types, mostly debug trace output. Your system
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
52 will need to receive the RVTMUX serial byte stream continuously, parsing the
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
53 packet structure and looking at the type of each packet (the first byte after
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
54 the opening 0x02) in order to detect if the modem has sent something you may be
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
55 interested in.
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
56
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
57 If you wish to receive a copy of all downlink TCH bits on the serial channel,
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
58 you will need to send the following 5-byte command packet to the modem:
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
59
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
60 0x02: opening flag
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
61 0x1C: RVTMUX packet type for TCH
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
62 0x11: TCH_CONFIG_REQ command opcode
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
63 0x01: payload byte indicating that the "forward downlink" state should be
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
64 set to enabled
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
65 0x02: closing flag
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
66
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
67 The modem will respond with a TCH_CONFIG_CONF confirmation message (opcode
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
68 0x12), and then during all voice calls your external host will receive the
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
69 following packet every 20 ms:
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
70
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
71 0x02: opening flag
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
72 0x1C: RVTMUX packet type for TCH
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
73 0x15: TCH_DLBITS_IND opcode
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
74 - 40 (decimal) bytes of payload -
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
75 0x02: closing flag
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
76
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
77 The 40 bytes of payload sent in every TCH_DLBITS_IND packet directly correspond
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
78 to the 20 16-bit words provided by the Calypso DSP in its a_dd_0 buffer. The
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
79 first 3 words (6 bytes) contains the DSP's own status information (not fully
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
80 understood by us yet, but we let you see what the DSP tells us without redacting
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
81 anything out), and the remaining 17 words (34 bytes) are supposed to contain
1033
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
82 the TCH bits received from the GSM network in the FR codec format. Each DSP
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
83 API word is sent in the big-endian byte order, i.e., the most significant byte
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
84 followed by the least significant byte.
1017
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
85
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
86 If you wish to send your own TCH uplink bits, replacing the output of the
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
87 built-in vocoder with your own alternate uplink data, you will need to send
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
88 your uplink TCH bits to the modem in packets of the following format:
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
89
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
90 0x02: opening flag
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
91 0x1C: RVTMUX packet type for TCH
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
92 0x13: TCH_ULBITS_REQ opcode
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
93 - 33 or 34 (decimal) bytes of payload -
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
94 0x02: closing flag
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
95
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
96 Sending 260 bits requires only 33 bytes, but the DSP operates in terms of
1033
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
97 16-bit words, hence 17 of those words are used. The least significant byte of
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
98 the last word (i.e., the very last byte with our big-endian transmission order)
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
99 is not expected to be used, but if you send 34 bytes rather than 33, you will
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
100 have control over every bit going into the DSP API RAM in this case.
1017
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
101
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
102 There is a queue inside the firmware in which these TCH uplink data blocks are
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
103 stored; this queue is filled by the serial packet receiving handler and drained
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
104 by the L1S (synchronous) code that executes at the right times in the GSM TDMA
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
105 multiplex when uplink TCH transmission is expected. Up to 4 blocks can be
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
106 queued up; as each queued-up block is transmitted on the air (more precisely,
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
107 as it is passed to the DSP for channel encoding and transmission), a
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
108 TCH_ULBITS_CONF short packet (consisting of just the opcode and nothing more)
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
109 is sent to the host. These confirmation packets can be used to pace the sending
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
110 of further TCH_ULBITS_REQs.
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
111
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
112 Testing
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
113 =======
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
114
1033
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
115 The just-described mechanism has been tested as follows:
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
116
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
117 1. I placed a call to WWV (+1-303-499-7111), and after verifying with my ear
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
118 that the downlink audio was good, I recorded the downlink TCH bits on that
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
119 call into a file with the tch record command in fc-shell.
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
120
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
121 2. I placed a call to another phone (running over a live commercial GSM network)
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
122 and played the saved recording from WWV into the call uplink with the
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
123 tch play command in fc-shell.
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
124
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
125 3. The audio heard on the other end of the call in the previous step: the
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
126 recording from WWV was definitely recognizable, but it didn't sound perfect,
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
127 i.e., it was rather garbled.
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
128
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
129 Further debugging of this mechanism will require two things which I currently
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
130 lack: (1) proper understanding of the workings of the GSM 06.10 FR codec and
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
131 (2) a test GSM network (as in OpenBTS/OpenBSC/etc) that could be used instead
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
132 of live commercial ones, so we could see exactly what the test MS is
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
133 transmitting on the air and what the BTS transmits in the downlink.
1017
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
134
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
135 Host side reference implementation
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
136 ==================================
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
137
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
138 If you are going to implement your system for talking to FreeCalypso GSM pseudo-
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
139 modems via the RVTMUX binary packet interface, we strongly recommend that you
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
140 use our rvinterf and fc-shell Unix/Linux host utilities as your starting point.
759b3cbf46aa doc/TCH-special-feature: document written
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
141 You can find their source code in the rvinterf subtree.
1033
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
142
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
143 The following test commands have been added to fc-shell for exercising the
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
144 experimental TCH rerouting mechanism:
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
145
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
146 tch record <filename>
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
147
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
148 Sends a TCH_CONFIG_REQ packet to the target, commanding the firmware to
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
149 start forwarding TCH downlink bits to the external host, and starts
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
150 recording the bits it receives in the named file. The file is written
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
151 with the same ordering of GSM 06.10 bits as used by the popular libgsm
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
152 implementation of this codec, i.e., the bits received from the GSM
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
153 device (ultimately coming from TI's DSP) are reordered before being
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
154 written into the file. It is only a reordering of bits with no change
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
155 in the information content.
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
156
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
157 I was hoping that the resulting files could be played with the SoX play
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
158 command under Slackware Linux, but all I got was garbled audio, and my
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
159 audio-fu is not good enough to figure out what is wrong.
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
160
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
161 tch record stop
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
162
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
163 Stops TCH downlink recording and closes the file into which the bytes
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
164 were being written; until the file is thus closed, it may not be
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
165 actually written out to the file system.
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
166
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
167 tch play <filename>
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
168
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
169 Plays GSM 06.10 FR speech frames from the named file in libgsm format
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
170 (same as written by the tch record command) into the call uplink.
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
171
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
172 tch play stop
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
173
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
174 Terminates the TCH UL play-from-file operation. This command is
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
175 normally not needed, as the play session will end automatically when
5ab737ac3ad7 TCH special feature documentation update
Mychaela Falconia <falcon@freecalypso.org>
parents: 1017
diff changeset
176 the end of file is reached.