Project

General

Profile

Ettus USRP B2xx family » History » Version 16

Anonymous, 02/19/2016 10:47 PM
Fixed some typos, thanks Pierre for noticing it

1 1
This page will describe how to install and configure OpenBSC, Osmo-BTS, Osmo-TRX, Osmo-PCU and OpenGGSN to create an opensource 2G/GSM network with your Ettus USRP B200/B210 SDR hardware.
2
3
This page in under development, please stay tuned.
4
5 3
'''Pre-Req:'''
6 1
7
The following guide is created on Ubuntu 14.14.03 LTS 64bit with kernel 3.19.0-26-lowlatency
8 2
9
1. Installing the UHD driver stack for Ettus USRP SDRs:
10
11
http://files.ettus.com/manual/page_install.html#install_linux_ourbins
12 1
13 3
'''2. Installing dependencies:'''
14
15
{{{
16 15
apt-get install libdbi0-dev libdbd-sqlite3 build-essential libtool autoconf automake git-core pkg-config libssl-dev libpcsclite-dev libusb-1.0 libncurses5-dev libgsm1-dev libpcap-dev libc-ares-dev libtalloc-dev libsctp-dev
17 3
}}}
18
19 5
Create a folder, where all the projects files will be stored:
20
21
{{{
22
mkdir osmocom
23
cd osmocom
24
}}}
25
26 3
'''Get Opencore AMR:'''
27
28
{{{
29
wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz
30
tar xvzf opencore-amr-0.1.3.tar.gz
31
cd opencore-amr-0.1.3
32
./configure
33
make
34
make install
35
ldconfig
36
cd ..
37
}}}
38
39
'''Get ORTP:''
40
41
Note: 0.24.2 is not working with OpenBSC!
42
43
{{{
44
wget http://download.savannah.gnu.org/releases/linphone/ortp/sources/ortp-0.22.0.tar.gz
45
tar xvzf ortp-0.22.0.tar.gz
46 16
cd ortp-0.22.0
47 3
./configure
48
make
49
make install
50
ldconfig
51
cd ..
52
}}}
53 4
54
'''Get libosmocore (master):'''
55
{{{
56
git clone git://git.osmocom.org/libosmocore.git
57
cd libosmocore
58
autoreconf -fi
59
./configure
60
make
61
make install
62
ldconfig
63
cd ..
64
}}}
65
'''Get libosmo-abis (master)'''
66
{{{
67
git clone git://git.osmocom.org/libosmo-abis.git
68
cd libosmo-abis
69
autoreconf -fi
70
./configure
71
make
72
make install
73
ldconfig
74
cd ..
75
}}}
76
'''Get libosmo-netif (master):'''
77
{{{
78
git clone git://git.osmocom.org/libosmo-netif.git
79
cd libosmo-netif
80
autoreconf -fi
81
./configure
82
make
83
make install
84
ldconfig
85
cd ..
86
}}}
87
'''Get OpenGGSN:'''
88
{{{
89
git clone git://git.osmocom.org/openggsn.git
90
cd openggsn
91
autoreconf -i
92
./configure --prefix=/usr/local
93
make
94
make install
95
ldconfig
96
cd ..
97
}}}
98
'''Get libosmo-sccp (master):'''
99
{{{
100
git clone git://git.osmocom.org/libosmo-sccp.git
101
cd libosmo-sccp
102
autoreconf -fi
103
./configure
104
make
105
make install
106
ldconfig
107
cd ..
108
}}}
109 13
'''Get OpenBSC (master):'''
110 4
{{{
111
git clone git://git.osmocom.org/openbsc.git
112
cd openbsc/openbsc
113
autoreconf -fi
114
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
115
./configure
116
make
117
make install
118
ldconfig
119 1
cd ../..
120 4
}}}
121 13
'''Get Osmo-BTS (201509-fairwaves-rebase):'''
122 1
{{{
123 4
git clone git://git.osmocom.org/osmo-bts.git
124
cd osmo-bts
125 13
git checkout 201509-fairwaves-rebase
126 4
autoreconf -fi
127
./configure --enable-trx
128
make
129
make install
130
ldconfig
131
cd ..
132
}}}
133
'''Get Osmo-PCU (master):'''
134
{{{
135 1
git clone git://git.osmocom.org/osmo-pcu.git
136 16
cd osmo-pcu
137 4
autoreconf -fi
138
./configure --enable-sysmocom-bts
139
make
140
make install
141
ldconfig
142
cd .. 
143
 }}}
144
'''Get Osmo-TRX (master):'''
145
{{{
146
git clone git://git.osmocom.org/osmo-trx.git
147
cd osmo-trx
148
./autogen.sh
149
./configure
150
make
151
make install
152
ldconfig
153
cd .. 
154
}}}
155 6
156
'''Get mISDN kernel and user space:'''
157
158
Note: if you see "configure: error: kernel build tree does not exist" then you need to install kernel headers.
159
{{{
160
git clone git://git.misdn.eu/mISDN.git
161
cd mISDN
162
./configure 
163
cp mISDN.cfg.default standalone/mISDN.cfg
164
make modules
165
make modules_install
166
ldconfig
167
cd ..
168
169
git clone git://git.misdn.eu/mISDNuser.git
170
cd mISDNuser
171
make
172
./configure
173
make
174
sudo make install
175
ldconfig
176
cd ..
177
178
depmod –a
179
modprobe mISDN_core
180
modprobe mISDN_dsp
181
modprobe mISDN_l1loop nchannel=30 interfaces=2
182
}}}
183
184
To auto-load the mISDN kernel modules do:
185
186
{{{
187
cd /etc/modules-load.d/
188
 cat > misdn-modules.conf
189
 mISDN_core
190
 mISDN_dsp
191
 mISDN_l1loop nchannel=30 interfaces=2
192
}}}
193
Hit Ctrl+C
194
{{{
195
chmod 644 misdn-modules.conf
196
cd /
197
}}}
198
199
'''Install Asterisk (ver 1.8 !):'''
200
201
On Ubuntu 14.04 there is no version 1.8 Asterisk anymore, to get it, do the following:
202
{{{
203
wget http://launchpadlibrarian.net/153943558/asterisk-modules_1.8.13.1~dfsg-3ubuntu3_amd64.deb
204
wget http://launchpadlibrarian.net/153943773/asterisk-config_1.8.13.1~dfsg-3ubuntu3_all.deb
205
wget http://launchpadlibrarian.net/153943772/asterisk-dev_1.8.13.1~dfsg-3ubuntu3_all.deb
206
wget http://launchpadlibrarian.net/153943557/asterisk_1.8.13.1~dfsg-3ubuntu3_amd64.deb
207
wget http://launchpadlibrarian.net/107480639/asterisk-core-sounds-en-gsm_1.4.22-1_all.deb
208
wget http://launchpadlibrarian.net/58272892/asterisk-moh-opsound-gsm_2.03-1_all.deb
209
dpkg -i *.deb
210
apt-get -f install
211
}}}
212
213
Otherwise the Asterisk channel driver (chan_lcr) will not compile.
214
215
'''Get LCR (master):'''
216
{{{
217
git clone git://git.misdn.eu/lcr.git/
218
cd lcr
219
autoreconf -fi
220
./configure --with-gsm-bs --with-misdn --with-asterisk
221
make
222
make install
223
cp chan_lcr.so /usr/lib/asterisk/modules/
224
ldconfig
225
cd ..
226
}}}
227
228
Configure the LCR interfaces:
229
{{{
230
cat > /usr/etc/lcr/interface.conf 
231
[GSM]
232
gsm-bs
233
tones no
234
earlyb no
235
bridge ast
236
237
[ast]
238
remote asterisk
239
context from-lcr
240
earlyb no
241
tones yes
242
bridge GSM
243
}}}
244
Hit Ctrl+C
245
246
Add the following two lines to the bottom of options.conf:
247
{{{
248
nano /usr/etc/lcr/options.conf
249
250
socketuser asterisk
251
socketgroup asterisk
252
}}}
253 7
254
'''Configuration of Asterisk:'''
255
256
You can find an attached configuration file called "extensions.conf". Please put that file and overwrite the original configuration at /etc/asterisk/exetensions.conf
257
258
Then restart asterisk:
259
260
{{{
261
sudo service asterisk restart
262
}}}
263
264
'''Configuring the GGSN:'''
265
266
Use the example configuration file called "ggsn.conf" and put it to /etc/ggsn.conf
267
268
The traffic from the UEs (mobiles, USB modems etc) are terminated on a TUN interface with the IP address: 10.0.0.1
269
The UEs are going to get an address from this range: 10.0.0.2 - 10.0.0.254
270
The GGSN will listen on 127.0.0.5. In this example all the services (BSC, GGSN, SGSN, PCU etc.) are running on the same computer.
271 8
272
'''Configuring OpenBSC, Osmo-SGSN, Osmo-PCU'''
273
274
Please use the attached examle config files at the bottom fo this page.
275
276
'''Starting the services'''
277
278
Please note that in this example we are going to need quite a few terminals to be open, because except for LCR, GGSN and Asterisk, we are going to run the services in foreground.
279
280
Start the GGSN:
281
282
{{{
283
ggsn
284
}}}
285
286
Start LCR:
287
288
{{{
289
lcr fork
290
}}}
291
292
Open a new terminal and start the SGSN (with the sample config file provided):
293
294
{{{
295
sudo osmo-sgsn -c sgsn.conf
296
}}}
297
298
Open a new terminal and start the BSC (with the sample config file provided):
299
300
{{{
301
sudo osmo-nitb -C -c openbsc.conf -T -P -m
302
}}}
303
304
Open a new terminal and start Osmo-TRX:
305
306
{{{
307
sudo osmo-trx
308
}}}
309
310
Open a new terminal and start Osmo-BTS (with the sample config file provided):
311
312
{{{
313
sudo osmobts-trx -c osmo-bts.cfg
314
}}}
315
316
Open a new terminal and start Osmo-PCU (with the sample config file provided):
317
318
{{{
319
sudo osmo-pcu -c osmo-pcu.cfg
320
}}}
321 9
322
'''Setting up NAT for GPRS:'''
323
324
In order for the UEs to be able to "see" the internet, we need to enable network address translation (NAT).
325
326
First determine which network interface is connected to the internet with:
327
{{{
328
ifconfig
329
}}}
330
331
After you know the interface name (for example: eth0 or eth1 or em1 etc.), run the following commands.
332
333
Note that in the second command you need to use your interface name instead of "em1".
334
335
{{{
336
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
337
sudo iptables -A POSTROUTING -s 10.0.0.0/24 -t nat -o em1 -j MASQUERADE
338
}}}
Add picture from clipboard (Maximum size: 48.8 MB)