Project

General

Profile

OsmoTRX » History » Version 72

duo_kali, 06/20/2018 04:35 AM

1 41 sylvain
{{>toc}}
2 1 ttsou
3 41 sylvain
h1. [[OsmoTRX]]
4 1 ttsou
5
6 41 sylvain
[[OsmoTRX]] is a software-defined radio transceiver that implements the Layer 1 physical layer of a BTS comprising the following 3GPP specifications:
7
* TS 05.01 "Physical layer on the radio path"
8
* TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
9
* TS 05.04 "Modulation"
10
* TS 05.10 "Radio subsystem synchronization"
11 1 ttsou
12 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:]].
13 41 sylvain
14 65 laforge
h2. OsmoTRX in the Osmocom GSM architecture (old OsmoNITB case)
15 46 laforge
16
{{graphviz_link()
17
digraph G {
18
    rankdir = LR;
19
    SDR -> OsmoTRX [label="Raw Samples"];
20
    OsmoTRX -> OsmoBTS [label="bursts over UDP"];
21 1 ttsou
    OsmoBTS -> OsmoNITB [label="Abis/IP"];
22 65 laforge
    OsmoBTS -> OsmoPCU [label="pcu_sock"];
23
    OsmoPCU -> OsmoSGSN [label="Gb/IP"];
24
    OsmoTRX [color=red];
25
}
26
}}
27
28
h2. OsmoTRX in the Osmocom GSM architecture (new OsmoBSC+OsmoMSC case)
29
30
{{graphviz_link()
31
digraph G {
32
    rankdir = LR;
33
    SDR -> OsmoTRX [label="Raw Samples"];
34
    OsmoTRX -> OsmoBTS [label="bursts over UDP"];
35
    OsmoBTS -> OsmoBSC [label="Abis/IP"];
36
    OsmoBSC -> OsmoMSC [label="AoIP"];
37 46 laforge
    OsmoBTS -> OsmoPCU [label="pcu_sock"];
38
    OsmoPCU -> OsmoSGSN [label="Gb/IP"];
39
    OsmoTRX [color=red];
40
}
41
}}
42 41 sylvain
43 62 laforge
h2. RF Hardware support
44 41 sylvain
45 1 ttsou
46 62 laforge
Multiple RF devices are currently supported. These include USRP family products from Ettus Research, and the [[UmTRX:]] from Fairwaves.
47
48
more details (e.g. signal levels) are provided in the hardware specific pages:
49
{{child_pages(HardwareSupport)}}
50
51
52
h2. Embedded Platform Support
53
54
[[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.
55
56
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.
57
58
|_.Platform|_.SoC*|_.Processor|_.SIMD/FPU|_.Testing Notes|
59
|ArndaleBoard|Samsung Exynos 5250|ARM Cortex-A15|NEON-VFPv4|7 TCH|
60
|BeagleBoard-xM|Texas Instruments OMAP3|ARM Cortex-A8|NEON|7 TCH, remote [[osmobts:]] stack|
61
|Ettus E100|Texas Instruments OMAP3|ARM Cortex-A8|NEON|7 TCH, remote [[osmobts:]] stack|
62
|Raspberry Pi|Broadcom BCM2835|ARM11|VFP|2 TCH, remote [[osmobts:]] stack|
63
|Shuttle PC|NA|Intel Atom D2550|SSE3|Dual channel, 15 TCH|
64
65
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.
66
67
68
h2. Features
69
70 41 sylvain
*Intel SSE Support*
71 6 ttsou
* SSE3
72
* SSE4.1
73 20 ttsou
74 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.
75 1 ttsou
76 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.
77 29 ttsou
78 41 sylvain
*ARM Support*
79 1 ttsou
* NEON
80
* NEON-VFPv4
81 20 ttsou
82 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.
83 20 ttsou
84 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.
85
86 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.
87 37 ttsou
88 41 sylvain
*Dual Channel (UmTRX and B210)*
89 7 ttsou
90 1 ttsou
Two dual channel modes are available: standard dual channel mode and diversity. In standard dual channel mode, each RF
91 28 ttsou
path of the dual channel device supports a different ARFCN. Each path operates independently a
92 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.
93
94 41 sylvain
*Dual Channel Diversity (UmTRX, experimental)*
95 1 ttsou
96 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.
97 16 ttsou
98 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.
99 58 ipse
100 1 ttsou
*Uplink Burst Detection*
101 41 sylvain
102 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.
103
104 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.
105 41 sylvain
106 1 ttsou
The current receiver code addressed those limitations for improved performance in a wider variety of environments.
107 60 laforge
108 59 roh
*Low Phase Error Modulator*
109 41 sylvain
110 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.
111 41 sylvain
112
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.
113
114 1 ttsou
This option can be enabled or disabled at run time from the command line.
115
116 43 laforge
Very Low Phase Error (Ettus Research N200)
117
118
!osmo-trx-phase.gif!
119
120
Spectrum Mask (Ettus Research N200)
121
122 1 ttsou
!osmo-trx-spectrum.gif!
123
124 41 sylvain
h2. Mailing List
125 22 ttsou
126 1 ttsou
127 66 laforge
For development purposes, [[OsmoTRX:]] is discussed on the [[OpenBSC:]] mailing list at openbsc@lists.osmocom.org.
128 41 sylvain
129 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.
130 1 ttsou
131 41 sylvain
h2. GPRS support
132 1 ttsou
133 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]]
134 61 laforge
* [[OsmoTRX]] does not support GPRS in combination with [[OsmoBTS:OpenBTS]].  For that, please use the transceiver supplied with [[OsmoBTS:OpenBTS]].
135 41 sylvain
136
h2. Source code
137
138
139 1 ttsou
The source code is available from git.osmocom.org (module osmo-trx).
140 18 ttsou
141
Public read-only access is available via
142 41 sylvain
<pre>
143 19 ttsou
$ git clone git://git.osmocom.org/osmo-trx
144 41 sylvain
</pre>
145 1 ttsou
You can browse it via cgit: http://cgit.osmocom.org/cgit/osmo-trx/
146
147 48 neels
h2. Dependencies
148 1 ttsou
149 48 neels
Install libusb-1.0 and libbost dev packages. On debian 8.4:
150 1 ttsou
151 48 neels
<pre>
152
sudo apt-get install --no-install-recommends libusb-1.0-0-dev libboost-dev
153
</pre>
154 41 sylvain
155 53 neels
h3. UHD
156 1 ttsou
157 48 neels
Unless using USRP1, you will need the Universal Hardware Driver (UHD),
158
which is available from Ettus Research or Fairwaves; the UHD implementation
159
must match your hardware:
160
161
* Ettus Research UHD for USRP devices
162 51 neels
* Fairwaves UHD with [[UmTRX:]]
163 48 neels
* USRP1 does not use the UHD driver, it is supported through the legacy libusrp driver provided in GNU Radio 3.4.2.
164
165 55 wirelesss
h3. UHD for Debian
166 48 neels
167 52 neels
When you are reading this, Debian packages for UHD may be sufficient for running osmo-trx and osmo-bts-trx.
168 48 neels
here are some of the packages that need to be installed:
169
170
<pre>
171 54 neels
sudo apt-get install libuhd-dev uhd-host
172 48 neels
</pre>
173 1 ttsou
174 55 wirelesss
*Troubleshooting:*
175
 
176 52 neels
At the time of writing this (2016-12), for Debian 8 aka jessie you need to use the jessie-backports packages:
177
178
<pre>
179
sudo -s
180
echo "deb http://ftp.de.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/uhd.list
181
apt-get update
182
apt-get -t jessie-backports install libuhd-dev uhd-host
183
</pre>
184
185
It may also be possible to use the pothos PPA instead:
186 48 neels
187
<pre>
188
sudo add-apt-repository ppa:guruofquality/pothos
189
sudo apt-get update
190
sudo apt install libboost-dev uhd
191
</pre>
192
193 53 neels
h3. Firmware
194 48 neels
195
You also need to download the firmware using a script provided by the UHD package.
196
Instructions suggest running the script as root, but this way is less dangerous:
197
198
<pre>
199
sudo mkdir /usr/share/uhd
200
sudo chown $USER: /usr/share/uhd
201
/usr/lib/uhd/utils/uhd_images_downloader.py
202
</pre>
203
204 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:
205
<pre>
206
uhd_image_loader --args="type=b200"
207
</pre>
208
209
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:
210
<pre>
211
/usr/lib/uhd/utils/b2xx_fx3_utils --load-fw /usr/share/uhd/images/usrp_b200_fw.hex
212
</pre>
213
214 53 neels
h3. Group
215 48 neels
216
You may need to add yourself to the usrp group:
217
218
<pre>
219
sudo gpasswd -a $USER usrp
220
# and re-login to acquire the group
221
</pre>
222
223 53 neels
h3. Verify
224 48 neels
225
run uhd_find_devices to make sure b200 is available:
226
227
<pre>
228
$ uhd_find_devices 
229
linux; GNU C++ version 4.9.1; Boost_105500; UHD_003.007.003-0-unknown
230
231
--------------------------------------------------
232
-- UHD Device 0
233
--------------------------------------------------
234
Device Address:
235
    type: b200
236
    name: MyB210
237
    serial: 1C0FFEE
238
    product: B210
239
</pre>
240
241
h2. Configuration and Build
242
243 41 sylvain
First, run autoreconf to remake the build system files.
244 1 ttsou
<pre>
245 18 ttsou
$ autoreconf -i
246 41 sylvain
...
247 18 ttsou
</pre>
248 41 sylvain
249 18 ttsou
*Intel Platforms (All)*
250 1 ttsou
251 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.
252 18 ttsou
<pre>
253 1 ttsou
$ ./configure
254
...
255 19 ttsou
checking whether mmx is supported... yes
256 18 ttsou
checking whether sse is supported... yes
257
checking whether sse2 is supported... yes
258
checking whether sse3 is supported... yes
259
checking whether ssse3 is supported... yes
260
checking whether sse4.1 is supported... yes
261
checking whether sse4.2 is supported... yes
262 41 sylvain
...
263 18 ttsou
</pre>
264 41 sylvain
265 18 ttsou
*ARM Platforms with NEON*
266 41 sylvain
267
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.
268 24 ttsou
<pre>
269 41 sylvain
$ ./configure --with-neon
270 1 ttsou
</pre>
271 41 sylvain
272 1 ttsou
*ARM Platforms with NEON-VFPv4*
273 41 sylvain
274
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.
275 1 ttsou
<pre>
276 41 sylvain
$ ./configure --with-neon-vfpv4
277 1 ttsou
</pre>
278 41 sylvain
279 1 ttsou
*ARM Platforms without NEON*
280 41 sylvain
281 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.
282
283
Coming soon...
284 41 sylvain
285 1 ttsou
*Build and Install*
286 16 ttsou
287
After configuration, installation is simple.
288 41 sylvain
289 16 ttsou
<pre>
290
$ make
291 41 sylvain
$ sudo make install
292 16 ttsou
</pre>
293
294 41 sylvain
h2. Running
295 16 ttsou
296 70 duo_kali
Normally simply start osmo-trx. (example configuration attached)
297 41 sylvain
298 56 wirelesss
<pre>
299 71 duo_kali
$ osmo-trx-uhd -C default.cfg
300 56 wirelesss
linux; GNU C++ version 5.3.1 20151219; Boost_105800; UHD_003.009.002-0-unknown
301
302
opening configuration table from path :memory:
303
Config Settings
304
   Log Level............... NOTICE
305
   Device args............. 
306
   TRX Base Port........... 5700
307
   TRX Address............. 127.0.0.1
308
   Channels................ 1
309
   Tx Samples-per-Symbol... 4
310
   Rx Samples-per-Symbol... 1
311
   EDGE support............ Disabled
312
   Reference............... Internal
313
   C0 Filler Table......... Disabled
314
   Multi-Carrier........... Disabled
315
   Diversity............... Disabled
316
   Tuning offset........... 0
317
   RSSI to dBm offset...... 0
318
   Swap channels........... 0
319
320
-- Detected Device: B200
321
-- Loading FPGA image: /usr/share/uhd/images/usrp_b200_fpga.bin... done
322
-- Operating over USB 2.
323
-- Detecting internal GPSDO.... No GPSDO found
324
-- Initialize CODEC control...
325
-- Initialize Radio control...
326
-- Performing register loopback test... pass
327
-- Performing CODEC loopback test... pass
328
-- Asking for clock rate 16.000000 MHz... 
329
-- Actually got clock rate 16.000000 MHz.
330
-- Performing timer loopback test... pass
331
-- Setting master clock rate selection to 'automatic'.
332
-- Asking for clock rate 26.000000 MHz... 
333
-- Actually got clock rate 26.000000 MHz.
334
-- Performing timer loopback test... pass
335
-- Setting B200 4/1 Tx/Rx SPS
336
-- Transceiver active with 1 channel(s)
337
</pre>
338
339 72 duo_kali
[[OsmoTRX]] can be configured with a variety of options as an example you can find at doc/examples of osmo-trx folder.
340 16 ttsou
341
342 41 sylvain
343 38 ttsou
344 1 ttsou
h2. [[OsmoTRX]] with [[OsmoBTS:OpenBTS]]
345 49 neels
346 38 ttsou
347
[[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.
348 41 sylvain
349 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.
350 41 sylvain
351
<pre>
352 71 duo_kali
$ osmo-trx-uhd -C default.cfg -f
353 41 sylvain
</pre>
354 17 ttsou
355 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.
356 35 ttsou
357 1 ttsou
h2. Authors
358 41 sylvain
359 1 ttsou
360 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)