Project

General

Profile

Accelerate3g5 -- unicornteam » History » Version 16

Alin, 04/11/2017 09:36 AM

1 1 Alin
h1. Accelerate3g5 -- unicornteam
2
3
Journal
4
5
2017/03/15 -- Received the package of nano3G.
6 2 Alin
7 5 Alin
!C7aK_6IVAAALB5Z.jpg!
8 4 Alin
9 5 Alin
10 3 Alin
2017/04/10
11 4 Alin
12 2 Alin
h2. Building from source
13
* PC:Ubuntu16.04
14
* HardWare:ip.access nano3G
15 4 Alin
* SoftWare:Osmocom 
16 1 Alin
17 5 Alin
!C7aK_5_U0AAN1Co.jpg!
18 1 Alin
19 5 Alin
h3.  1.1 Install cross-compilation environment
20
21 2 Alin
<pre>
22
sudo apt-get update
23
24 8 Alin
sudo apt-get install libtool shtool autoconf git-core pkg-config make gcc build-essential libgmp3-dev libmpfr-dev libx11-6 libx11-dev texinfo flex bison libncurses5 libncurses5-dbg libusb-0.1-4 libpcsclite1 libccid pcscd libncurses5-dev libncursesw5 libncursesw5-dbg libncursesw5-dev zlibc zlib1g-dev libmpfr4 libmpc-dev libpcsclite-dev 
25
sudo ldconfig
26
27 7 Alin
mkdir osm
28 6 Alin
cd osm
29 2 Alin
mkdir build install src
30
wget http://bb.osmocom.org/trac/raw-attachment/wiki/GnuArmToolchain/gnu-arm-build.3.sh
31
cd src
32
wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2
33
wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.1a.tar.bz2
34
wget ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz
35
36
cd ..
37
chmod +x gnu-arm-build.3.sh
38
sudo bash gnu-arm-build.3.sh
39 1 Alin
</pre>
40 2 Alin
41 5 Alin
h3.  1.2 Add Cross compiler environment
42 4 Alin
43 2 Alin
<pre>
44
cd install/bin
45
pwd
46
47
vi ~/./.bashrc
48
export PATH=$PATH:/home/$username(change this to your name)/osm/install/bin
49
50
#save and quit
51 9 Alin
cd ../../
52 1 Alin
source ~/.bashrc
53
</pre> 
54 2 Alin
55 5 Alin
h3. 0x02 build CalypsoBTS 
56 4 Alin
57 5 Alin
h3.  2.1 Build libosmo-dsp
58 4 Alin
59 2 Alin
<pre>
60
git clone git://git.osmocom.org/libosmo-dsp.git
61
cd libosmo-dsp/
62
autoreconf -i
63
./configure
64
make
65 1 Alin
sudo make install
66 2 Alin
cd ..
67
</pre>
68
69
70 5 Alin
h3.  2.2 Build osmocom-bb
71 2 Alin
72
<pre>
73
git clone git://git.osmocom.org/osmocom-bb.git trx
74
cd trx/
75
git checkout jolly/testing
76
cd src/
77
78
# It needs TX support
79
# Just uncomment 'CFLAGS += -DCONFIG_TX_ENABLE' in target/firmware/Makefile
80 1 Alin
81 2 Alin
# And make with transceiver support
82
make HOST_layer23_CONFARGS=--enable-transceiver
83
</pre>
84
85 1 Alin
86 5 Alin
h3.  2.3 Install dependency package
87 4 Alin
88 2 Alin
<pre>
89
sudo apt-get install sqlite3 libdbi-dev libdbd-sqlite3 libsctp-dev
90
</pre>
91
92 5 Alin
h3.  2.4 Build Ortp
93 2 Alin
 
94
<pre>
95
wget http://download.savannah.gnu.org/releases/linphone/ortp/sources/ortp-0.22.0.tar.gz
96
tar -xvf ortp-0.22.0.tar.gz
97
cd ortp-0.22.0/
98 1 Alin
./configure
99 2 Alin
make
100
sudo make install
101
sudo ldconfig
102
cd ..
103
</pre>
104
105
106 5 Alin
h3.  2.5 Build libosmo-abis
107 2 Alin
108
<pre>
109
git clone git://git.osmocom.org/libosmo-abis.git
110 1 Alin
cd libosmo-abis
111 2 Alin
autoreconf -i
112
./configure
113
make
114
sudo make install
115
sudo ldconfig
116
cd ..
117
</pre>
118
119 5 Alin
h3.  2.6 Build libosmo-netif
120 2 Alin
121
<pre>
122 1 Alin
git clone git://git.osmocom.org/libosmo-netif.git
123 2 Alin
cd libosmo-netif/
124
autoreconf -i
125
./configure
126
make
127
sudo make install
128
sudo ldconfig
129
cd ..
130
</pre>
131
132 5 Alin
h3.  2.7 Build openbsc
133 2 Alin
 
134 10 Alin
install PCAP library frist
135 1 Alin
<pre>
136 10 Alin
apt-cache search PCAP
137
sudo pat-get install libpcap-dev libpcap0.8 libpcap0.8-dbg libpcap0.8-dev
138
sudo ldconfig
139
140 2 Alin
git clone git://git.osmocom.org/openbsc.git
141
cd openbsc/openbsc/
142
autoreconf -i
143
./configure
144
make
145
sudo make install
146
cd ../..
147
148
</pre>
149
150 5 Alin
h3.  2.8 Build osmo-bts
151 1 Alin
152 2 Alin
<pre>
153
git clone git://git.osmocom.org/osmo-bts.git
154
cd osmo-bts
155
autoreconf -i
156
./configure --enable-trx
157
make
158
sudo make install
159
cd ..
160
</pre> 
161 1 Alin
162
163 5 Alin
h3.  2.9 Create configuration folder for OpenBSC
164 4 Alin
165 2 Alin
<pre>
166
# Create the configuration folder if it isn't exist yet
167
mkdir ~/.osmocom
168
cd ~/.osmocom
169
touch ~/.osmocom/open-bsc.cfg
170
touch ~/.osmocom/osmo-bts.cfg
171
</pre>
172
173
174 5 Alin
h3.  0x03 Build Cellular Infrastructure
175 2 Alin
176 5 Alin
h3. 3.1 Clone 
177 2 Alin
178
<pre>
179
git clone git://git.osmocom.org/libosmocore
180
git clone git://git.osmocom.org/libosmo-abis
181
git clone git://git.osmocom.org/openbsc
182
git clone git://git.osmocom.org/libosmo-netif
183
git clone git://git.osmocom.org/libosmo-sccp
184
git clone git://git.osmocom.org/libsmpp34
185
git clone git://git.osmocom.org/openggsn
186
</pre>
187
188
189 5 Alin
h3.  3.2 Download and run build script
190 4 Alin
191 2 Alin
<pre>
192
wget https://osmocom.org/attachments/download/2438/build_2G.sh
193
chmod 777  build_2G.sh
194
sudo bash build_2G.sh
195
</pre>
196 11 Alin
h3. Run BTS
197
198
Terminal 1:
199
<pre>
200
osmo-nitb -c ~/.osmocom/open-bsc.cfg -l ~/.osmocom/hlr.sqlite3 -P -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM
201
</pre> 
202
203
Terminal 2:
204
<pre>
205
telnet localhost 4242
206
</pre>
207
208
!2017-04.png!
209 12 Alin
210
<pre>
211
OpenBSC> show version
212
OpenBSC 0.15.0.726-ca27 (OpenBSC).
213
Copyright (C) 2008-2016 Harald Welte, Holger Freyther
214
Contributions by Daniel Willmann, Jan Lübbe, Stefan Schmidt
215
Dieter Spaar, Andreas Eversberg, Sylvain Munaut, Neels Hofmeyr
216
217
License AGPLv3+: GNU AGPL version 3 or later <http://gnu.org/licenses/agpl-3.0.html>
218
This is free software: you are free to change and redistribute it.
219
There is NO WARRANTY, to the extent permitted by law.
220
221
</pre>
222 13 Alin
223 14 Alin
2017/04/11
224
225 13 Alin
h2. Configuring the ip.access nano3G
226 1 Alin
227 15 Alin
!network.jpg!
228
229 14 Alin
h3. PC
230
231
IP:192.168.31.147 (With WiFi)
232
233
h3. Route
234
235
IP:192.168.31.1
236
237
h3. 3G Access Point
238
239
IP:unkonw
240
241
<pre>
242
cd openbsc/openbsc/src/ipaccess
243
#or
244
cd openbsc/openbsc/build-2G/src/ipaccess
245
246
sudo ./abisip-find 
247
248
</pre>
249
250
!ipfind.png!
251
252
<pre>
253
telnet 3G Access Point's IP 8090
254
</pre>
255
256
!telnet.png!
257
258 16 Alin
259 14 Alin
<pre>
260 16 Alin
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 root@192.168.0.124
261
password:newsys
262
</pre>
263
264
!Snip20170411_2.png!
265
266 14 Alin
init3@0xroot:~/osm/openbsc/openbsc/src/ipaccess$ ./ipaccess-config --help
267
ipaccess-config (C) 2009-2010 by Harald Welte and others
268
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
269
270
Usage: ipaccess-config IP_OF_BTS
271
Commands for writing to the BTS:
272
  -u --unit-id UNIT_ID      Set the Unit ID of the BTS
273
  -o --oml-ip IP        Set primary OML IP (IP of your BSC)
274
  -i --ip-address IP/MASK   Set static IP address + netmask of BTS
275
  -g --ip-gateway IP        Set static IP gateway of BTS
276
  -r --restart          Restart the BTS (after other operations)
277
  -n --nvram-flags FLAGS/MASK   Set NVRAM attributes
278
  -S --nvattr-set FLAG  Set one additional NVRAM attribute
279
  -U --nvattr-unset FLAG    Set one additional NVRAM attribute
280
  -l --listen TESTNR        Perform specified test number
281
  -L --Listen TEST_NAME     Perform specified test
282
  -s --stream-id ID     Set the IPA Stream Identifier for OML
283
  -d --software FIRMWARE    Download firmware into BTS
284
285
Miscellaneous commands:
286
  -h --help         this text
287
  -H --HELP         Print parameter details.
288
  -f --firmware FIRMWARE    Provide firmware information
289
  -w --write-firmware       This will dump the firmware parts to the filesystem. Use with -f.
290
  -p --loop         Loop the tests executed with the --listen command.
291
</pre>
292
293
<pre>
294
init3@0xroot:~/osm/openbsc/openbsc/src/ipaccess$ ./ipaccess-proxy --help
295
Usage: ipaccess-proxy [options]
296
 ipaccess-proxy is a proxy BTS.
297
 -h --help. This help text.
298
 -l --listen IP. The ip to listen to.
299
 -b --bsc IP. The BSC IP address.
300
 -g --gprs IP. Take GPRS NS from that IP.
301
302
 -s --disable-color. Disable the color inside the logging message.
303
 -e --log-level number. Set the global loglevel.
304
 -T --timestamp. Prefix every log message with a timestamp.
305
 -V --version. Print the version of OpenBSC.
306
</pre>
307 13 Alin
308
h2. Femto Config
309
310
coming soon
Add picture from clipboard (Maximum size: 48.8 MB)