Project

General

Profile

TRX Interface » History » Version 16

laforge, 07/25/2022 07:46 AM
gitea

1 1 fixeria
h1. TRX Interface
2
3 15 fixeria
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 does use this way of communication with [[OsmoBTS:OsmoBTS]].
4 1 fixeria
5 15 fixeria
The protocol defines three interfaces which are basically three separate UDP connections:
6 1 fixeria
7 15 fixeria
* CLCK (Clock Interface, TRXC) is used to deliver clock indications from the RF hardware (usually SDR) to the upper layers (e.g. [[OsmoBTS:OsmoBTS]]).
8 1 fixeria
9 15 fixeria
* CTRL (Control Interface, TRXC) is used by the 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 starts with "CMD", while each response starts with "RSP" and has a status code.
10 1 fixeria
11 15 fixeria
* DATA (Data Interface, TRXD) 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 TDMA frame and timeslot number.
12 1 fixeria
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 12 fixeria
The trxcon application is a part of 'master' branch now. Public read-only access is available via:
27 1 fixeria
28
<pre>
29 16 laforge
$ git clone https://gitea.osmocom.org/phone-side/osmocom-bb
30 1 fixeria
</pre>
31
32 16 laforge
You can browse it via https://gitea.osmocom.org/phone-side/osmocom-bb
33 1 fixeria
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
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
80
This is free software: you are free to change and redistribute it.
81
There is NO WARRANTY, to the extent permitted by law.
82
83
<0001> l1ctl_link.c:235 Init L1CTL link (/tmp/osmocom_l2)
84
<0003> trx_if.c:633 Init transceiver interface
85
<0005> sched_trx.c:113 Init scheduler
86
<0000> trxcon.c:270 Init complete
87
</pre>
88
89 11 pespin
Then start required L2&3 application (e.g. [[mobile]]), and enjoy!
90 1 fixeria
91 3 fixeria
h2. Related pages
92 1 fixeria
93 3 fixeria
{{child_pages(TRX_Interface)}}
94 1 fixeria
95
h2. Project status
96
97
Supported:
98
99
* SCH frame synchronization
100
* GSM 05.03 encoding / decoding
101
* Combined and non-combined CCCH
102 14 fixeria
* TCH Half Rate channel support
103 7 fixeria
* TCH Full Rate channel
104 14 fixeria
* Frequency Hopping
105 1 fixeria
* Power measurement
106 7 fixeria
* A5/X ciphering
107 1 fixeria
* SMS and USSD
108
109
Working in progress:
110 2 fixeria
111 13 fixeria
* Adaptive Multi-Rate (AMR)
112 14 fixeria
* Multiple MS support
113 1 fixeria
114
Future plans:
115
116 14 fixeria
* GPRS / EDGE support
117 4 fixeria
* CSD support
Add picture from clipboard (Maximum size: 48.8 MB)