FreeCalypso > hg > freecalypso-sw
annotate rvinterf/README.old @ 680:04d1b20eb7b0
alr_main.c compiles
| author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> | 
|---|---|
| date | Mon, 29 Sep 2014 17:47:47 +0000 | 
| parents | f114f5c547ec | 
| children | 
| rev | line source | 
|---|---|
| 
173
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
1 I (Spacefalcon the Outlaw, FreeCalypso developer) am still learning what kinds | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
2 of traffic may be passed across TI's RVTMUX binary-packet serial interface. We | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
3 already know that much of this traffic is debug trace output, i.e., | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
4 unidirectional and essentially unconditional output from the GSM device. All | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
5 of the "standard" firmwares we have (mokoN, our leo2moko which functions almost | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
6 identically, and Pirelli's fw) produce massive volumes of such trace output in | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
7 normal operation. We already know that this "unsolicited" trace output comes | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
8 in at least 3 different flavors: | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
9 | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
10 * RiViera traces emitted by rvf_send_trace() | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
11 * L1 traces | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
12 * G23 traces | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
13 | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
14 The RVTMUX interface can be used for more than just trace output, though: any | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
15 component in TI's fw suite can send and/or register to receive binary packets. | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
16 As I slowly work my way through various components which comprise TI's Leonardo | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
17 fw whose semi-source we use as our reference version, learning what they do and | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
18 reintegrating them in our own gsm-fw, I will undoubtedly uncover additional uses | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
19 to which the RVTMUX interface is put. | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
20 | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
21 Aside from the trivial provision in the RVT module itself whereby an external | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
22 host can send a command to the target to set a filter masking some of the RV | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
23 trace output, so far the only entity I've come across which accepts packets from | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
24 an external host is ETM (Enhanced Test Mode). ETM implements a registration | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
25 system of its own, whereby other modules can register with ETM to receive | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
26 certain external command messages passing first through RVT, then through ETM. | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
27 | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
28 Because I do not yet have a clear mental picture of *every* function for which | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
29 the RVTMUX interface will ever be used, it is correspondingly impractical to | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
30 decide on a once-and-for-all design of what the host-side software for talking | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
31 to this interface should be like. Therefore, it is currently premature to | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
32 expect any stability in the present rvinterf subdirectory of freecalypso-sw; I | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
33 may implement something one day, then toss it away the next day (without | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
34 providing much in the way of backward compatibility) when I come up with some | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
35 other idea. | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
36 | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
37 The current roadmap for what the rvinterf suite of host tools is envisioned to | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
38 look like eventually is as follows: | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
39 | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
40 rvtdump Opens the serial port, decodes TI's binary packet protocol, and | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
41 simply dumps every received/decoded packet on stdout in a human- | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
42 readable form. No provision for sending anything to the target. | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
43 Intended use: observing the debug trace output which all TI | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
44 firmwares emit as standard "background noise". This utility has | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
45 already been written, and it allows one to observe/log/study the | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
46 "noise" that appears on Pirelli's USB-serial port (running | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
47 Pirelli's original fw), as well as that emitted on the IrDA | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
48 (headset jack) port on the GTA02 by mokoN/leo2moko firmwares. | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
49 | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
50 rvinterf My plan is to make a copy of rvtdump, called rvinterf, and have | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
51 it act very much like rvtdump: receive TI's packets from the | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
52 serial port, decode them and print the decoded form on stdout. | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
53 However, rvinterf will also create a listening UNIX domain | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
54 socket to which other programs in the present suite will | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
55 connect. These other programs connecting through rvinterf will | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
56 be able to send packets to the target, as well as register to | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
57 receive certain kinds of target->host message packets. | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
58 | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
59 fc-tmsh FreeCalypso Test Mode Shell is my vision for the utility which | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
60 will provide a practically usable interface to ETM. ETM's | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
61 general mode of operation seems to be (weasel phrase inserted | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
62 because many other fw components may connect through ETM, and I | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
63 have yet to study all of them) command-response: an external | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
64 host sends a command to ETM, that command gets dispatched to the | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
65 proper registered handler, the command function is executed, a | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
66 response packet is composed, and finally that response is sent | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
67 back to the host. But because all code on the target side is | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
68 under active development and debugging, we should not expect | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
69 perfect lock-step behaviour on the interface; instead, our | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
70 fc-tmsh should be fundamentally asynchronous: when the user | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
71 enters a command, the appropriate command packet is sent to the | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
72 target, but we are prepared for target->host messages at any | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
73 time, without enforcing strict correspondence to issued | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
74 commands: let the developer-operator sort that out instead. | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
75 | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
76 The usage scenario I envision is that one will need to run rvinterf first | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
77 (either directly or through fc-xram) in one terminal window, leave it running, | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
78 then run fc-tmsh in another terminal window, and have it connect to rvinterf | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
79 via the local UNIX domain socket interface. Why such complexity, why not have | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
80 one program do everything? I suspect that in many debug/experimentation | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
81 sessions it will be necessary to use fc-tmsh on "noisy" targets, i.e., in | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
82 scenarios where the target is continuously spewing its "normal" voluminous debug | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
83 trace output, such that the "interesting" output as in responses to commands | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
84 gets drowned in the noise. In such a scenario it would be helpful to have one | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
85 terminal window in which one sees the transcript of the fc-tmsh session, | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
86 consisting of issued commands and received ETM responses without the general | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
87 noise, and another window in which one sees all RVTMUX interface activity in | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
88 real time - the latter would allow one to observe commands having side effects | 
| 
 
f42854da4563
rvinterf: beginning of refactoring
 
Michael Spacefalcon <msokolov@ivan.Harhan.ORG> 
parents:  
diff
changeset
 | 
89 outside of ETM, such as crashing the whole fw. :-) | 
