Commit Graph

1704 Commits

Author SHA1 Message Date
Harald Welte e9dd9b0475 gsm_04_11.c: Use msgb->l4h instead of sms->smsh, as the latter is gone 2010-04-30 14:27:05 +02:00
Harald Welte 52e8da6ea1 remove any reference to 'struct gsm_bts_link' 2010-04-30 14:04:01 +02:00
Holger Hans Peter Freyther a581136f73 [misc] Remove spaces, fix indention. 2010-04-30 13:34:15 +08:00
Holger Hans Peter Freyther a4b446b459 [vty] Free the matched at the end of the routine.
Remove the return from the case labels and cleanup at
the end matched array at the end of the routine.
2010-04-30 13:29:34 +08:00
Holger Hans Peter Freyther f1af306c94 [vty] Plug memory leak on auto completion.
I assume the original code crashed with a double free as we
have a cleanup at the end of the method. Return from the routine
like the case label below. This is fixing a memory leak I am
experimenting.
2010-04-30 13:29:34 +08:00
Holger Hans Peter Freyther 1700c933f2 [vty] Allow to create a buffer in a given context.
Stop using the global vty context for all allocations
and allow to embed the buffer into a given context, and
allocate sub buffers with the context of its parent.
2010-04-30 13:29:34 +08:00
Holger Hans Peter Freyther 9e282de7c8 [vty] Move some allocations into the context of the vty. 2010-04-30 13:29:34 +08:00
Holger Hans Peter Freyther 22ca95cf9a [vty] Remove FIXME as it appears to do the right thing. 2010-04-30 13:29:33 +08:00
Sylvain Munaut 50f81b022f bsc_init: Fix ccch description in SI messages
The previous code just hardcoded RSL_BCCH_CCCH_CONF_1_C, but
we need to inspect the timeslot config to know what to use.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-04-28 22:08:36 +02:00
Holger Hans Peter Freyther f51b9006a1 e1_input: Stop the timer when deleting the signalling link on the TS
Stop the tx_timer when deleting the link on top of that ts. Otherwise
bad things might happen. E.g. when scheduling a write on OML and then
the OML link vanishes...

This is a slight layering violation as there could be more than
one signalling link on the timeslot (at least in theory) so the
queue and the timer should move to the e1inp_sign_link.
2010-04-25 23:13:26 +08:00
Holger Hans Peter Freyther 4ac100ec24 [e1_input] When destroying a link clear all pending messages 2010-04-25 23:13:08 +08:00
Holger Hans Peter Freyther 95c229006e [vty] Allow to set the RACH NM attributes on a per BTS basis
Be able to tune the RACH settings of the BTS via the vty interface,
by default they are initialized to -1 which means we will use the
content of the static array (BTS default) and can be changed via
the VTY interface. I have verified the setting on the nanoBTS with
wireshark and I have tested writing the config file.
2010-04-25 23:08:39 +08:00
Holger Hans Peter Freyther d941edaca2 Merge branch 'on-waves/sccp' 2010-04-25 23:07:24 +08:00
Holger Hans Peter Freyther 277f035dee [sccp] Move from DEBUGP to LOGP in sccp.c 2010-04-25 23:05:00 +08:00
Holger Hans Peter Freyther 2cdda72b3c [sccp] Parse the error message and add a unit test for it. 2010-04-25 23:04:38 +08:00
Holger Hans Peter Freyther 637b4f6b7f Merge branch 'on-waves/mgcp' 2010-04-25 23:03:30 +08:00
Holger Hans Peter Freyther 32d4e50d46 [mgcp] Possible memleak fix for the allowed reallocation case
When allowing to reallocate an allocated endpoint we will need
to free it first. When freeing we will free the call id and other
ids that we would have leaked otherwise.
2010-04-25 23:02:55 +08:00
Holger Hans Peter Freyther dc41755fc7 [mgcp] Add a change callback and send a dummy packet on MDCX.
Send a dummy packet to make sure our Gateway will discover us
and can send the ringtone to us.
2010-04-25 23:02:43 +08:00
Holger Hans Peter Freyther aa9d3ce97a [mgcp] Ignore every dummy packet...
This routine should operate on different packets and the
dummy load is smaller than a legitimate RTP header so it
is unlikely we will filture out genuine traffic.

The reason is the dummy load might be send more than once.
2010-04-25 23:02:27 +08:00
Holger Hans Peter Freyther e3d16bb775 [mgcp] Protocol extension to not generate answers.
For the NAT we want to send requests in a send and forget
way and we are not interested in seeing the answers, so tell
the gateway to not answer them.
2010-04-25 23:02:17 +08:00
Holger Hans Peter Freyther 74076934fb [mgcp] Print a Deleted endpoint message again. 2010-04-25 23:02:05 +08:00
Holger Hans Peter Freyther b844b876ad [mgcp] Add a dummy send method...
This can be used by higher level code to send one dummy
message from the audio port to the network. This can be
used to make the remote discover the nated port of this
endpoint.
2010-04-25 23:01:55 +08:00
Holger Hans Peter Freyther 2fb7ccf95f wireshark: Fix the patches and rebase against a recent wireshark version
My previous attempt to only add the hunks I changed broke the
format of the patch and this time I am just dumping my current
patch on top of these patches.
2010-04-21 20:39:50 +08:00
Harald Welte 38e9c82114 RSL: inmplement ip.access paging load indication 'below threshold'
This is an ip.access specific 08.58 oddity.  It reports 0xffff
available paging buffers if the paging load is below the 12.21
CCCH LOAD INDICATION THRESHOLD.

We use 50, since that is what it reports if the threshold == 0.
2010-04-19 10:29:16 +02:00
Harald Welte 39608dc045 GPRS: Fix calculation of 'Extension Length' in GPRS Cell Options
The actual 'Extension Length' field in the 'GPRS Cell Options' IE
is coded the length - 1, not the full length.  Without this fix,
the code has an off-by-one error.
2010-04-18 22:48:46 +02:00
Harald Welte 5fda90816f GPRS: Indicate the SGSN is Release 99 as this is the first with EDGE 2010-04-18 22:48:41 +02:00
Harald Welte 1803818092 update openbsc.cfg examples for new gprs syntax 2010-04-18 21:33:00 +02:00
Harald Welte 439bb828f9 GPRS: Enable EGPRS coding schemes in Cell Attributes if 'gprs mode egprs' 2010-04-18 21:25:56 +02:00
Harald Welte a06fea020d GPRS: actually enable indicating EDGE capability in SI13 2010-04-18 21:25:56 +02:00
Harald Welte 4511d891dd GPRS: change 'gprs enabled <0-1>' to 'gprs mode (none|gprs|egprs)'
This causes some config file breakage but sounds like a much cleaner
approach than to have two separate config variables for this.
2010-04-18 21:25:56 +02:00
Harald Welte da0586a838 GPRS: Add Support for the GPRS Cell Option Extension Info IE
Extension Information is part of the GPRS Cell Options IE, as
specified in Chapter 12.24 of TS 04.60.  It is needed for
indicating EDGE capabilities of the BTS to the MS.

This simply adds the code to encode this IE as part of SI13,
but does not actually use the code yet.
2010-04-18 21:25:56 +02:00
Harald Welte 2c57232489 add an example config file for nanoBTS multi-trx case 2010-04-18 21:25:18 +02:00
Harald Welte ad9f7830fb update the openbts.cfg.nanobts example 2010-04-18 21:08:26 +02:00
Harald Welte 57ba7e3093 GPRS: BVCI 0 and 1 are not permitted.
According to TS 08.18, BVCI=0 is for the SIGNALLING entity,
and BVCI=1 is for the PTM entity.  Both should not be used
by the PTP entity that we're configuring here.
2010-04-18 14:00:26 +02:00
Harald Welte 6ba3bcbbc6 BVCI 0 is not within the permitted range 2010-04-18 13:59:53 +02:00
Holger Hans Peter Freyther bb110f91e8 [statistics] Keep track of OML/RSL failures of the BTS. 2010-04-17 06:48:43 +02:00
Holger Hans Peter Freyther 3ba36d5b57 [statistics] Keep track of rf failures and rll release failures
Add two new counters to count the RF Failures and the RLL Release
failure and make them available via the vty interface.
2010-04-17 06:48:29 +02:00
Holger Hans Peter Freyther bda581963d Merge branch 'on-waves/mgcp' 2010-04-17 06:46:06 +02:00
Holger Hans Peter Freyther 8d9833ef83 [mgcp] Fix vty file generation for the BSC nat and other cases
The current setting was not properly written out, this commit is
fixing it. This includes indention, empty bts ip, wrong command
for endpoints and the wrong number (+1 as zero is allocated but
unused).
2010-04-17 06:45:08 +02:00
Holger Hans Peter Freyther 2ba40afc36 Add rf_locked to the configuration writing. 2010-04-17 06:42:48 +02:00
Holger Hans Peter Freyther e0ec326867 [vty] Separate BSC and MSC statistics. Make it easy to print them.
Move the statistics command into the MSC part and move the
BSC statistics printing into a subroutine.
2010-04-15 11:28:14 +02:00
Holger Hans Peter Freyther 2d425059af [mgcp] Only write audio_name/payload when it is actually set. 2010-04-15 11:26:35 +02:00
Holger Hans Peter Freyther 135f797a37 [bsc_init] When the RSL/OML connection drops, free all lchans
Free all allocated channels on the TRX that failed, go through
lchan_free to signal higher layers and then force a reset of
the channel. Make the TRX and TS unusable by setting the operational
set to 0 (not really defined) which should be reset once the
RSL is coming up again.
2010-04-15 11:24:53 +02:00
Holger Hans Peter Freyther f8eff2e4b5 [ipa] Fix the reporting of link down...
Now bsc_init.c is able to handle the link down messages.
2010-04-15 11:19:08 +02:00
Holger Hans Peter Freyther 70402a4e4d [ipa] Handle losing the RSL/OML connection..
This is addressing multiple issues regarding the loss of the
OML/RSL link to the BTS.

1.) When we lose the OML link, close down all RSL connections
on all TRXs (only tested with one TRX) and free the e1inp_line
allocated for the OML connection.
2.) When we lose the RSL link on any TRX and we know to which
lines this connection belongs, we will close down the OML connection
as we have a problem to just reactivate one RSL link.
3.) When we lose the RSL link on any TRX and we do not know
where it belongs to we will free the bfd we have allocated in the
rsl listen/accept method and we properly close the socket (i could
not test this one properly). This is made under the assumption
the BTS has not responded to the ID request.
4.) When we already have a bts->oml_link we will throw it away
and use the new link (it should not happen) and the same applies
to the rsl link.
2010-04-15 11:17:24 +02:00
Sylvain Munaut b54dda4cef ipaccess: Send RTP Payload IE for CRCX & MDCX
For GSM V1 FR, the payload type is fixed to 3 in the RFC.
But for the other codecs, the payload type is dynamically assigned
between 96 and 127. Here, we use a static mapping internal to OpenBSC.

This patch is needed to make a rather old 139 unit (with sw version
120a002_v149b42d0) work with something else than FR codec. I also tested
this patch on a newer 139 (with sw version 120a352_v267b22d0) to make
sure it didn't add a regression. More testing with newer EDGE units
should be done by whoever has some of theses.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-04-12 19:58:57 +02:00
Sylvain Munaut b998d7b219 abis_nm: Fix ACTIVATE SW parameters
The previous code only sent the FILE_ID tag data part,
but according to the GSM 12.21 spec, section 8.3.6, the
full SW Description 'object' must be sent so that includes
the NM_ATT_SW_DESCR tag, the whole FILE_ID and the whole
FILE_VERSION (including tags & length fields).

Note that functionnaly on a nanoBTS 139 I couldn't see any
difference ... whatever I send in there it works ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-04-12 19:58:57 +02:00
Holger Hans Peter Freyther 63cb447fd5 Revert "ipa: Reduce the throttling of the IPA msges"
Reducing the throttling to this value created a regression with
bringing up RSL on the nanoBTS 900. We do seem to have a bug/issue
in the bsc_init code and might send a command too early without this
longer wait period and then the state transition does not happen.

For now it is agreed that reverting is the best thing to do.

Debugged-by: Sylvain Munaut <246tnt@gmail.com>

This reverts commit f5284ae1cf.
2010-04-11 10:14:16 +02:00
Holger Hans Peter Freyther 5eec9d91d8 [rsl] Set the right state when asking for the activation.
Set the state to activation to avoid a warning about the
getting a CHAN ACK without waiting for it. We set it in
the code to make sure it is set after all error checking
to avoid inconsistent state as the state is only set back
to NONE/ACT due replies from the BTS.
2010-04-10 00:16:04 +02:00
Holger Hans Peter Freyther 63d18b51a7 [rsl] Set the release state from within the lchan class
Currently our GSM04.11 code is closing the link for SAPI=3
and this would mean that the whole channel would be scheduled
for close... where we only want to close everything when freeing
the lchan or handling an error.
2010-04-10 00:14:55 +02:00