Project

General

Profile

Configuring the ipaccess nano3G » History » Version 26

tsaitgaist, 12/28/2017 09:06 PM
add dmi console command

1 2 neels
{{>toc}}
2 1 neels
3 2 neels
h1. Configuring the ip.access nano3G
4
5
h2. IP address
6
7 21 neels
The ip.access nano3G will obtain an IP address from the DHCP server in your network. Ways to find out:
8
9
* Run @abisip-find@ (currently in the osmo-bsc.git repository), which should find the nano3G (despite no Abis interface being present). Find the @abisip-find@ output matching the MAC address printed on the sticker next to the power jack.
10
* Watch wireshark, filtering on 'BOOTP' while the nano3G starts up.
11
* Look it up in your DHCP server's list of leases.
12
13 2 neels
For this text, let's assume the IP address it obtained is 192.168.0.124.
14
15
h2. Initial Config
16
17
Once off, configure:
18
19
* the MCC + MNC,
20
* the UARFCN (i.e. the frequencies to transceive on) and
21 25 tsaitgaist
* the LAC and RAC (max. 256)
22
* the Cell ID composed by RNC (12 bits) and HNB C-ID (16 bits)
23 2 neels
24
You can do this on the _dmi_ console reachable by telnet:
25
26
<pre>
27
telnet 192.168.0.124 8090
28
dmi>
29
</pre>
30
31
On the dmi, enter commands like these:
32
33
<pre>
34
# PLMN Id == MCC + MNC
35
set mcc="901"
36
set mnc="98"
37
38
# [uarfcnDownlink, 1900 MHz band], [scramblingCode], [dummyCellId]
39
set rfParamsCandidateList=({9800, 401, 1})
40
41
# [lac], [rac]
42 1 neels
set lacRacCandidateList=({10422, (99)})
43 25 tsaitgaist
44
# cellid == RNCID<<16+HNBCID
45
set hnbCId=1
46
set rncIdentity=0
47
48 2 neels
</pre>
49
50
These settings persist across nano3G power down.
51
52 22 neels
*All of the above settings require a reboot of the nano3G to take effect.*
53
54 23 neels
h2. After Every Boot: Starting Operation
55 2 neels
56
Every time you boot the nano3G, you need to
57
58
* set the IP address the nano3G will find the HNB-GW at.
59
* 2061 = set cell parameters
60
* 1216 = unlock ap
61
* activate HNB-GW connection
62
* set csg to open access so that any IMSI can register
63
64
Enter the _dmi_...
65
<pre>
66
telnet 192.168.0.124 8090
67
dmi>
68
</pre>
69
70
...and issue commands like:
71
72
<pre>
73
set hnbGwAddress="192.168.0.132" 
74
action 2061
75
action 1216
76
action establishPermanentHnbGwConnection
77
set csgAccessMode=CSG_ACCESS_MODE_OPEN_ACCESS
78
</pre>
79
80 26 tsaitgaist
If the telnet interface for dmi is closed (after you quit it), you can still issue commands using the [[Configuring_the_ipaccess_nano3G#SSH-Access|console]] (here to close the connection to the HNB-GW)
81
<pre>
82
/opt/ipaccess/DMI/ipa-dmi -c 'action terminatePermanentHnbGwConnection'
83
</pre>
84
85 2 neels
h2. SSH Access
86
87
The nano3G come with a root password of 'newsys':
88
<pre>
89
ssh root@192.168.0.124
90
password: newsys
91
</pre>
92
93 9 roox
In case you are using a recent version of the OpenSSH-client you'll get the following error message while trying to connect:
94
_Unable to negotiate with 192.168.0.124 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1_
95
96
Starting with OpenSSH version 7.0 support for the 1024-bit diffie-hellman-group1-sha1 key exchange was disabled by default at run-time.
97 24 neels
Furthermore, the ciphers supported by the nano3G may be disabled by default. To enable both manually:
98 9 roox
<pre>
99 24 neels
ssh -o KexAlgorithms=+diffie-hellman-group1-sha1 -c aes128-cbc root@192.168.0.124
100 9 roox
</pre>
101
102 10 roox
h2. NTP
103
104
Be sure that the nano3G is able to resolve the DNS record _0.ipaccess.pool.ntp.org_ and can connect the the corresponding NTP servers.
105
Without syncronized NTP the nano3G does not bring up the TRX and it even do not try to connect to the hnbGw.
106 9 roox
107 20 neels
A workaround is to edit the @/etc/hosts@ file on the nano3G (via SSH) and add an entry to resolve 0.ipaccess.pool.ntp.org to your local NTP server's IP address (which requires re-mounting the root file system in read-write mode...).
108 19 neels
109 2 neels
h2. Logging
110
111
When logged in via SSH, you can view the live logging here:
112
<pre>
113
ls /tmp/iapclogs/trace_*.log
114
</pre>
115
116
h2. Closed Mode
117
118
You can also set csgAccessMode to closed and allow only specific IMSIs:
119
120
<pre>
121 6 neels
set csgAccessMode=CSG_ACCESS_MODE_CLOSED_ACCESS
122 2 neels
# IMSI, 1:allowed/2:not allowed, phone number (only for "Closed Access")
123
set accessControlList = ({"001010123456015",  1, "81084"},{"001010123456025", 2, "81025"})
124
</pre>
125
126
(The phone number is actually not relevant)
127
128
h1. Peculiarities and Tips
129
130 12 neels
h2. Exiting the dmi while keeping it alive
131
132
When you exit the dmi telnet by hitting Ctrl-C, it will not be available anymore until you reboot the nano3G.
133
Every connection attempt will then end in
134
135
<pre>
136
dmi> Connection closed by foreign host.
137
</pre>
138
139 13 neels
However, if you end your session by the telnet escape character and quitting, the dmi remains open for further connections. Usually that means: hit Ctrl-] (Ctrl and closing square brace) and then enter 'quit':
140 12 neels
141
<pre>
142
dmi> ^]
143
telnet> quit
144
</pre>
145
146 2 neels
h2. UE Register
147
148
The nano3G apparently passes the same identity received from the UE through to
149
the HNBAP UE Register Request message. This means that when the UE sends a
150
TMSI, the UE Register Request received by osmo-hnbgw contains no IMSI.
151
152 7 neels
In this scenario, the problem is that Paging apparently does not (always) work.
153 1 neels
So even though we have working code that allows HNBAP registration with
154 7 neels
a TMSI, that means that you can't (always) reach the UE from the CN.
155
This is not always the case, sometimes the nano3G can well page UEs that have
156
registered by TMSI. Vague idea: it may be that it needs to have seen the IMSI
157
once after power-cycling, e.g. after a closed-mode registration, and then
158
TMSI registration will not harm Paging. (TODO: clarify this)
159 2 neels
160 7 neels
The VTY configuration option to allow TMSI-only attaching to HNBGW, which
161
possibly helps to shorten your dev cycle but may harm paging, is:
162 2 neels
163
<pre>
164
hnbgw
165
 iuh
166 7 neels
  hnbap-allow-tmsi 1
167 2 neels
</pre>
168 1 neels
169 2 neels
Legacy workaround: connect the phone to a different network between retries (being
170
rejected suffices). That causes the UE to discard its TMSI and then use the IMSI
171
for the next registration.
172
173 18 neels
A [[Configuring the ipaccess nano3G#Closed-Mode|closed csgAccess]] with explicit IMSIs could help here to enforce that a UE
174 7 neels
indeed sends its IMSI to the nano3G and hence Paging should work.
175 3 neels
See also #1924.
176
177
h2. id-Reset
178
179
The nano3G seems to *not* send an id-Reset message upon connecting to the HNB-GW.
180
181
h2. Location Update failure due to timeout
182
183
If a UE seems to connect successfully at first but fails by timeout because the final
184
"TMSI Reallocation Complete" message is missing, this might be due to misconfiguration:
185
the CN is sending the wrong LAC or the PLMN-ID (NCC/MNC) is configured wrongly.
186
187
This might be confusing in the sense that a complete LU worked once but not after that;
188
GMM Attach may be successful; Security Mode Commands succeed; and so forth.
189 8 neels
Still the solution might be simply to fix the mobile network code in the osmo-msc.cfg.
190 4 neels
191
h2. RAB Assignment needs IuUP ACK Initialization
192
193
IuCS uses UP encapsulated in RTP. The UP starts off by sending an Initialization, replied
194
upon by an ACK Initialization.
195
196
The nano3G seems to not reply with an ACK when it receives an IuUP Initialization frame.
197
Thus it is not possible to merely echo its own RTP packets back to itself; instead, the
198
first RTP frame received from the nano3G (that is an IuUP Initialization) can be changed
199
to an ACK Initialization by writing 0xe4 to the first payload byte. Sending this back to
200
the nano3G then results in successful RAB Assignment.
201
202
(With the SysmoCell5000, echoing its own Initialization back to itself results in an ACK
203 1 neels
being sent, which we can also echo back to itself, so mere echoing works there.)
204 11 neels
205 14 neels
A hack to make the nano3G work is currently on the "3G master" (the vlr_3G branch),
206
because it does not seem to harm other femto cells: the commit's summary is
207
"mgcp: hack RAB success from nano3G: patch first RTP payload", see "cgit":http://git.osmocom.org/openbsc/log/?h=vlr_3G.
208 15 neels
209
See also #1712#note-21 and the following two comments.
Add picture from clipboard (Maximum size: 48.8 MB)