Project

General

Profile

TRX Interface » History » Version 1

fixeria, 11/19/2017 01:30 PM
hey

1 1 fixeria
h1. TRX Interface
2
3
There is a custom protocol, which was first introduced in OpenBTS (https://github.com/RangeNetworks/openbts/blob/master/TRXManager/README.TRXManager) project to exchange control messages, clock indications and GSM bursts between BTS and transceiver. The protocol has no any concrete name, but you might often see something like "TRX Interface". [[OsmoTRX:OsmoTRX]], being an Osmocom fork of OpenBTS transceiver, also do use this way of communication with [[OsmoBTS:OsmoBTS]].
4
5
In general, this protocol defines three interfaces which are basicly UDP sockets:
6
7
* CLCK (Clock Interface) is used to deliver clock indications from actual RF hardware to the upper layers (e.g. [[OsmoBTS:OsmoBTS]]).
8
9
* CTRL (Control Interface) is used by upper layers to configure transceiver, for example to set RX / TX frequencies, gain values and so on. The control communication here is based on ASCII commands followed by corresponding responses, just like in HTTP. Each command message starts with "CMD", while each response message starts with "RSP" and has a status code.
10
11
* DATA (Data Interface) is a bidirectional interface, which carries received bursts from transceiver and to be transmitted bursts to transceiver. Each burst is being accompanied by a small header with some GSM info, such as frame and timeslot number.
12
13
14
h1. The trxcon application
15
16
OsmocomBB was also extended to support the protocol described above in order to make the higher level applications (e.g. mobile) able to 'speak' not only with Calypso based phones, but also with different kind of transceivers, such as FakeTRX and GRGSM TRX. The first one allows you to connect the L2&3 applications directly to [[OsmoBTS:OsmoBTS]] without actual RF hardware. The second is a GNU Radio based transceiver for SDR. See the corresponding wiki pages for more details.
17
18
The original way of communication between a L2&3 application and Calypso based phone was HDLC over a serial link. This link is implemented in the 'osmocon' application, which is responsible for the firmware loading process and message forwarding between the both sides. For TRX Interface, there is another application called 'trxcon'. Just like osmocon, one provides a UNIX-socket ('/tmp/osmocom_l2' by default) to the higher level applications. At the same time, there is a lot of differences from osmocon, which make the application more complex.
19
20
[TODO: the application stricture picture here]
21
22
The application is designed like a bridge. One side is the L1CTL interface, which is used to communicate with the L2&3 applications. Another is TRX interface for 'speaking' with a transceiver. But the heart of trxcon application is GSM TDMA scheduler, which was ported from [[OsmoBTS:OsmoBTS]]. In a few words, the are two main tasks performed by scheduler. First task is to collect bursts coming from transceiver, perform GSM 05.03 decoding and forward GSM L3 payloads to the higher layers. The second one is to encode the GSM L3 messages coming from the upper layers into bursts and send them to transceiver. Of course, scheduler is also keeping itself more or less synchronized with the current BTS clock.
23
24
h2. Source code
25
26
For now, the trxcon application is a part of 'fixeria/trx' branch. Public read-only access is available via:
27
28
<pre>
29
$ git clone git://git.osmocom.org/osmocom-bb -b fixeria/trx
30
</pre>
31
32
You can browse it via cgit: http://cgit.osmocom.org/osmocom-bb/log/?h=fixeria/trx
33
The source code can be found in 'src/host/trxcon/'.
34
35
h2. Dependencies
36
37
The only dependency of this application is [[libosmocore:libosmocore]]. Make sure you have the latest version and update it if required.
38
39
h2. Configuration and Build
40
41
There are two ways of building the application. The simplest way is:
42
43
<pre>
44
$ cd osmocom-bb/src/
45
$ make nofirmware
46
</pre>
47
48
This command will build all host applications including trxcon, but without the firmware.
49
If you wish to build only trxcon application, use:
50
51
<pre>
52
$ cd osmocom-bb/src/
53
$ make trxcon
54
</pre>
55
56
Finally, it's possible to configure and build everything manually:
57
58
<pre>
59
$ cd osmocom-bb/src/host/trxcon/
60
$ autoreconf -i
61
$ ./configure
62
$ make
63
</pre>
64
65
h2. Running
66
67
First, start the transceiver you're going to work with. See corresponding documentation for more details. Pay your attention to the host and base port used by transceiver.
68
69
Run trxcon without any arguments:
70
71
<pre>
72
$ cd osmocom-bb/src/host/trxcon/
73
$ ./trxcon
74
</pre>
75
76
You should see something like that:
77
78
<pre>
79
Copyright (C) 2016-2017 by Vadim Yanitskiy <axilirator@gmail.com>
80
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
81
This is free software: you are free to change and redistribute it.
82
There is NO WARRANTY, to the extent permitted by law.
83
84
<0001> l1ctl_link.c:235 Init L1CTL link (/tmp/osmocom_l2)
85
<0003> trx_if.c:633 Init transceiver interface
86
<0005> sched_trx.c:113 Init scheduler
87
<0000> trxcon.c:270 Init complete
88
</pre>
89
90
Then start required L2&3 application (e.g. mobile), and enjoy!
91
92
h2. Related pages (TODO)
93
94
* Software Defined Radio (SDR) PHY
95
* FakeTRX (Virtual Um-interface)
96
97
h2. Project status
98
99
Supported:
100
101
* SCH frame synchronization
102
* GSM 05.03 encoding / decoding
103
* Combined and non-combined CCCH
104
* Power measurement
105
* SMS and USSD
106
107
Working in progress:
108
109
* TCH Full Rate channel support
110
* TCH Half Rate channel support
111
* Adaptive Multi-Rate (AMR)
112
113
Future plans:
114
115
* Frequency Hopping
116
* Multiple MS support
117
* GPRS / EDGE support
118
* CSD support
Add picture from clipboard (Maximum size: 48.8 MB)