Project

General

Profile

OsmoTRX » History » Version 62

laforge, 06/13/2017 06:10 PM

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