Project

General

Profile

OsmoTRX » History » Version 79

fixeria, 10/22/2019 08:49 AM

1 1 ttsou
h1. [[OsmoTRX]]
2 41 sylvain
3 79 fixeria
{{>toc}}
4 1 ttsou
5 41 sylvain
[[OsmoTRX]] is a software-defined radio transceiver that implements the Layer 1 physical layer of a BTS comprising the following 3GPP specifications:
6
* TS 05.01 "Physical layer on the radio path"
7
* TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
8
* TS 05.04 "Modulation"
9
* TS 05.10 "Radio subsystem synchronization"
10 1 ttsou
11 49 neels
[[OsmoTRX]] is based on the transceiver code from the [[OsmoBTS:OpenBTS]] project, but setup to operate independently with the purpose of using with non-OpenBTS software and projects, while still maintaining backwards compatibility with [[OsmoBTS:OpenBTS]]. Currently there are numerous features contained in [[OsmoTRX:]] that extend the functionality of the [[OsmoBTS:OpenBTS]] transceiver. These features include enhanced support for various embedded platforms - notably ARM - and dual channel diversity support for the Fairwaves [[umtrx:]].
12 41 sylvain
13 73 pespin
h2. OsmoTRX user manuals and documentation
14
15
User Manual can be found "here":http://ftp.osmocom.org/docs/latest/osmotrx-usermanual.pdf.
16
VTY Reference can be found "here":http://ftp.osmocom.org/docs/latest/osmotrx-vty-reference.pdf.
17
18 65 laforge
h2. OsmoTRX in the Osmocom GSM architecture (old OsmoNITB case)
19 46 laforge
20
{{graphviz_link()
21
digraph G {
22
    rankdir = LR;
23
    SDR -> OsmoTRX [label="Raw Samples"];
24
    OsmoTRX -> OsmoBTS [label="bursts over UDP"];
25 1 ttsou
    OsmoBTS -> OsmoNITB [label="Abis/IP"];
26 65 laforge
    OsmoBTS -> OsmoPCU [label="pcu_sock"];
27
    OsmoPCU -> OsmoSGSN [label="Gb/IP"];
28
    OsmoTRX [color=red];
29
}
30
}}
31
32
h2. OsmoTRX in the Osmocom GSM architecture (new OsmoBSC+OsmoMSC case)
33
34
{{graphviz_link()
35
digraph G {
36
    rankdir = LR;
37
    SDR -> OsmoTRX [label="Raw Samples"];
38
    OsmoTRX -> OsmoBTS [label="bursts over UDP"];
39
    OsmoBTS -> OsmoBSC [label="Abis/IP"];
40
    OsmoBSC -> OsmoMSC [label="AoIP"];
41 46 laforge
    OsmoBTS -> OsmoPCU [label="pcu_sock"];
42
    OsmoPCU -> OsmoSGSN [label="Gb/IP"];
43
    OsmoTRX [color=red];
44
}
45
}}
46 41 sylvain
47 62 laforge
h2. RF Hardware support
48 41 sylvain
49 1 ttsou
50 74 pespin
Multiple RF devices are currently supported. These include USRP family products from Ettus Research, and the [[UmTRX:]] from Fairwaves, as well as LimeSDR devices from "Lime Microsystems":https://limemicro.com/ using "LimeSuite":https://github.com/myriadrf/LimeSuite.
51 62 laforge
52
more details (e.g. signal levels) are provided in the hardware specific pages:
53
{{child_pages(HardwareSupport)}}
54
55
h2. Embedded Platform Support
56
57
[[OsmoTRX]] has been tested on the multiple embedded platforms representing a wide range of device types. Low cost ARM devices are generally limited by memory and I/O as much CPU utilization.
58
59
Running a full or near full ARFCN configuration (7 simultaneous TCH channels with Combination V) may require running the GSM stack remotely, which can be configured at runtime on the command line. This limitation appears to be scheduling related more so than lack of CPU resources, and may be resolved at a later time.
60
61
|_.Platform|_.SoC*|_.Processor|_.SIMD/FPU|_.Testing Notes|
62
|ArndaleBoard|Samsung Exynos 5250|ARM Cortex-A15|NEON-VFPv4|7 TCH|
63
|BeagleBoard-xM|Texas Instruments OMAP3|ARM Cortex-A8|NEON|7 TCH, remote [[osmobts:]] stack|
64
|Ettus E100|Texas Instruments OMAP3|ARM Cortex-A8|NEON|7 TCH, remote [[osmobts:]] stack|
65
|Raspberry Pi|Broadcom BCM2835|ARM11|VFP|2 TCH, remote [[osmobts:]] stack|
66
|Shuttle PC|NA|Intel Atom D2550|SSE3|Dual channel, 15 TCH|
67
68
All embedded plaforms were tested with low-phase error modulator disabled. Use of the more accurate modulator on embedded platforms has not been extensively tested.
69
70
71
h2. Features
72
73 41 sylvain
*Intel SSE Support*
74 6 ttsou
* SSE3
75
* SSE4.1
76 20 ttsou
77 41 sylvain
On Intel processors, [[OsmoTRX]] makes heavy use of the Streaming SIMD Extensions (SSE) instruction set. Accelerated operations include pulse shape filtering, resampling, sequence correlation, and many other signal processing operations. SSE3 is the minimum requirement for accelerated use.
78 1 ttsou
79 20 ttsou
SSE3 is present in the majority of Intel processors since later versions of the Pentium 4 architecture and is also present on low power Atom processors. Support is automatically detected at build time. For additional performance information, please see the performance and benchmarks section.
80 29 ttsou
81 41 sylvain
*ARM Support*
82 1 ttsou
* NEON
83
* NEON-VFPv4
84 20 ttsou
85 41 sylvain
[[OsmoTRX]] runs on a variety of ARM processors with and without NEON coprocessors. Like SSE on Intel processors, NEON provides acceleration with SIMD vectorized instructions.
86 20 ttsou
87 1 ttsou
Tested popular architectures include ARM11 (Raspberry Pi), Cortex-A8 (!BeagleBoard), and Cortex-A15 (!ArndaleBoard). Loosely speaking, these platforms are representative of low cost embedded devices, mid-level handsets, and high-end smartphones respectively. Similarly, in order, these platforms include no NEON coprocessor, standard NEON, and NEON-VFPv4. The latter NEON variation, VFPv4, provides additional fused-multiply-accumulate (FMA) instructions useful for many DSP operations.
88
89 26 ttsou
NEON support must be enabled by the user at build time. For additional information, please see the configuration and performance and benchmarks sections.
90 37 ttsou
91 41 sylvain
*Dual Channel (UmTRX and B210)*
92 7 ttsou
93 1 ttsou
Two dual channel modes are available: standard dual channel mode and diversity. In standard dual channel mode, each RF
94 28 ttsou
path of the dual channel device supports a different ARFCN. Each path operates independently a
95 1 ttsou
nd operates similarly to two separate devices. GSM channel capacity in this mode is doubled. This option can be configured at run time from the command line.
96
97 41 sylvain
*Dual Channel Diversity (UmTRX, experimental)*
98 1 ttsou
99 28 ttsou
Diversity mode is similar to the standard dual channel mode except each antenna supports both ARFCN channels. In this case, the receiver sample bandwidth is widened to handle both ARFCN's and subsequently converted and demultiplexed into separate sample streams. Each GSM receive path is fed dual signals, where antenna selection diversity is performed by taking the stronger signal on a burst-by-burst basis. This diversity setup improves uplink reception performance in multipath fading environments.
100 16 ttsou
101 28 ttsou
Limitations are increased CPU utilization and that ARFCN spacing is restricted (currently at 400 kHz) by the receiver sampling bandwidth. Setting the ARFCN spacing beyond the sampling limit will disable the diversity path and operate in standard dual channel mode. This options can be configured at run time from the command line.
102 58 ipse
103 1 ttsou
*Uplink Burst Detection*
104 41 sylvain
105 1 ttsou
[[OsmoTRX]] utilizes an updated receive burst detection algorithm that provides greater sensitivity and reliability than the original [[OsmoBTS:OpenBTS]] approach, which relied on energy detection for the initial stage of burst acquisition.
106
107 50 neels
The limitation of the previous approach was that it was slow to adapt to highly transient power levels and false burst detection in challenging situations such as receiver saturation, which may occur in close range lab testing. The other issue was that a high degree of level tuning was often necessary to operate reliably.
108 41 sylvain
109 1 ttsou
The current receiver code addressed those limitations for improved performance in a wider variety of environments.
110 60 laforge
111 59 roh
*Low Phase Error Modulator*
112 41 sylvain
113 1 ttsou
The default GSM downlink signal is configured for low distortion using a linearized GMSK modulator. The implementation is based on a two pulse Laurent approximation of continuous phase modulated (CPM) signals. The baseband output signal measures with very low phase error and is capable of passing industry spectrum mask requirements. Please note that actual performance will depend strongly on the particular device in use.
114 41 sylvain
115
Theoretical details can be found in the report on "GMSK":http://tsou.cc/gsm/report_gmsk.pdf. Octave / Matlab code for "pulse generation":http://tsou.cc/gsm/laurent.m is also available.
116
117 1 ttsou
This option can be enabled or disabled at run time from the command line.
118
119 43 laforge
Very Low Phase Error (Ettus Research N200)
120
121
!osmo-trx-phase.gif!
122
123
Spectrum Mask (Ettus Research N200)
124
125 1 ttsou
!osmo-trx-spectrum.gif!
126
127 41 sylvain
h2. Mailing List
128 22 ttsou
129 1 ttsou
130 66 laforge
For development purposes, [[OsmoTRX:]] is discussed on the [[OpenBSC:]] mailing list at openbsc@lists.osmocom.org.
131 41 sylvain
132 66 laforge
Subscription information is available at http://lists.osmocom.org/mailman/listinfo/openbsc/.  Please make sure to read our [[cellular-infrastructure:MailingListRules]] before posting.
133 1 ttsou
134 41 sylvain
h2. GPRS support
135 1 ttsou
136 64 laforge
* [[OsmoTRX]] supports the GPRS (and EGPRS/EDGE) features of [[osmoPCU:]] and [[osmoBTS:]] as well as the remaining Osmocom stack, such as [[OsmoSGSN:]] and [[OpenGGSN:OsmoGGSN]]
137 61 laforge
* [[OsmoTRX]] does not support GPRS in combination with [[OsmoBTS:OpenBTS]].  For that, please use the transceiver supplied with [[OsmoBTS:OpenBTS]].
138 41 sylvain
139
h2. Source code
140
141
142 1 ttsou
The source code is available from git.osmocom.org (module osmo-trx).
143 18 ttsou
144
Public read-only access is available via
145 41 sylvain
<pre>
146 19 ttsou
$ git clone git://git.osmocom.org/osmo-trx
147 41 sylvain
</pre>
148 78 Hoernchen
You can browse it via cgit: http://cgit.osmocom.org/osmo-trx/
149 1 ttsou
150 48 neels
h2. Dependencies
151 1 ttsou
152 48 neels
Install libusb-1.0 and libbost dev packages. On debian 8.4:
153 1 ttsou
154 48 neels
<pre>
155
sudo apt-get install --no-install-recommends libusb-1.0-0-dev libboost-dev
156
</pre>
157 41 sylvain
158 53 neels
h3. UHD
159 1 ttsou
160 48 neels
Unless using USRP1, you will need the Universal Hardware Driver (UHD),
161
which is available from Ettus Research or Fairwaves; the UHD implementation
162
must match your hardware:
163
164
* Ettus Research UHD for USRP devices
165 51 neels
* Fairwaves UHD with [[UmTRX:]]
166 48 neels
* USRP1 does not use the UHD driver, it is supported through the legacy libusrp driver provided in GNU Radio 3.4.2.
167
168 55 wirelesss
h3. UHD for Debian
169 48 neels
170 52 neels
When you are reading this, Debian packages for UHD may be sufficient for running osmo-trx and osmo-bts-trx.
171 48 neels
here are some of the packages that need to be installed:
172
173
<pre>
174 54 neels
sudo apt-get install libuhd-dev uhd-host
175 48 neels
</pre>
176 1 ttsou
177 55 wirelesss
*Troubleshooting:*
178
 
179 52 neels
At the time of writing this (2016-12), for Debian 8 aka jessie you need to use the jessie-backports packages:
180
181
<pre>
182
sudo -s
183
echo "deb http://ftp.de.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/uhd.list
184
apt-get update
185
apt-get -t jessie-backports install libuhd-dev uhd-host
186
</pre>
187
188
It may also be possible to use the pothos PPA instead:
189 48 neels
190
<pre>
191
sudo add-apt-repository ppa:guruofquality/pothos
192
sudo apt-get update
193
sudo apt install libboost-dev uhd
194
</pre>
195
196 53 neels
h3. Firmware
197 48 neels
198
You also need to download the firmware using a script provided by the UHD package.
199
Instructions suggest running the script as root, but this way is less dangerous:
200
201
<pre>
202
sudo mkdir /usr/share/uhd
203
sudo chown $USER: /usr/share/uhd
204
/usr/lib/uhd/utils/uhd_images_downloader.py
205
</pre>
206
207 63 pespin
You can flash the FPGA data you just downloaded with the following command, setting type and other parameters accordingly to your hw. For instance for an Ettus B200:
208
<pre>
209
uhd_image_loader --args="type=b200"
210
</pre>
211
212
The uhd_image_loader claims it can update the firmware too, but at least on some versions it does nothing when asked to update firmware. If you see no output of firwmare being flashed, you can use this other command line to flash the firmware, adapting it to the firmware file of your HW:
213
<pre>
214
/usr/lib/uhd/utils/b2xx_fx3_utils --load-fw /usr/share/uhd/images/usrp_b200_fw.hex
215
</pre>
216
217 53 neels
h3. Group
218 48 neels
219
You may need to add yourself to the usrp group:
220
221
<pre>
222
sudo gpasswd -a $USER usrp
223
# and re-login to acquire the group
224
</pre>
225
226 53 neels
h3. Verify
227 48 neels
228
run uhd_find_devices to make sure b200 is available:
229
230
<pre>
231
$ uhd_find_devices 
232
linux; GNU C++ version 4.9.1; Boost_105500; UHD_003.007.003-0-unknown
233
234
--------------------------------------------------
235
-- UHD Device 0
236
--------------------------------------------------
237
Device Address:
238
    type: b200
239
    name: MyB210
240
    serial: 1C0FFEE
241
    product: B210
242
</pre>
243
244
h2. Configuration and Build
245
246 41 sylvain
First, run autoreconf to remake the build system files.
247 1 ttsou
<pre>
248 18 ttsou
$ autoreconf -i
249 41 sylvain
...
250 18 ttsou
</pre>
251 41 sylvain
252 18 ttsou
*Intel Platforms (All)*
253 1 ttsou
254 41 sylvain
Intel SSE support is automatically detected on Intel x86 platforms. No user intervention is necessary. The general configuration defaults to the low phase error modulator. Atom users may wish to use the low-CPU utilization modulator, which can be later enabled from the command line at runtime.
255 18 ttsou
<pre>
256 1 ttsou
$ ./configure
257
...
258 19 ttsou
checking whether mmx is supported... yes
259 18 ttsou
checking whether sse is supported... yes
260
checking whether sse2 is supported... yes
261
checking whether sse3 is supported... yes
262
checking whether ssse3 is supported... yes
263
checking whether sse4.1 is supported... yes
264
checking whether sse4.2 is supported... yes
265 41 sylvain
...
266 18 ttsou
</pre>
267 41 sylvain
268 18 ttsou
*ARM Platforms with NEON*
269 41 sylvain
270
Many popular ARM development boards fall under this category including BeagleBoard, PandaBoard, and Ettus E100 USRP. This option will disable the low phase error modulator, which can be re-enabled at runtime. NEON support must be manually enabled.
271 24 ttsou
<pre>
272 41 sylvain
$ ./configure --with-neon
273 1 ttsou
</pre>
274 41 sylvain
275 1 ttsou
*ARM Platforms with NEON-VFPv4*
276 41 sylvain
277
Currently very few development platforms support this instruction set, which is seen mainly in high end smartphones and tablets. Available development boards are ArndaleBoard and ODROID-XU. This option will disable the low phase error modulator, which can be re-enabled at runtime. NEON-VFPv4 support must be manually enabled.
278 1 ttsou
<pre>
279 41 sylvain
$ ./configure --with-neon-vfpv4
280 1 ttsou
</pre>
281 41 sylvain
282 1 ttsou
*ARM Platforms without NEON*
283 41 sylvain
284 1 ttsou
This configuration mainly targets the Raspberry Pi. ARM platforms without NEON vector units are almost always very slow processors, and generally not very suitable for running [[OsmoTRX]]. Running [[OsmoTRX]] on a Raspberry Pi, however, is possible along with limited TCH (voice) channel support. Currently this configuration requires minor code changes.
285
286
Coming soon...
287 41 sylvain
288 75 pespin
*Choosing your target device*
289
290
Different SDR boards are managed using different software or libraries, usually provided by the vendor. As a result, different @osmo-trx@ binaries can be built based on which device one targets. For instance, if support for LimeSDR is required, one must use the @osmo-trx-lms@ binary, whereas if a UHD device is targeted, @osmo-trx-uhd must be used, and so on. Build of different @osmo-trx@ binaries is controlled at configure time:
291
<pre>
292
      --with-uhd              enable UHD based transceiver
293
      --with-usrp1            enable USRP1 gnuradio based transceiver
294
      --with-lms              enable LimeSuite based transceiver
295
</pre>
296
297 1 ttsou
*Build and Install*
298 16 ttsou
299
After configuration, installation is simple.
300 41 sylvain
301 16 ttsou
<pre>
302
$ make
303 41 sylvain
$ sudo make install
304 16 ttsou
</pre>
305
306 41 sylvain
h2. Running
307 16 ttsou
308 76 pespin
Normally simply start @osmo-trx-uhd@ or similar, based on your target device. You only need to remember to pass a suitable config file.
309
[[OsmoTRX]] can be configured with a variety of options. You can find examples for several different devices under @doc/examples@ of @osmo-trx.git@ directory.
310
See section [[OsmoTRX#OsmoTRX-user-manuals-and-documentation|"OsmoTRX user manuals and documentation"]] where you can find links to the VTY reference.
311 41 sylvain
312 56 wirelesss
<pre>
313 71 duo_kali
$ osmo-trx-uhd -C default.cfg
314 56 wirelesss
linux; GNU C++ version 5.3.1 20151219; Boost_105800; UHD_003.009.002-0-unknown
315
316
opening configuration table from path :memory:
317
Config Settings
318
   Log Level............... NOTICE
319
   Device args............. 
320
   TRX Base Port........... 5700
321
   TRX Address............. 127.0.0.1
322
   Channels................ 1
323
   Tx Samples-per-Symbol... 4
324
   Rx Samples-per-Symbol... 1
325
   EDGE support............ Disabled
326
   Reference............... Internal
327
   C0 Filler Table......... Disabled
328
   Multi-Carrier........... Disabled
329
   Diversity............... Disabled
330
   Tuning offset........... 0
331
   RSSI to dBm offset...... 0
332
   Swap channels........... 0
333
334
-- Detected Device: B200
335
-- Loading FPGA image: /usr/share/uhd/images/usrp_b200_fpga.bin... done
336
-- Operating over USB 2.
337
-- Detecting internal GPSDO.... No GPSDO found
338
-- Initialize CODEC control...
339
-- Initialize Radio control...
340
-- Performing register loopback test... pass
341
-- Performing CODEC loopback test... pass
342
-- Asking for clock rate 16.000000 MHz... 
343
-- Actually got clock rate 16.000000 MHz.
344
-- Performing timer loopback test... pass
345
-- Setting master clock rate selection to 'automatic'.
346
-- Asking for clock rate 26.000000 MHz... 
347
-- Actually got clock rate 26.000000 MHz.
348
-- Performing timer loopback test... pass
349 16 ttsou
-- Setting B200 4/1 Tx/Rx SPS
350
-- Transceiver active with 1 channel(s)
351 41 sylvain
</pre>
352 38 ttsou
353 77 pespin
Remember OsmoTRX binaries provide a VTY interface like other osmocom programs, where you can for instance set up logging as desired. VTY is available by default under @localhost@ port @4237@.
354
355 1 ttsou
h2. [[OsmoTRX]] with [[OsmoBTS:OpenBTS]]
356 49 neels
357 38 ttsou
358
[[OsmoTRX]] is fully compatible with [[OsmoBTS:OpenBTS]] for voice and SMS services. Due to differences in handing of GPRS, [[OsmoTRX]] does not support GPRS when used with [[OsmoBTS:OpenBTS]], however, GPRS with the Osmocom stack is supported.
359 41 sylvain
360 49 neels
For use with [[OsmoBTS:OpenBTS]], enable the filler table option "Enable C0 filler table", which enables [[OsmoBTS:OpenBTS]] style idle bursts and retransmissions.
361 41 sylvain
362
<pre>
363 71 duo_kali
$ osmo-trx-uhd -C default.cfg -f
364 41 sylvain
</pre>
365 17 ttsou
366 49 neels
The [[OsmoTRX]] transceiver should be started before running [[OsmoBTS:OpenBTS]]. No symbolic link to './transceiver' should exist in the [[OsmoBTS:OpenBTS]] directory. This prevents [[OsmoBTS:OpenBTS]] from starting its own transceiver instance.
367 35 ttsou
368 1 ttsou
h2. Authors
369 41 sylvain
370 1 ttsou
371 57 ttsou
[[OsmoTRX]] is currently maintained by Tom Tsou and Alexander Chemeris among others. The code is derived from the [[OsmoBTS:OpenBTS]] project, which was originally developed by David Burgess and Harvind Samra at Range Networks.
Add picture from clipboard (Maximum size: 48.8 MB)