aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/abis_rsl.h
AgeCommit message (Collapse)AuthorFilesLines
2017-03-09Use libvlr in libmsc (large refactoring)Neels Hofmeyr1-1/+0
Original libvlr code is by Harald Welte <laforge@gnumonks.org>, polished and tweaked by Neels Hofmeyr <nhofmeyr@sysmocom.de>. This is a long series of development collapsed in one patch. The original history may still be available as branch neels/vlr_orig. TODO: This commit may be split in several smaller changes before merging to master. Related: OS#1592 Change-Id: I702ba504ce2de93507312c28eca8d11f09f4ee8b
2016-08-27dyn TS: clearly use lchan[0], fixing minor confusionNeels Hofmeyr1-1/+1
The dyn_ts_switchover_*() functions made the impression that they act on a specific lchan of a timeslot. The assumption that we would remember to use e.g. lchan[1] across a PDCH deactivation is brain damaged to begin with; and factually we always use lchan[0] anyway (the only case for using lchan[1] would be when switching to TCH/H, but the channel allocator will always return lchan[0] for that). Instead of the brain damaged lchan args, use a ts arg across all dyn_ts_switchover_*() functions, with one exception: The dyn_ts_switchover_complete() actually receives an RSL activation ack message on a specific lchan and needs to evaluate its lchan type. This will always be lchan[0] as it is now, but we should stick with the lchan the message was sent for. For PDCH, a check to use lchan[0] already existed, when composing the ACT message in rsl_chan_activate_lchan_as_pdch(). Replace with an assertion. Adjust all callers to pass ts instead of lchan. In dyn_ts_switchover_start(), there was a dead code check that jumps to switchover_complete() in case the pchan already matches. This never hits, because we only call dyn_ts_switchover_start() when pchans mismatch. So avoid guessing at passing lchan[0] to dyn_ts_switchover_complete() by not calling it at all but logging an error instead. In rsl_chan_activate_lchan(), we remember some values before going into switchover from PDCH. Explicitly store them in lchan[0], because after a PDCH release we have always and will activate no other than lchan[0]. In dyn_ts_switchover_continue(), move the check for any existing lchan->rqd_ref further above, and more correctly check all lchans that were so far valid on the TS, instead of just one. This partly prepares for a subsequent commit to fix the act_timer use for dyn TS: with the old lchan arg, we might schedule an activation timer on lchan[1] but receive an ack on lchan[0] (for PDCH), leading to an act_timer expiry. Change-Id: I3f5d48a9bdaa49a42a1908d4a03744638c59796a
2016-07-28dyn TS: split dyn_pdch_init() for new dyn type and renameNeels Hofmeyr1-1/+4
Init both TCH/F_PDCH and TCH/F_TCH/H_PDCH via dyn_ts_init(), which refactors dyn_pdch_init(). Make dyn_ts_switchover_start from abis_rsl.c public in abis_rsl.h, so we can start the initial switchover to PDCH from dyn_ts_init(); in abis_rsl.h include gsm_utils.h for enum gsm_phys_chan_config. Change-Id: I5c0b257ba8ff0e9c9a2268681a84b0681a778368
2016-06-14dyn PDCH: send PDCH ACT for each TCH/F_PDCH on TS EnableNeels Hofmeyr1-0/+2
Add dyn_pdch_init() in new file bsc_dyn_pdch.c (new file to avoid linking issues; bsc_init.c would create undefined references, and putting in a new file is the easiest solution). Call dyn_pdch_init() from nm_statechg_event() whenever a TS is enabled. Revert the |= TS_F_PDCH_MODE chunk from previous commit, since this flag will now be set after dyn_pdch_init() sent out the PDCH ACT and when subsequently the PDCH ACT ACK messages are received in rsl_rx_pdch_act_ack(). Change-Id: I0cad93dec59d546b3f3b19e332e0833496031575
2016-04-16Refactor SI-related codeMax1-0/+1
Move define to header file. Use inline functions where appropriate. Change int variables which are used as boolean into actual bool to make code easier to follow.
2015-01-02lchan: Remember why a channel is broken using static stringsHolger Hans Peter Freyther1-0/+1
Remember why a channel is being marked as broken. So we can maybe understand what happend.
2014-12-30Add basic support for CBCH / SMS-CB (Cell Brroadcast)Harald Welte1-1/+2
We can now configure the pyisical channel types for CBCH either in the CCCH+SDCCH4 or in the SDCCH8 chanel combination. Depending on whether a CBCH exists on the BTS, we also generate the SI4 with matching CBCH channel description to notify the phones of the existance of the CBCH. There is now a VTY command how a SMS-CB message can be sent to a given BTS. We do not yet have any logic at all for actual scheduling of multiple CBCH RSL messages towards one or multiple BTSs yet, though.
2014-08-04dyn PDCH: Cleanup of rsl_chan_activate_lchan() and usersAndreas Eversberg1-1/+1
Timing advance is stored inside lchan structure, so it is removed from arguments. This is useful, if other actions are required prior calling rsl_chan_activate_lchan. (like deactivating PDCH first) The "shifted TA value" that is required by BS11 is now calculated inside rsl_chan_activate_lchan and not by each user. [Rebased by Holger. So some hunks were skipped as the patch depended on Jolly's HO code]
2012-12-26gsm: Do not attempt to release SAPI=0 if it was never allocatedHolger Hans Peter Freyther1-0/+2
In case of handover (but probably on RACH) we would send a RLL for SAPI=0 even if this SAPI was never established. After we have released all SAPI>0 locally check that SAPI=0 is established and if not release the rf channel directly.
2012-12-23lchan: Introduce T3109 handling for the release procedureHolger Hans Peter Freyther1-0/+1
T3109 is started when the SACCH is deactivated. It is stopped when the phones sends the DISC/UA/UM on LAPDm for the main signalling link. In case of timeout the abnormal release procedure will be initiated. Make sure to not issue the SACCH Deactivate twice to avoid confusing the equipment. This is still not fully spec compliant. In case of a timeout the abnormal release handling will be started which involves starting T3111+2. The error handling should be split out of the rf channel release method, e.g. lchan_release should be called and check if the channel release was already initiated.
2012-12-23lchan: Release the lchan more quickly, align with GSM 04.08Holger Hans Peter Freyther1-1/+4
* Release all channels with SAPI > 0 with the "local end release" (as of NOTE 1 of GSM 04.08). * No need to wait for all SAPIs to be torn down and the normal REL_IND/REL_CONF will call rsl_handle_release and the channel should be released. * Update the documentation
2012-12-23rsl: Rename the reason to release_mode and use the enum valueHolger Hans Peter Freyther1-1/+2
The API with 0 and 1 as legal values is hard to understand. Use the recently introduced enum values instead.
2012-01-17rsl: This is provided by libosmo-abis, remove it hereHolger Hans Peter Freyther1-1/+0
2011-08-10Initial version of Support for Nokia *Site BTSDieter Spaar1-0/+7
This includes the MetroSite, but also other Nokia BTS models.
2011-06-26move gsm 05.02 related calculations into libosmocoreHarald Welte1-3/+0
2011-06-26use new gsm48_number_of_paging_subchannels from libosmocoreHarald Welte1-1/+0
2011-06-25move {ts,lchan}2chan_nr() functions to gsm_data_shared.cHarald Welte1-1/+0
... this way osmo-bts can use them
2011-04-18misc: Move from u_int to uint types of stdint.hHolger Hans Peter Freyther1-25/+25
This was done with sed on the files.
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-2/+2
libosmogsm is a new library that is distributed in the libosmocore. Now, openbsc depends on it. This patch gets openbsc with this change. This patch also rewrites all include path to the new osmocom/[gsm|core] Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-01-13RSL: add code to generate SACCH INFO MODIFY commandHarald Welte1-0/+3
SACCH INFO MODIFY is intended to modify the SACCH content for a single logical channel (as opposed to the default SACCH FILLING)
2011-01-06misc: Forward declare the struct gsm_bts_trx_ts to avoid warning.Holger Hans Peter Freyther1-0/+1
2011-01-01License change: We are now AGPLv3+ instead of GPLv2+Harald Welte1-6/+5
The reason for this is quite simple: We want to make sure anyone running a customized version of OpenBSC to operate a network will have to release all custom modifiations to the source code.
2010-12-23Dynamic PDCH: rsl_ipacc_pdch_activate() operates on a timeslotHarald Welte1-1/+1
... not on the lchan.
2010-12-22rsl: Remove unimplemented/unused rsl_paging_cmd_subscrHolger Hans Peter Freyther1-2/+0
RSL should not know the details of a GSM Subscriber anyway.
2010-12-01include: Add proper predeclaration for struct in abis_rsl.hSylvain Munaut1-0/+5
We use them, so declare them. (avoid including all gsm_data.h) Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-31chan_alloc: Change Channel Release to release SAPIs, then the channelHolger Hans Peter Freyther1-0/+1
Currently every SAPI release indication will trigger the channel. It was possible that we had SAPI=3 and SAPI=0 allocated and we tried to release the channel by sending a RF Channel Release, the BTS answered with a RF Channel Release ACK but also sent the SAPI Release Indication which triggered a channel release here. So it was possible that we would have released a newly allocated channel because of the SAPI release of the old connection. This code now works by releasing all SAPIs from highest to lowest, then sending a SACH Deactivate and finally releasing the channel. This approach is in use on the on-waves/bsc-master.
2010-07-23rsl: Add method to send a SMSCB inside a SMS BROADCAST COMMANDHolger Hans Peter Freyther1-0/+4
* Untested code for sending the SMS BROADCAST COMMAND.
2010-06-08abis_rsl: Allow to specify the release mode for a given channel.Holger Hans Peter Freyther1-1/+1
This can be used by handover, early assignment to indicate the close of the old channel...
2010-04-10[rsl] Introduce a method to set the state of the lchanHolger Hans Peter Freyther1-0/+2
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[rsl] Remove method that is not called by anything.Holger Hans Peter Freyther1-1/+0
2010-03-28RSL: keep track of ip.access dynamic TCH/PDCH activationHarald Welte1-1/+1
We use the (currently unusued) flags member of the bts_trx_ts structure to track if a dynamic TCH/PDCH is currently on PDCH mode or not.
2010-02-20move GSM protocol definitions to include/osmocore/protocol/*Harald Welte1-481/+1
2010-02-20split 'libosmocore' from openbsc codebaseHarald Welte1-1/+1
This library is intended to collect all generic/common funcitionality of all Osmocom.org projects, including OpenBSC but also OsmocomBB The library currently includes the following modules: bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer, tlv_parse, linuxlist msgb allocation error debugging had to be temporarily disabled as it depends on 'debug.c' functionality which at the moment remains in OpenBSC
2009-12-20rename ipacc_connect_proxy_bind() to rsl_ipacc_mdcx_to_rtpsock()Harald Welte1-0/+1
Our RTP sockets are no longer just for the proxy mode, so having "proxy" in the function name is really misleading.
2009-12-19ip.access: Keep a full copy of local and remote IP/PORT in lchanHarald Welte1-2/+1
Keeping all parameters for each RTP connection in the abis_ip member of lchan will help us with actual TCH handover later on.
2009-12-17[handover] first functional handover implementationHarald Welte1-1/+1
With this commit, we can successfully hand over a channel from one cell to another cell. We implement asynchronous intra-BSC (but inter-BTS) handover. Changes: * introduce new DHO log category * extend rsl_chan_activate_lchan() with argument for HO reference * introduce actual minimal handover decision making in handover_decision.c * various fixes to bsc_handover_start() in handover_logic.c
2009-12-09mark lchan2chan_nr() using a 'const' parameterHarald Welte1-1/+1
which fixes some compile warnings at some callers.
2009-11-19[ipa] Change names of RTP methods to follow MGCP namingHolger Hans Peter Freyther1-14/+14
IPA is naming these functions CRCX, MDCX, DLCX to follow the naming of the MediaGatewayControlProtocol. Change the code to go from BIND to CRCX (create connection) and from CONNECT to MDCX (modify connection). Connect indicates that it is only possible to call it once while it is possible to call it more than once to modify the audio parmaters and such. So the IPA terminology is making a bit more sense here (now that we know it).
2009-10-24[GPRS] Add RSL function for ip.access PDCH activationHarald Welte1-0/+1
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-08-30A5 support for RSL and 04.08 (not used yet)Harald Welte1-0/+1
This just adds the 04.08 and RSL bits for A5, but not the logic for performing authentication. The caller would first set lchan->encr and then call gsm48_send_rr_ciph_mode(lchan), which encapsulates the 04.08 CIPHERING MODE COMMAND into a RSL ENCRYPTION COMMAND and sends it to the BTS for execution + forwarding.
2009-08-10siemens vendor specific message type and IE definitionsHarald Welte1-0/+22
2009-08-10make rsl_siemens_mrpci() use struct rsl_mrpciHarald Welte1-1/+1
2009-08-10Add function to generate siemens-specific MRPCI RSL messageHarald Welte1-1/+33
MRPCI (MS RF Power Indicator) informs the BTS about the power capabilities of the MS.
2009-08-10misc: Add prototypes to header files, include more header filesHolger Hans Peter Freyther1-0/+1
Fix various warnings about implicit declarations of functions.
2009-08-09Add new BSC RLL layer of codeHarald Welte1-0/+1
A caller can call rll_establish(lchan, link_id) and a callback to the GSM RLL code. He will get called back if the RLL link is established or receives some error message, or the establishment times out. We need this for proper SMS implementation, where we need to restablish a SAPI3 RLL link before transmitting the actual CP-DATA messages.
2009-08-08start using the RLL RELEASE proceduresHarald Welte1-0/+1
So far, we immediately disable the RF channel without following a proper RLL RELEASE procedure. This patch changes this. If we locally terminate the connection, the channel allocator now triggers a RLL RELEASE REQuest, which is responsed by the MS with a RLL RELEASE CONFirm, based on which we send the RF CHANnel RELease to the BTS. If the MS terminates the connection, we receive a RLL RELEASE INDication, based on which we trigger RF CHANnel RELease to the BTS.
2009-08-04parse and decode Siemens specific T_MSRFPCI messageHarald Welte1-0/+1
2009-07-29generalize channel activation / channel mode modifyHarald Welte1-4/+11
* we only need one piece of code to calculate rsl_ie_chan_mode from our run-time data structures (gsm_lchan) * add some more channel modes for TCH/H and data * use enum's to make the compiler warn us about unhandled enum values * make sure the caller determines the (signalling,speech,data) mode
2009-07-28implement human-readable RSL cause printingHarald Welte1-2/+10
2009-07-19send DEACTIVATE SACCH when sending RR CHANEL RELEASEHarald Welte1-0/+1
As per specification, we first send the RR CHANNEL RELEASE to the MS, and then tell the BTS to disable the SACCH on that channel.