Commit Graph

972 Commits

Author SHA1 Message Date
Harald Welte 9c880c9a9b [GPRS] Add RSL function for ip.access PDCH activation
If we have a dynamic TCH/F / PDCH channel configuration, then
we can either ACTIVATE CHANNEL it for a TCH/F, or we need to send
this vendor-specific PDCH ACTIVATE command to use it as a PDCH.

As opposed to a fixed configuration, this allows an intelligent
BSC channel allocator to use otherwise idle channels as PDCH
as long as no more TCH's are needed.
2009-10-24 10:29:22 +02:00
Harald Welte a1499d00a5 [GPRS] introudce PDCH and PDCH/TCH physical channels
GPRS needs PDCH (Packet Data Channels), and we need support in
our data model as well as OML and RSL for it
2009-10-24 10:25:50 +02:00
Harald Welte daef521ea5 [OML] Add support for ip.access SET ATTRIBUTE message
Since TS 12.21 implements only SET ATTRIBUTE for some object classes,
ip.access had to extend it to be able to set attributes on arbitrary
objects.  We now introduce a function implementing that message.
2009-10-24 10:20:41 +02:00
Harald Welte 55dd443ac2 [GPRS] add data structures for OML of NSE,CELL,NSVCE
Supporting GPRS means we have a number of additional OML objects to
deal with.  We need to extend our gsm_bts structure to at least
include the nm_state for each of those objects.
2009-10-24 10:19:14 +02:00
Harald Welte 73310c3c83 [TLV] extend TLV parser with support for TvLV
Tag-variableLength-Value is an encoding scheme used in the GPRS NS
and BSSGP protocols, where the length value can be 8 or 16 bits,
depending on actual demand.
2009-10-24 10:04:02 +02:00
Holger Hans Peter Freyther ca0fcbe157 [gsm48] Make method name consistent...
We use rx_rr to indicate that we have received a radio resource
message but one method was using rr_rx. Fix that.
2009-10-23 13:48:54 +02:00
Holger Hans Peter Freyther 0e7b0732f6 Include e1_input.h for the e1inp_line 2009-10-22 15:48:59 +02:00
Holger Hans Peter Freyther 555eba140d Fix spelling of default 2009-10-22 15:46:16 +02:00
Holger Hans Peter Freyther 2c481b27fc Fix compiler warning. 0 does not work on strings 2009-10-22 15:44:30 +02:00
Holger Hans Peter Freyther ddd918f7ec Fix compiler warning and cast const away.
TLVP_VAL returns a const u_int8_t* and we assign it
to a non const, cast const away.
2009-10-22 15:43:55 +02:00
Holger Hans Peter Freyther 8b77a34131 [rrlp] Fix compiler warnings
The apdu is static const u_int8_t. Change the signature to
have a const in there to make the compiler happy, include
chan_alloc.h for lchan methods.
2009-10-22 15:42:19 +02:00
Holger Hans Peter Freyther dc1e1058f3 Fix warnings by removing unused variables 2009-10-22 15:40:33 +02:00
Holger Hans Peter Freyther 65fb0fda9d Forward declare methods to fix compiler warnings
Put the used method in the header files or use extern
in the case of a vty method used by token_auth
2009-10-22 15:39:37 +02:00
Holger Hans Peter Freyther 2657abfe35 [db] Fix compile warnings in db.c
For the compiler classmark1 is a struct and the compiler is
unaware that it fits into an unsigned int. Use memcpy to
copy it to a u_int8_t (the compiler should inline this).

dbi_conn_quote_binary_copy works on unsigned char* change
q_apdu to be unsigned char.
2009-10-22 15:34:37 +02:00
Harald Welte b5280c7bc4 [wireshark] RSL: add more decoders for ip.access
Also, make sure we always use BASE_NONE with FT_BYTES, as
current wireshark svn has an ASSERT() about this.
2009-10-22 10:09:56 +02:00
Harald Welte a165a42811 [wireshark] abis_oml: Always use BASE_NONE with FT_BYTES 2009-10-22 10:09:21 +02:00
Harald Welte e73501a4f6 [ipaccess] revert commit 9bd7bc1b4c
Commit 9bd7bc1b4c caused the RSL
initialization to happen too early, resulting in the BTS
bootstrapping but missing [some of?] the system information
types.
2009-10-21 21:16:00 +02:00
Harald Welte 17ddc50338 Merge remote branch 'origin/master' 2009-10-21 20:24:09 +02:00
Holger Hans Peter Freyther 68455f81d3 Merge branch 'holger/merge-on-waves-msc' 2009-10-21 16:38:37 +02:00
Holger Hans Peter Freyther 02c28a0fa8 [debug] Use gcc attribute to enable printf checking
Inform the compiler that the same rules as printf apply
to the debugp method. This will check if the arguments
match the format string.
2009-10-21 16:38:19 +02:00
Holger Hans Peter Freyther 1565bd3226 [timer] Initialize i with zero
In case no timers were registered the result was not defined.
2009-10-21 16:38:19 +02:00
Holger Hans Peter Freyther cbbd49807f [msgb] Add msgb_reset to reset an existing msgb* to the initial state
The reset is useful if one msgb is supposed to be used over and
over again and is avoiding to use msgb_free,msgb_alloc in the
application code.
2009-10-21 16:38:13 +02:00
Harald Welte 8406ec2437 [nanoBTS] move nanoBTS initialization completely into state event handler 2009-10-20 17:31:00 +02:00
Harald Welte a8bd6d4a34 [abis_nm] introduce debugp_foh() function for object class printing 2009-10-20 09:56:18 +02:00
Harald Welte 77a838dff7 ip.access: use correct stream identifier when connecting RSL 2009-10-20 00:51:01 +02:00
Harald Welte 9bd7bc1b4c input/ipaccess: remove one more static variable 2009-10-20 00:50:03 +02:00
Harald Welte 8175e95222 ip.access: Support multi-TRX / RSL stream ID
In order to support multi-TRX configurations, we need to be able
to cope with multiple RSL streams (each with their own stream identifier)
inside one ip.access TCP connection.

Since this is very similar to using the TEI on a E1 line, we simply
recycle the logic and data fields that are used for the TEI.
2009-10-20 00:22:00 +02:00
Harald Welte 31a74906a3 [abis_nm] print ip.access TCP port in correct byte order 2009-10-19 22:50:30 +02:00
Harald Welte 35d447b022 [abis_nm] print ip.access stream_id in RSL connect ack 2009-10-19 22:49:33 +02:00
Harald Welte 746d6091d9 [abis_nm] introduce and use abis_nm_ipaccess_rsl_connect() 2009-10-19 22:11:11 +02:00
Harald Welte d004a6462a ip.access / multi-TRX: correctly identify TRX number on SW ACT REP 2009-10-19 21:47:54 +02:00
Harald Welte af7b2faf71 ip.access maximum output power depends on GSM band 2009-10-19 21:47:31 +02:00
Harald Welte a62202be31 [abis_nm]: Print Object Class of ip.access messages 2009-10-19 21:46:54 +02:00
Harald Welte 53f4b10b21 add ipaccess specific attribute set message
Partially apply 9ba65525eaa06a1768aaf35bdee98afcf8026e0a to get
rid of a compile problem. The other part of the mentioned commit
is still in the gprs branch.

Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-10-09 05:26:46 +02:00
Harald Welte 4d0481dbe9 [bsc_init] use new NM_AVSTATE_* enum instead of hard-coded numbers 2009-10-08 20:53:42 +02:00
Harald Welte 2d820ccf67 add availability state abis_nm enum 2009-10-08 20:52:35 +02:00
Harald Welte 4bd0a98a77 [abis_nm] print object class/instance for NACK 2009-10-08 20:49:51 +02:00
Harald Welte 15c44179c3 [abis_nm]: print ip.access SET ATTR [N]ACK 2009-10-08 20:49:44 +02:00
Andreas Eversberg 38ae5cb2c2 use tx delay timer instead of usleep() in ip.access input driver
this fixes the delay of audio caused by stalling of the openbsc process.
the use of 'usleep(100000)' for slowing down transmission to nanoBTS is
replaced by the tx-delay timer. i did this on bs11 code, so i did it the
same way. it actually queues frames for transmission not nanoBTS. on
transmission a timer is started and when this timer expires, the next
frame in the queue is transmitted (timer restarted) until the queue is
empty.
2009-10-08 12:53:16 +02:00
Holger Hans Peter Freyther 736f65d16d Merge branch 'holger/merge-on-waves-msc' 2009-10-06 12:54:07 +02:00
Holger Hans Peter Freyther ca6bc1d10f [gsm0408] Add parameter to gsm48_send_rr_ciph_mode for controling the response
This parameter controls if the response should include the
IMEISV or not. This will be set by the MSC and this is why
this parameter was added.
2009-10-06 04:34:25 +02:00
Holger Hans Peter Freyther ea4088a7ea [gsm0408] Move encryption message creation to gsm_04_08_utils.c
Be able to use the cipher mode command message from the MSC code.
2009-10-06 04:34:25 +02:00
Mike Haben e2d8227499 [ipaccess] Add nanoBTS 1900 support
Add support for 1900 nanoBTS by using unified bts_type
GSM_BTS_TYPE_NANOBTS for 900, 1800 and 1900 versions.

Reduce the nanoBTS enum values to one and derive the
version from the user supplied band. In the future we
might want to do auto band detection.

The configuration file needs to be changed to refer
to nanobts instead of nanobts900/nanobts1800.

Signed-off-by: Mike Haben <michael.haben@btinternet.com>
Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-10-05 12:12:54 +02:00
Mike Haben a03f97775b [ipaccess] Parse Software Activate parameters
Addresses a FIXME in abis_nm.c, parsing the parameters
passed by a Software Activate request.  I've tested this
on three different IpAccess BTSs (including one which
didn't work with the original code), would be good if
someone could check it on a BS11.

Signed-off-by: Mike Haben <michael.haben@btinternet.com>
Tested-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-10-01 14:58:30 +02:00
Holger Hans Peter Freyther e48b9562a4 [lac] Do not use the reserved LAC 0x0 for two different things
We are using LAC=0 for remembering that a GSM subscriber is
detached. I recently added code to gsm_bts_by_lac that will
return every BTS in case the lac is 0. Harald highlightes
that we would now search for detached subscribers at every
BTS of our network which is clearly not what we want.

Introduce two defines for the two reserved LAC, add a
pointer to the specification, check that our config files
do not contain these reserved values, use the define
and change gsm_bts_by_lac to use the other define.
2009-10-01 04:07:15 +02:00
Sylvain Munaut 86538c7fab input/ipaccess: Fix segv caused by use of uninitialized var
This is a regression coming from the recent split of the
handle_ts1_read method in two.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-10-01 03:53:31 +02:00
Holger Hans Peter Freyther 1b7b39d557 Merge branch 'holger/merge-msc-bsc-split' 2009-09-30 06:29:28 +02:00
Holger Hans Peter Freyther f734a14485 [ipaccess] Add SCCP/A descriminator 2009-09-30 06:27:21 +02:00
Holger Hans Peter Freyther d5f052230c [ipaccess] Prepare to reuse parts of the code for the A-link
For the MSC<->BSC connection we are going to use the same header
as used from BTS<->BSC but we are not having an E1-Link, a gsm network
or a gsm_bts available and can not use this part of the code.
2009-09-30 06:27:16 +02:00
Holger Hans Peter Freyther 0b7f4b36be [lac] The lac must be 16 bit. Change it in gsm_bts and vty parsing
The LAC can be 16bit of size. the generation of the LAI, struct
gsm_subsriber and the BSC<->MSC was already using it as a
16bit (short) value.

Change struct gsm_bts to parse 16bit and change the vty configuration
parsing code to deal with a short too.
2009-09-30 05:49:26 +02:00