Project

General

Profile

OsmoTRX » History » Version 59

roh, 06/06/2017 09:59 AM

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