comparison doc/FC-aftermarket-intro @ 22:873d5f33e8f3

doc: beginning with FC-aftermarket-intro
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 11 Jun 2023 06:18:53 +0000
parents
children
comparison
equal deleted inserted replaced
21:9d7d2fdc733b 22:873d5f33e8f3
1 Running FreeCalypso in aftermarket configurations - introduction
2 ================================================================
3
4 In the context of FreeCalypso family of projects, the term "aftermarket
5 configurations" means running FC firmware on alien hardware, primarily Motorola
6 C1xx and Pirelli DP-L10, as opposed to proper FreeCalypso development boards.
7 Running our firmware on alien hw in aftermarket configs is NOT the primary
8 direction in FreeCalypso, has never been and never will be - however, such
9 aftermarket configs are supported to a limited extent, and have been so for a
10 long time. The reasons for our continued support of aftermarket configs are as
11 follows:
12
13 1] Even when you do have proper FreeCalypso hardware such as FCDEV3B, physical
14 portability is a concern. Development boards such as FCDEV3B and
15 Caramel/Luna are made to be used on a lab bench, complete with an ESD mat,
16 a multi-board arrangement with ribbon cables and a dedicated power supply.
17 OTOH, a simple old phone of either Mot C1xx or Pirelli DP-L10 kind is an item
18 which you can easily take with you anywhere. Pirelli DP-L10 is ideal for
19 this purpose, thanks to its use of USB for both charging and host computer
20 connection, but even when you have to use Mot C1xx instead (because you don't
21 have a Pirelli phone, or because you need to do some work in the GSM850 band
22 that isn't supported on the Pirelli), it is still far more portable than a
23 "fully proper" development board setup.
24
25 2] Those GSM enthusiasts and tinkerers who come from Osmocom background are
26 typically very familiar with Motorola C1xx phones, and typically already have
27 such hardware. Making it possible to run FreeCalypso firmware on that hw,
28 and making it as easy as possible, opens the door into our FreeCalypso
29 sorority for that target audience.
30
31 However, it is important to point out that the combination of running
32 FreeCalypso fw on alien hw has significant limitations, compared to both
33 standard end user phones and traditional modem development boards, and these
34 limitations need to be covered from both directions.
35
36 Lack of end user phone functionality
37 ====================================
38
39 In its current state as of this writing (mid-2023), our FreeCalypso firmware is
40 NOT capable of functioning as an end user phone! You *cannot* take a Motorola
41 or Pirelli phone, reflash it to FC and expect to continue using it as an end
42 user phone in that state - our firmware just isn't there. We do have a
43 minimally-passing functional configuration that runs as an untethered phone,
44 with a UI layer that draws on the LCD and accepts control via the keypad, but:
45
46 * The smallbw configuration of this handset UI (which is the only config we can
47 run on aftermarket phones) is badly bitrotten and functionally broken compared
48 to the bigcolor config - and the latter requires custom FreeCalypso hw that
49 currently exists only as a very messy multi-board arrangement for lab bench
50 use.
51
52 * Even the better bigcolor config, exercised on our Luna development platform,
53 is still very unpolished, far from an end user product, and smallbw is even
54 worse.
55
56 Of all aftermarket phone targets, the only hw model for which we have any
57 UI-enabled firmware build at all is C139: for that one model we have a
58 buildable, flashable and runable smallbw firmware configuration. (The physical
59 LCD on C139 is color, but because it is only 96x64 pixels, compared to 176x220
60 needed for bigcolor UI config, we run smallbw instead - a UI config derived by
61 slightly extending TI's C-Sample UI design, which was 84x48 pix B&W.)
62
63 Our prebuilt C1xx firmware packages include this smallbw firmware for C139, and
64 you can flash it into your phone using the present fc-am-toolkit. However, that
65 firmware should be treated as a preview of what may some day become possible,
66 NOT as a practically usable solution - you've been warned!
67
68 Aside from the just-described preview of maybe-some-day UI-enabled aftermarket
69 fw for C139, the much more actively supported FreeCalypso aftermarket firmware
70 configuration is voice pseudo-modem, or VPM for short. FreeCalypso VPM firmware
71 configs are available for all 4 aftermarket hw targets: all 3 subfamilies of
72 Motorola C1xx, plus Pirelli DP-L10.
73
74 When you run FC VPM firmware on a phone (on Mot C1xx it needs to be flashed, on
75 Pirelli DP-L10 it runs in RAM without flashing), the phone's display stays dark
76 and its buttons do nothing - there is no hw-model-specific LCD driver code
77 included in the fw, hence we have no ability to display anything, and there is
78 no handset UI layer included in the functional config, hence even though we do
79 have a driver for the keypad, there is no action to be taken on button presses
80 other than to emit debug traces indicating such. Instead the phone turns into
81 a modem-like device that needs to be controlled via AT commands from the
82 connected host computer - hence the name VPM.
83
84 VPM compared to proper TI/FreeCalypso modems
85 ============================================
86
87 On traditional modem development boards going back to near the beginning of TI's
88 GSM chipset program, and on Calypso-based finished modem products such as the
89 embedded GSM modem in Openmoko GTA01/02 smartphones, or Huawei GTM900 or iWOW
90 TR-800, there are two Calypso UARTs brought out, not just one. With traditional
91 TI-family modem firmware, Calypso MODEM UART presents a classic ASCII AT command
92 interface, complete with CSD, GPRS and GSM 07.10 MUX, while the other Calypso
93 UART (called IrDA UART in hw terms, even when no actual IrDA is used) presents
94 TI's debug, development and factory production tools interface called RVTMUX.
95
96 FreeCalypso VPM is different in that on all of our aftermarket Calypso hw
97 targets (Mot C1xx and Pirelli DP-L10), there is only one UART practically
98 accessible. In FreeCalypso we've adopted TI's RVTMUX interface, we make very
99 heavy use of it, so we are not giving it up. Instead our VPM firmware
100 sacrifices the traditional all-ASCII AT command channel. The AT command
101 interface to control the GSM MS is still there, but it is encapsulated inside
102 RVTMUX binary packets, and unless you are going to develop your own custom
103 software speaking this protocol, you need to use FreeCalypso tools rvinterf and
104 fc-shell to talk AT commands to FC VPM firmware.
105
106 Two major areas of GSM MS functionality that are sacrificed in this arrangement
107 are CSD and GPRS. In our TI-inherited firmware architecture these two
108 functional components are optional, i.e., they can be included or excluded in a
109 given firmware build, and we set both of them to disabled in our VPM config.
110
111 If one were to enable CSD and/or GPRS in a VPM fw build (once upon a time we had
112 both enabled, when we were using a binary-only version of the protocol stack,
113 with blobs preventing us from changing config options), the resulting firmware
114 components will be dead weight, with no ability to make use of them. In TI's
115 architecture both CSD and GPRS (outside of high-end feature phone configs with
116 built-in TCP/IP, WAP and MMS) are meant to hook up to the AT command interface
117 on the dedicated MODEM UART, complete with data modes, and that part is lost in
118 our VPM arrangement. Therefore, as soon as we deblobbed our protocol stack and
119 regained the ability to change its configuration, we adopted our current
120 approach of building VPM firmware configs with CSD and GPRS excluded.
121
122 Still useful despite the limitations
123 ====================================
124
125 Despite all of its limitations, FreeCalypso VPM firmware running in aftermarket
126 configurations on Mot C1xx and Pirelli DP-L10 is still useful enough to justify
127 keeping it around, and doing efforts like the present fc-am-toolkit package that
128 aim to make it more accessible to GSM hobbyists, enthusiasts and tinkerers.
129 With FreeCalypso VPM, you can connect to a GSM network as a subscriber using a
130 GSM MS implementation for which you have full source code, as opposed to the
131 usual black box, and you can see everything it does. By watching the debug
132 trace in the rvinterf terminal window or log file, you can observe the MS
133 searching for the network, all of its registration attempts, and then idle mode
134 - you can see how the MS wakes up to listen on PCH, as well as neighbour cell
135 measurements and cell reselection. You can then make test calls and see
136 everything that happens: RACH process, entry into dedicated mode with IMM ASS,
137 subsequent channel assignments or handovers, speech codec selection made by the
138 network etc. Whichever area you are interested in, you can study that part of
139 the source, enable additional traces or make better understanding of the
140 existing ones, and even new functionality can be implemented as needed.