Project

General

Profile

NanoBTS » History » Version 13

laforge, 02/19/2016 10:48 PM

1 11 laforge
The ip.access nanoBTS are small BTS with an A-bis over IP interface.  It's about the size of a WiFi access point.
2 1 laforge
3 11 laforge
There are multiple variants of the nanoBTS, most notably
4
 * the nanoBTS900 for GSM900
5
  * supports FR, EFR, AMR speech codecs
6
  * supports TCH/F and TCH/H based telephony
7
  * supports GPRS
8
 * the nanoBTS1800 for GSM1800, plus a GSM1900 variant thereof (almost identical hardware)
9
  * they support EDGE in addition to GPRS
10
11 13 laforge
A more detailed list of known nanoBTS models can be found at [wiki:nanoBTS_Models].
12
13 11 laforge
The A-bis over IP interface is spoken over a  100-base-TX Ethernet as physical layer.  Power over Ethernet (PoE) is used as
14
a power supply to the nanoBTS.
15
16
A-bis RSL and OML are encapsulated by a small additional header; each run in their own TCP session.  Instead of A-bis TRAU frames, the actual TCH speech data is inside RTP/UDP.  Details are indicated below.
17
18
The OpenBSC project has never received any protocol specification or other detailed information about the nanoBTS hardware.  All
19
information here and in the source code was derived by looking at protocol traces of actual nanoBTS installations.
20
21 6 laforge
== Deploying a new nanoBTS ==
22
23
The unconfigured ip.access nanoBTS needs to be configured as follows
24
 * The BTS is configued to automatically obtain an IP address via DHCP
25
 * The BTS is listening on UDP port 3006 for broadcast packets (e.g. should be found by ipaccess-find)
26
  * a typical response by ipaccess-find will be
27 7 laforge
{{{
28 6 laforge
Trying to find ip.access BTS by broadcast UDP...
29 1 laforge
MAC Address='00:01:02:03:04:05'  IP Address='192.168.100.123'  Unit ID='65535/0/0'  Location 1=''  Location 2='BTS_NBT131G'  Equipment Version='165a029_55'  Software Version='168a302_v142b13d0'  Unit Name='nbts-00-02-95-00-4E-B3'  Serial Number='00123456'  
30
}}}
31 11 laforge
 * The BTS is listening on TCP port 3006 for incoming Abis-over-IP connections. This is called ''Secondary OML Link''
32 1 laforge
 * The BTS has an unconfigured Unit ID (65535/0/0) and will refuse to work until a Unit ID has been set
33 11 laforge
 * You can set the Unit ID and Primarly OML IP using ipaccess-config as follows:
34 7 laforge
{{{
35
$ ./ipaccess-config -u 1801/0/0 -o 192.168.100.11 -r 192.168.100.122
36
ipaccess-config (C) 2009 by Harald Welte
37
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
38
39
Trying to connect to ip.access BTS ...
40
OML link established
41
setting Unit ID to '1801/0/0'
42
setting primary OML link IP to '192.168.100.11'
43
restarting BTS
44
Thu Apr 30 18:18:48 2009 <0020> abis_nm.c:2016 IPACCESS(0xf0): SET NVATTR ACK
45
Thu Apr 30 18:18:48 2009 <0020> abis_nm.c:2016 IPACCESS(0xf0): SET NVATTR ACK
46
}}}
47
 * Once a Unit ID and the Primary OML link IP address has been set, the BTS will try to connect to the BSC (tcp port 3002)
48
{{{
49
18:22:49.801584 IP 192.168.100.122.48000 > 192.168.100.11.3002: Flags [S], seq 3405259716, win 16000, options [mss 1460], length 0
50
}}}
51 6 laforge
52 1 laforge
== A-bis over IP protocol ==
53
54
This is the description of the A-bis over IP protocol as we have reverse engineered it by looking at protocol traces between a commercial BSC and a nanoBTS.  We did not and do not have access to the protocol specification of ip.access.
55 2 laforge
56 1 laforge
=== Common Header ===
57
58 2 laforge
Inside the TCP and UDP packets connection, every message is prefixed by a three-byte header:
59 1 laforge
{{{
60
struct ipaccess_head {
61 12 tnt
        u_int16_t len; /* network byte order */
62 1 laforge
        u_int8_t proto;
63
} __attribute__ ((packed));
64
}}}
65
66
where the first byte is zero, the second byte indicates the length of the message payload following the header, and the third byte indicates the protocol.  The following protocol values have been observed:
67
68
 * 0x00 RSL messages as per GSM 08.58
69
 * 0xfe ip.access specific messages
70
 * 0xff OML messages as per GSM 12.21
71
72
The ip.access specific messages that we have seen are of the following message types (message type is the first byte behind the ipaccess_head):
73
 * 0x00 PING (from BTS to BSC)
74
 * 0x01 PONG (from BSC to BTS), indicates that the link is still alive
75
 * 0x04 Identity Get (from BSC to BTS)
76
 * 0x05 Identity Response (from BTS to BSC)
77
 * 0x06 Identity confirm (both ways, BTS->BSC is a request, BSC->BTS is acknowledgement)
78 2 laforge
79
=== OML Signalling Link ===
80
81
After obtaining an IP address from DHCP, the nanoBTS will attempt to make TCP connections to a IP address and port number pre-configured in the device.  The standard port seems to be 3002.
82
83
==== vendor-specific OML messages ====
84
85
vendor-specific OML messages use a specific format but are closely following the spirit of GSM TS 12.21.
86
87
Look at the ''abis_nm_ipaccess_msg()'' function in ''abis_nm.c'' if you want to know the details.
88
89
=== RSL Signalling Link ===
90
91
There is a vendor-specific OML command 0xe0, which basically corresponds to what the usual ''Connect Terrestrial Signalling'' does.  Instead of connecting te RSL link to a specific TEI on a E1 timeslot, it connects the RSL link to a specified TCP port (and optionally IP address).
92
93
After this command is issued (and acknowledged by 0xe1), the BTS will initiate a TCP connection to the specified TCP port.
94 1 laforge
95 3 laforge
==== vendor-specific RSL messages ====
96
97
There are a couple of vendor-specific RSL messages extending 08.58 to accommodate the IP-based link.
98
99
They all use the GSM 08.85 message discriminator 0x7e
100
101
===== 0x70 BIND =====
102
103
This command binds a given on-air timeslot to a BTS-local RTP port.
104
105
Attributes:
106
 * 0x01 GSM 08.58 Channel Number (same as BIND)
107
108
===== 0x71 BIND ACK =====
109
110
This message (BTS->BSC) acknowledges the BTS-local bind.
111
112
Attributes:
113
 * 0x01 GSM 08.58 Channel Number (same as BIND)
114
 * 0xf8 unknown, maybe something like local RTP instance number, fixed length two bytes.
115
 * 0xf3 local RTP port number, fixed length 2 bytes
116
 * 0xf5 local IP address, fixed length 4 bytes
117
 * 0xfc unknown, fixed length 1 byte, content 0x7f
118
119
===== 0x73 CONNECT =====
120
121
This command (BSC->BTS) instructs the BTS to connect a given GSM channel (timeslot) to the remote end
122
123
Attributes:
124
 * 0x01 GSM 08.58 Channel Number (on-air timeslot)
125
 * 0xf8 unknown, maybe something like local RTP instance number, fixed length two bytes.
126
 * 0xf0 remote IP address, fixed length 4 bytes
127
 * 0xf1 remote RTP port number, fixed length 2 bytes
128
 * 0xf4 unknown, fixed length 1 byte, content 0x01
129
 * 0xfc unknown, fixed length 1 byte, content 0x7f
130
131
===== 0x74 CONNECT ACK =====
132
133
This message (BTS->BCS) confirms the successful CONNECT operation
134
135
Attributes:
136
 * 0x01 GSM 08.58 Channel Number (on-air timeslot)
137
 * 0xf8 unknown, maybe something like local RTP instance number, fixed length two bytes.
138
139
===== 0x76 DISCONNECT INDICATION =====
140
141
This message (BTS->BSC) indicates a terminated RTP connection
142
143
Attributes:
144
 * 0x01 GSM 08.58 Channel Number (on-air timeslot)
145
 * 0xf8 unknown, maybe something like local RTP instance number, fixed length two bytes.
146
 * 0xf6 unknown, TLV with one byte length, content zero
147
 * 0x1a GSM 08.58 Cause
148
149
150 1 laforge
=== TRAU link ===
151
152
Not yet reverse engineered.
153 4 laforge
154 5 laforge
There are streams of RTP-in-UDP packets to the ''remote IP'' and ''remote port'' that were indicated by the ''CONNECT'' message in RSL.
155
156
There are also regular RTCP packets on the port number plus 1.
157
158
==== RTP ====
159
160
The packets are according to RFC1889 (RTP Version 2), the payload type is set to 127, which is a dynamically allocated payload type.
161
162
They have sequence number and timestamp as well as 31 bytes of payload.  It seems the payload first 4 bits are always 0xC, reducing
163 8 laforge
the actual payload to 30.5 bytes.
164 5 laforge
165 8 laforge
As it seems, the FR and EFR RTP payload format follows the specification in section 4.5.8 and 4.5.9 of RFC3551 (
166
see http://www.ietf.org/rfc/rfc3551.txt)
167 5 laforge
==== RTCP ====
168
169
It seems that about every 3 seconds there is a RTCP packet, containing a source description and sender report.
170
171 4 laforge
== Wireshark dissector ==
172
173 10 laforge
We have developed a dissector for the popular wireshark network protocol analyzer.   The dissector has been merged into
174
the current wireshak development versions.  For older versions, the patch can be found in our git tree or at this location: http://bs11-abis.gnumonks.org/trac/browser/wireshark/abisip.patch
175 5 laforge
176 1 laforge
Furthermore, there is a patch for adding the ip.access specific RSL extensions to the packet-rsl.c dissector at http://bs11-abis.gnumonks.org/trac/browser/wireshark/rsl-ipaccess.patch
177 10 laforge
178
There's also a A-bis OML dissector plugin available from http://bs11-abis.gnumonks.org/trac/browser/wireshark/abis_oml.patch
179 4 laforge
180
Once the code has stabilized more, we plan to submit this for inclusion into wireshark mainline.
Add picture from clipboard (Maximum size: 48.8 MB)