Commit Graph

1845 Commits

Author SHA1 Message Date
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 ba6172a7fd gsm0808: Port asiggnment_complete msg creation to libosmocore. 2010-04-17 06:21:49 +02:00
Holger Hans Peter Freyther 81716d5fa8 gsm0808: Port cipher_complete to be part of libosmocore. 2010-04-17 06:16:35 +02:00
Holger Hans Peter Freyther 7daa01c434 gsm0808: Add the TLV definition for some of the 0808 IEs 2010-04-17 05:14:36 +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
Holger Hans Peter Freyther 280cd5153f Add GSM0808 utilities to Osmocore.
The code is coming from the on-waves/bsc-master branch.
2010-04-15 10:10:39 +02:00
Holger Hans Peter Freyther 2c86c2a726 gsm_08_08.h: Remove OpenBSC include file from the header. 2010-04-15 10:01:39 +02:00
Holger Hans Peter Freyther ebaed74e17 Add GSM08.08 protocol header.
This header is copied from bssap.h of the on-waves/bsc-master
branch and only contains the protocol specific information.
2010-04-15 03:14:51 +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 23ba4747d1 select.c: Make the ugly hacker uglier...
Right now I'm seeing crashes when removing a link and deleting
it and I need this hack to make it not crash. We will have to
understand if llist_for_each_entry_safe has a bug or if we are
doing something bad with the list (anchors not properly initialized).
2010-04-11 17:34:52 +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
Holger Hans Peter Freyther 74419497fc [rsl] Introduce a method to set the state of the lchan
Setting the state through a dedicated method allows us to
track the state transitions and check if they are done in
a proper way.
2010-04-10 00:13:53 +02:00
Holger Hans Peter Freyther ccfd572647 [rsl] Remove method that is not called by anything. 2010-04-10 00:11:17 +02:00
Holger Hans Peter Freyther 07ba16fe03 [vty] Remove unused variables due them only being used in the layer3
I moved the extra code to the layer3 VTY implementation but didn't
remove the variables while doign so, silent compiler warnings.
2010-04-10 00:08:59 +02:00
Holger Hans Peter Freyther e1ffc08f72 [vty] Forward declare the extra init function the base is calling 2010-04-10 00:08:28 +02:00
Holger Hans Peter Freyther ef8117883b [paging] Include chan_alloc.h to silence a compiler warning
paging.c:259: warning: implicit declaration of function ‘trx_is_usable’
2010-04-10 00:06:17 +02:00
Holger Hans Peter Freyther ae80f9291a Return anything from append_lsa_params. 2010-04-10 00:05:16 +02:00
Holger Hans Peter Freyther 1469600b0d [paging] Start with a smaller paging limit...
The value 20 is just a random number and it really depends
on the number of TRX on a bts to be a sane or insane limit.
2010-04-10 00:01:03 +02:00
Holger Hans Peter Freyther c50b836540 [paging] Move code to use LOGP and print some more information 2010-04-10 00:00:51 +02:00
Holger Hans Peter Freyther 754e801826 [paging] Simplify the last request and treat llist as a queue
The current code was overly complex. It tried to iterate over
the list in a round robin and we had to keep track of the last
element, see if we remove that one, check if the list becomes
empty... This can all replaced by treating the double linked
list as a queue. We take the item at the front, do something
on it and then and then put it back to the list at the end.
2010-04-10 00:00:15 +02:00
Holger Hans Peter Freyther 19722d4411 paging: Avoid integer underflow on ipaccess
On the nanoBTS we do not receive any load indication for the
paging channel and we just decrement our available slots and
the unsigned int wraps to the maximum value. Together with a
not yet understood bug this makes us go amock.

For the nanoBTS and even the Siemens BS11 resetting the load
to 20 after two seconds should be just fine. For the nanoBTS
we would need to reset the 20 a lot more earlier but we need
to take a look at how often we run low.
2010-04-09 23:59:52 +02:00
Holger Hans Peter Freyther 5615b982c2 [mgcp] Improve the endpoint display on the vty..
Make sure one understands the two values for number of
incoming packets..
2010-04-09 23:53:08 +02:00
Holger Hans Peter Freyther aff596b8e1 [mgcp] Print the IP addr of the BTS we have detected. 2010-04-09 23:53:00 +02:00
Harald Welte 163d0ea85b remove references to u_int*_t and use uint*_t instead 2010-04-09 07:57:40 +02:00
Andreas Eversberg 1ef041ff1e gsm48: introduce MM_CONNECTION_PEND state 2010-04-09 07:52:12 +02:00
Harald Welte b1ac2b96f8 gsm48-ie.c: Fix year in copyright message 2010-04-09 07:51:03 +02:00
Holger Hans Peter Freyther 07d838a3bf [paging] Do not use request after it was was destroyed..
Increment the counter before we call the remove request
which is freeing the request...
2010-04-08 17:10:37 +02:00
Holger Hans Peter Freyther 4052c811a9 write_queue: Add callback for exceptions as well. 2010-04-08 10:58:20 +02:00