annotate doc/RVTMUX @ 937:06f96627ac9a

rvinterf TM log: decode TMFFS2 commands
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 24 May 2023 04:25:47 +0000
parents 06442f27b144
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
430
06442f27b144 doc/RVTMUX: added note at the beginning about paradigm changes
Mychaela Falconia <falcon@freecalypso.org>
parents: 429
diff changeset
1 [Historical note: this document was originally written in 2014 when the vision
06442f27b144 doc/RVTMUX: added note at the beginning about paradigm changes
Mychaela Falconia <falcon@freecalypso.org>
parents: 429
diff changeset
2 of FreeCalypso was very different from what it is today. Since then we have
06442f27b144 doc/RVTMUX: added note at the beginning about paradigm changes
Mychaela Falconia <falcon@freecalypso.org>
parents: 429
diff changeset
3 transitioned from making aftermarket hacks on pre-existing Calypso phones and
06442f27b144 doc/RVTMUX: added note at the beginning about paradigm changes
Mychaela Falconia <falcon@freecalypso.org>
parents: 429
diff changeset
4 modems to producing and supporting our own FreeCalypso hardware products, and
06442f27b144 doc/RVTMUX: added note at the beginning about paradigm changes
Mychaela Falconia <falcon@freecalypso.org>
parents: 429
diff changeset
5 our firmware work has changed from a nebulous dream to stable production code.
06442f27b144 doc/RVTMUX: added note at the beginning about paradigm changes
Mychaela Falconia <falcon@freecalypso.org>
parents: 429
diff changeset
6 The ways in which we approach various technical aspects have changed
06442f27b144 doc/RVTMUX: added note at the beginning about paradigm changes
Mychaela Falconia <falcon@freecalypso.org>
parents: 429
diff changeset
7 accordingly, but much of our documentation has been slow to catch up. The
06442f27b144 doc/RVTMUX: added note at the beginning about paradigm changes
Mychaela Falconia <falcon@freecalypso.org>
parents: 429
diff changeset
8 documentation is now being updated, but there may still be some passages where
06442f27b144 doc/RVTMUX: added note at the beginning about paradigm changes
Mychaela Falconia <falcon@freecalypso.org>
parents: 429
diff changeset
9 the old world view shines through.]
06442f27b144 doc/RVTMUX: added note at the beginning about paradigm changes
Mychaela Falconia <falcon@freecalypso.org>
parents: 429
diff changeset
10
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 TI's Calypso GSM/GPRS baseband processor chip has not one but two UART serial
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 ports, called "MODEM" and "IrDA" in the hardware documentation. In hardware
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 terms, both support basic data-leads-only UART operation at a fixed baud rate,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 but their extended capabilities differ: the IrDA UART adds IrDA capability (no
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 surprise), whereas the MODEM UART adds hardware flow control and autobaud. If
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 one is not implementing an actual IrDA interface, then the so-called "IrDA"
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 UART becomes a strict subset of the MODEM one in terms of hw capabilities -
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 just an extra UART, but a somewhat less capable one.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 In a classic modem design such as that present in the GTA0x smartphones made by
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 FIC/Openmoko, the Calypso presents a standard AT command interface on its MODEM
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 UART port. (In the case of GTA0x phones this serial channel is wired to the
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 phone's application processor; in a standalone modem it would be wired to a
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 USB-serial chip or even to a classic RS-232 DB25 port.) However, what is less
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 known is that the standard firmware for such modems simultaneously presents an
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 entirely different interface on the IrDA UART - an interface intended for
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 development, debugging and factory production testing (which includes RF
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 calibration and IMEI etc programming), rather than for "normal" end users.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 Normally this debug/development serial interface (called RVTMUX as will be
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 explained momentarily) is hidden from "ordinary" users - for example, on FIC
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 GTA0x phones it is wired to the analog headset jack through a hardware switch
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 which needs to be enabled through a GPIO signal from the AP. On Mot C139 and
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 its siblings the situation is similar: one needs to key in the secret magic
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 sequence **16379#, and then the firmware presents a hidden menu for switching
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 the analog headset jack between its "normal" function and the UART carrying
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 RVTMUX.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 But there also exist some oddball devices on which the RVTMUX interface is
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 presented "in your face". The Pirelli DP-L10 phone has a USB charging port
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 which is also wired (through a CP2102 USB-serial chip) to the IrDA UART on the
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 Calypso - that's right, IrDA, not MODEM - a design decision with which this
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 hacker strongly disagrees. (It'll definitely be wired to the MODEM UART
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 instead on our own semi-clone of this phone, but I digress.) Apparently Foxconn
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 (the designers of this phone) had no desire to provide a standard AT command
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 interface, and instead the only "official" way to use the "data" function of
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 their USB port (rather than the charging function) is for their "PC sync"
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 feature, i.e., their proprietary Weendoze software. And guess what, their
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 proprietary "PC sync" feature works over TI's RVTMUX interface, as that is
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 what's presented on Calypso's IrDA UART behind the CP2102!
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 OK, so what is this RVTMUX? RV stands for RiViera, an application framework
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 which TI added to their GSM firmware suite in the early 2000s, T stands for
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 trace, and MUX stands for multiplexor. It's a binary packet interface, although
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 many of these packets contain ASCII debug messages inside. The framing format
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 is the same in both directions: each packet begins and ends with an STX (0x02)
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 byte, all payload bytes except 0x02 and 0x10 are sent literally, and there is a
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 DLE (0x10) byte prepended before any 0x02 or 0x10 in the payload. It's the same
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 general principle as asynchronous HDLC (RFC 1662): packets can contain any
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 binary data, and the framing provides packet boundaries - although TI's version
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 is a little less robust than async-HDLC when it comes to recovering after lost
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 synchronization.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 The firmware suite component responsible for actually sending and receiving
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 these packets over the assigned UART port (usually IrDA, but can be MODEM too,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 as on Compal phones for example) is called RVT (RiViera Trace), and it
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 implements a MUX function. There are several logical channels multiplexed over
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 one physical serial port, and the first byte of every packet indicates which
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 logical channel it belongs to. Any component within the GSM firmware suite can
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 send packets to RVT for transmission on this serial interface, and can also
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 register to receive packets beginning with a particular type ID byte.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 Debug trace output
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 ==================
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 All GSM device firmwares that are based on TI's Calypso chipset reference fw
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 continuously emit quite voluminous debug trace output on their RVTMUX serial
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 port, whether it is hidden or exposed on a given device. Like all RVTMUX
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 traffic, this debug trace output takes the form of binary packets as explained
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 above, but the content of these packets is mostly ASCII with some binary header
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 bytes prepended. FreeCalypso host utility rvtdump captures all serial output
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 from a GSM device's RVTMUX port, parses the packet structure and displays this
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 output in line-oriented pure ASCII with all binary parts decoded.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 Test Mode commands
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 ==================
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 The other major use of the RVTMUX interface is sending so-called Test Mode
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 commands from an external host to a running GSM device. Depending on the
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 firmware version, a GSM device can be commanded to do any of the following
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 things through this mechanism:
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 * Exercise RF test modes, e.g., transmit continuously at a set frequency and
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 power level;
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 * Read and write arbitrary memory locations in the Calypso ARM7 address space;
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 * Read and write ABB chip registers;
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 * Reboot or power off;
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 * Access and manipulate the device's flash file system (FFS).
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 In the segment of history of interest to us TI has produced two different
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 target firmware components that can receive, interpret and act upon Test Mode
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 command packets:
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 * The original Test Mode component of Layer 1, called L1TM or TML1: this
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 component handles all RF test modes (needed for RF calibration on device
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 production lines), and originally it also implemented memory and ABB register
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 read and write commands, and provided access to TMFFS1 (see below). In the
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 original implementation this component registered itself as the handler for
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 the "TM" RVTMUX channel (RVT packet type 0x14), so it would receive all TM
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 packets sent to the device.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 * Enhanced Test Mode (ETM) is a later invention. It registers itself (instead
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 of the old TM in L1) with RVT as the handler for the "TM" RVTMUX channel, and
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 then provides a registration service of its own, such that various components
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 in the fw suite can register to receive external command packets passing
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 first through RVT, then through ETM, and can send responses passing through
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 ETM, then through RVT back to the external host. If a given fw version
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 contains both ETM and L1TM, then L1TM registers itself with ETM; an external
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 host would send exactly the same binary command packets to exercise RF test
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 modes, but inside the firmware they now pass through ETM on their way to L1TM.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 The ETM_CORE module contained within ETM itself provides some low-level debug
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 commands: by sending the right binary command packets to the GSM device via the
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 RVTMUX serial channel, an external host can examine or modify any memory
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 location and any hardware register, cause the device to reset, etc. Prior to
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 ETM some of these functions (but not all) could be exercised through older TM3
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 commands, but in FreeCalypso we became familiar with the ETM versions of these
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 commands long before the older ones because we got the ETM component in full
429
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
129 source form, whereas the sole surviving copy of TCS211 that serves as our golden
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
130 reference came with L1TM in binary object form like the rest of L1, and we got
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
131 to source-reconstructing it only much later.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132
429
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
133 Our TCS211 reference fw has both ETM and L1TM, thus it accepts both ETM and TM3
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
134 command packets; the same holds for our current production firmwares that are
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
135 based on this TCS211 reference. ETM commands (including TMFFS2, see below) also
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
136 work on Pirelli's fw, but Mot/Compal's original fw for the C139 has only the
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 original non-enhanced Test Mode, not ETM.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 FFS access via TM/ETM
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 =====================
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 One of the essential facilities provided in one form or another in all known
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 incarnations of the Test Mode mechanism is the ability to access and manipulate
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 the GSM device's flash file system (FFS). See TIFFS-Overview for a description
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 of this file system. TI's TMFFS1 and TMFFS2 protocols provide a command and
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 response packet interface to the FFS API functions inside the fw, and enable an
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 external host connected to the GSM device via the RVTMUX channel to perform
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 arbitrary read and write operations on the device file system.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 In the segment of history of interest to us TI has produced two different
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 and entirely incompatible versions of the TMFFS protocol: TMFFS1 and TMFFS2.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 Or rather, what is now called TMFFS1 was originally just TMFFS, and then came
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 TMFFS2. TMFFS2 works only through ETM, whereas TMFFS1 predates ETM: in the
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 original implementation the tm_ffs() function in the FFS code was called from
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 L1TM code.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 Our copy of TCS211 reference fw includes the source for both TMFFS1 and TMFFS2;
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 it is theoretically possible to build a firmware image that includes both TMFFS
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 versions (they won't conflict because they respond to different command
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 packets), but it is pretty clear that TI never intended to have both enabled
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 at the same time. Our copy of TCS211 came with TMFFS1 enabled and we didn't
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 change it when we made the moko12 (leo2moko-r1) fw release for the Openmoko
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 community (the previous proprietary mokoN firmwares also implement TMFFS1),
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 but we have subsequently switched to TMFFS2 for our current TCS211-based work.
429
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
165 Our current production firmwares implement TMFFS2.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 Pirelli's fw implements TMFFS2: we don't have any source for this fw, but our
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 FreeCalypso host utilities written to talk the TMFFS2 protocol based on our
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 available TCS211 source work beautifully when run against Pirelli's fw.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 Use in FreeCalypso
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 ==================
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173
429
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
174 Our current production firmwares for FreeCalypso modems faithfully follow the
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
175 architecture of TI's TCS211 without any fundamental changes. Thus the
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
176 functionality which we present via RVTMUX is exactly the same as TI's original:
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
177 our firmwares emit the same 3 kinds of debug traces (RV, L1 and GPF) as various
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
178 pre-existing ones, and for Test Mode functionality we have ETM, L1TM and TMFFS2.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 We have adopted ETM and TMFFS2 as the standard combination for FreeCalypso,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 i.e., ETM_CORE for memory and ABB register reads and writes and TMFFS2 for
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 external FFS access. We needed to develop our own host tools for operating on
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 GSM device FFS via one of the two TMFFS protocols, and after studying the fw
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 source implementing both, I (Space Falcon) came to the conclusion that TMFFS2
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 is both more capable and more reliable; my guess is that TMFFS1 was likely kept
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 around only because some of TI's crappy Weendoze host software depended on it.
18
d9307880f59f doc/RVTMUX: reference to TI's tmffs.c source updated for the repository split
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
187 (See chipsetsw/drivers/drv_app/ffs/board/tmffs.c in leo2moko or tcs211-fcmodem
d9307880f59f doc/RVTMUX: reference to TI's tmffs.c source updated for the repository split
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
188 if you would like to judge for yourself.)
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 We have the following host tools for communicating with TI-based GSM firmwares
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 (both our own and some of the existing proprietary ones):
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 rvtdump This tool produces a human-readable dump of all output emitted
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 by a TI-based GSM fw in the form of RVTMUX binary packets. It
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 can also log this dump to a file.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 rvinterf This tool is a superset of rvtdump: it not only dumps and/or
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 logs all output from the GSM fw, but also provides a mechanism
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 for sending command packets to it.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 Rvinterf is the engine behind the following host tools that send Test Mode
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 commands to a target:
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 fc-tmsh This is our basic tool for sending Test Mode commands to a
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 running GSM fw. It is strictly asynchronous in that commands
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 entered by the operator get sent to the target, and any response
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 packets received from the target are displayed as they come in.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 The tool has no knowledge of any correspondence between commands
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 being sent and whatever responses they should elicit, i.e., it
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 is perfectly suited for experimental discovery of firmware
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 behaviour in response to Test Mode commands.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 This tool was written before we realized that there was/is an
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 older, more basic Test Mode predating ETM, hence in many place
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 we say "ETM" when we really should have said "TM". Oh well...
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 fc-fsio This tool speaks the TMFFS2 protocol and allows a user or
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 developer to perform a wide range of operations on the file
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 system of a GSM device. It operates synchronously, i.e., it
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 sends ETM/TMFFS2 commands and expects responses in strict
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 lock-step; a single user command may translate into a large
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 number of ETM/TMFFS2 command packet exchanges.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223
429
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
224 fc-shell This tool is asynchronous like fc-tmsh, but instead of talking
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
225 and listening on the TM/ETM RVTMUX channel, it talks and listens
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
226 on GPF's channel and on the new AT-over-RVTMUX channel which we
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
227 added in FreeCalypso. fc-shell can be used to issue system
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
228 primitive commands to GPF (and to see firmware responses to
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
229 them), and to talk AT commands via RVTMUX.
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
230
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 AT commands over RVTMUX
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 =======================
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 There is one more use to which we put the RVTMUX debug serial interface that is
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235 an original FreeCalypso invention: communicating with the AT command interpreter
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236 (ATI). TI's original architecture assumes that if a product is to offer a
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 standard AT command interface (the product is either a GSM/GPRS modem for which
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 this AT command interface is the sole mode of usage or a feature phone that
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 offers a data port as one of its features), then it will be presented on a
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 dedicated UART separate from RVTMUX.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241
429
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
242 However, in the case of our FreeCalypso family of projects about 2 years had
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
243 passed between our first functional GSM fw attempts in 2015 and us successfully
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
244 building our own development board in 2017; during this time we had to work on
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
245 various crippled pre-existing Calypso devices, and many of them had only one
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
246 UART practically accessible. In response to this situation we developed a way
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
247 to pass AT commands over RVTMUX. We created a new RVTMUX channel for this
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
248 interface and assigned it RVT packet type 0x1A. Packets sent from an external
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
249 host to the GSM device carry AT commands and SMS string input, whereas packets
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
250 flowing the other way carry ATI's responses to commands and asynchronous
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
251 notifications such as incoming calls. The host utility for talking AT commands
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
252 to a FreeCalypso GSM device via RVTMUX is fc-shell, described above.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253
429
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
254 Now that we have built a proper FreeCalypso development board with two UARTs,
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
255 the use of this AT-over-RVTMUX hack is deprecated for general usage: this hack
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
256 does not support any data services (CSD or GPRS), and even for SMS it is
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
257 crippled because maximum-length messages cannot be sent in the more capable PDU
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
258 mode. However, it still comes in handy during certain casual testing sessions,
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
259 and it is required if one needs to run our FreeCalypso firmware on Mot C1xx or
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
260 Pirelli DP-L10 hardware.
223
ac49d8814893 doc/RVTMUX: keepalive mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
261
ac49d8814893 doc/RVTMUX: keepalive mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
262 Keepalive mechanism
ac49d8814893 doc/RVTMUX: keepalive mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
263 ===================
ac49d8814893 doc/RVTMUX: keepalive mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
264
429
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
265 Another FreeCalypso addition to TI's RVTMUX interface is our keepalive mechanism
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
266 for the voice pseudo-modem hack on Mot C1xx targets. The FreeCalypso family
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
267 includes many subprojects, and one of these subprojects involves running modem-
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
268 like firmware (control via AT commands only, no local UI) on Mot C1xx phones.
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
269 Having a device that was originally made to be a phone with LCD and buttons
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
270 turn into a serially-controlled pseudo-modem (LCD stays dark, buttons do
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
271 nothing) feels quite weird, and this situation is exacerbated by the flashing
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
272 requirement: the only way to run our pseudo-modem fw on Mot C1xx phones is to
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
273 flash it, there is no way to run it out of RAM without disturbing the phone's
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
274 original fw.
223
ac49d8814893 doc/RVTMUX: keepalive mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
275
429
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
276 When our Magnetite and Selenite firmwares are built for a C1xx target in the
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
277 VPM configuration, they implement the following keepalive logic: if the phone
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
278 is powered on and running our fw, but the charging power source is not plugged
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
279 in, the fw sends periodic keepalive queries out the serial port to see if there
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
280 is a running rvinterf process on the other end of the wire, and automatically
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
281 powers off if there is no keepalive response.
223
ac49d8814893 doc/RVTMUX: keepalive mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
282
ac49d8814893 doc/RVTMUX: keepalive mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
283 Code has been added to rvinterf to respond with a keepalive answer packet when
ac49d8814893 doc/RVTMUX: keepalive mechanism documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
284 a keepalive query packet is received; the feature has been implemented on the
429
05dc91d011a6 doc/RVTMUX: updated for the current state of FreeCalypso
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
285 rvinterf side first, and then subsequently in our Magnetite fw for C1xx targets.