aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/oml.c
AgeCommit message (Collapse)AuthorFilesLines
2016-09-02sysmo: Fix build error for sysmobts targetnrw/litecell15-merge-and-rebaseMinh-Quang Nguyen1-1/+4
Change-Id: I29e9bf8db483376cdf5084658a738f1589622e53
2016-09-02LC15: Implementation of TS 12.21 measurement related messages to measure PCU KPIMinh-Quang Nguyen1-0/+344
Change-Id: I352600f964e6c161b9259c62f2e0a0f39f0f60d9
2016-09-02LC15: Allow BTS to forward PCU failure alarms to networkMinh-Quang Nguyen1-0/+8
Change-Id: I39bb8f8b749e94394909aa4a4be000c306ed712a
2016-09-02LC15: Implementation of major BTS alarmsMinh-Quang Nguyen1-0/+299
Change-Id: Ic4e088a3af115d3d5a124b61c1e92eed277d3469
2016-07-25dyn TS: common TCH/F_TCH/H_PDCH implementationNeels Hofmeyr1-0/+9
common/l1sap: For dyn TS, the BSC will issue RSL Chan Activ requests with a non-standard chan_nr. While the rest of the code now understands that, the L1 phy will not. Translate to standard PDCH (== TCH/F). common/oml: use dyn TS' current pchan mode for lchans config. common/pcu_sock: detect desired PDCH mode of dyn TS. common/rsl: implement reconnection chain of a TS for changing its pchan: * rsl_rx_chan_activ(): ** Add dyn_pchan_from_chan_nr() to derive the requested pchan from the RSL chan_nr IE. ** Notice the need for a pchan change and invoke dyn_ts_l1_reconnect() (s.b.) ** Make Chan Mode IE presence optional, because the non-standard PDCH activation message is simpler and does not require it. ** Do PDCH activation via PCU. * Add dyn_ts_l1_reconnect(): store state and disconnect the L1 channel; then wait for cb_ts_disconnected(). * Add osmo_dyn_ts_disconnected() to cb_ts_disconnected(): verify state and connect with the new pchan type; then wait for cb_ts_connected(). * Add osmo_dyn_ts_connected() to cb_ts_connected(), which re-issues the cached chan activation message from before disconnecting the L1 channel. * Also send an rf chan rel/act ack for dyn TS upon PDCH de/act via PCU. * Add dyn_ts_pdch_release(): on channel release of a dyn TS in PDCH mode, release via the PCU. Call from rsl_rx_rd_chan_rel(). Change-Id: I463bb6b4e57674f091c3badba9257374961c52c7
2016-07-25prepare dyn TS: split/replace conf_lchans_for_pchan()Neels Hofmeyr1-4/+11
Move the actual switch from static conf_lchans_for_pchan() into new 'public' function conf_lchans_as_pchan(), adding an explicit pchan argument. This allows passing a non-trivial pchan, for dynamic TS. conf_lchans_as_pchan() now takes a pchan argument, so distinguish the naming and drop the 'for_pchan' from conf_lchans_for_pchan(), which takes only a ts argument. Change-Id: I8e458501fff5503c243512aeb3469c12b1f2bbc4
2016-07-25cosmetic: clarify TCH/F_PDCH related naming and commentsNeels Hofmeyr1-0/+1
We're about to introduce a new kind of dynamic channel, which will also use parts of the ip.access mode dyn PDCH code paths. Make sure the general parts have general names and mark ip.access specific parts as such. Rename dyn_pdch_ts_[dis]connected() to cb_ts_[dis]connected(). Rename dyn_pdch_complete to ipacc_dyn_pdch_complete(). From cb_ts_[dis]connected(), factor out the current code into static functions ipacc_dyn_pdch_[dis]connected() -- this will make sense once the new dynamic kind is added to cb_ts_[dis]connected(). Change-Id: I7da5b7cb7b48572671f50e0dec97d9eec3083df1
2016-06-17dyn PDCH: conf_lchans_for_pchan(): handle TCH/F_PDCHNeels Hofmeyr1-3/+8
Depending on the PDCH active flag, handle a TCH/F_PDCH like TCH/F or PDCH. Change-Id: Ifc5561f8e2db172bb692ba26bdeae2fd675d6ec5
2016-06-17oml, Set Chan Attr: treat unknown PCHAN types as errorNeels Hofmeyr1-3/+9
Change-Id: Id79585993df15362ba0e1271d03302597182ceff
2016-02-03Revert "oml: temporary debug hack"Harald Welte1-6/+0
This reverts commit c623c4e589d887f8ba779a03543213d55b6d82f4. That's a commit from 2012, and it was never needed ever since.
2016-01-25OML: Ignore T200 settings by BSC for nowHarald Welte1-3/+18
It seems that once we start to respect the T200 values as specified by the BSC, we run into all kinds of issues with LAPDm re-transmissions, REJ frames, unexpected supervisory frames and the like. The libosmogsm LAPDm T200 defaults of 1s/2s are proven to "work" (i.e. not expose the above behavior), so let's revert to them until the root cause of this problem is determined.
2016-01-25lapdm: Add DEBUGP statement about T200 values being set for lchanHarald Welte1-0/+4
2016-01-25Fix T200 default valuesHarald Welte1-7/+7
The T200 default values should be in milli-seconds (as the variable name indicates). They are not expected to be divided by the TS 12.21 OML dividers for T200. This change doesn't really make a difference with OpenBSC, as the BSC always sets its own T200 values via OML, overwriting the defaults here.
2016-01-22ABIS: Support for multiple RSL connectionsAndreas Eversberg1-1/+2
2016-01-17Fix T200 default valuesHarald Welte1-1/+1
t200_ms is an unsigned int [7] array, while the oml_default_t200_ms was an uint8_t[7] array, which we memcpy() to the former as default initializer. Fix this by turning oml_default_t200_ms into unsigned int, too.
2016-01-16LAPDm: Use T200 settings from OML rather than libosmocore defaultsHarald Welte1-1/+59
2015-09-22Fix: Retrieve ARFCN (from OML) for TRX other than C0Andreas Eversberg1-0/+19
2014-12-30Initial CBCH supportHarald Welte1-2/+16
This should handle OML channel combinations with CBCH and activate the CBCH SAPI towards the DSP correspondingly. What is still missing is sending any actual information over the CBCH in respons to the PH-RTS.ind coming up from L1.
2014-08-18TLVP_PRES_LEN is now in libosmocore, avoid redefining itHarald Welte1-0/+2
2014-08-18replace oml_{osmo,ipa}_magic[] with abis_nm_{osmo,ipa}_magicHarald Welte1-8/+4
the latter is now in libosmogsm.
2014-07-31sysmobts: Verify the structure of IPA and OML messagesHolger Hans Peter Freyther1-5/+7
Extend the router to verify that the message received is properly encoded. The code can deal with the basic structure of ETSI OML and vendor specific messages for ip.access and the osmocom project.
2014-04-03oml: Pass all valid state change requests to the modelJacob Erlbeck1-5/+4
Currently ADM state change request that tries to set the administrative state to the current value are immediately ACK'ed. Beside the caching problem, this could lead the protocol inconsistencies if two such requests are sent one after the other and the second arrives before the procedure of the first has finished. This patch removes the shortcut in oml_rx_chg_adm_state() which immediately called oml_mo_statechg_ack(mo). Ticket: OW#1132 Sponsored-by: On-Waves ehf
2014-03-26oml: Indicate the kind of object passed as the void*Holger Hans Peter Freyther1-3/+3
These routines do not pass the gsm_abis_mo and parsing the FOM header of the msg does not seem to be a good idea either. Pass in the OML object so that the model code can determine what the void pointer is.
2014-03-10handover: Set basic values for handover, remember the activation reasonAndreas Eversberg1-2/+9
Introduce the handover.h/handover.c and initialize handover parameters in OML and remember the activation through RSL.
2014-01-21common/oml.c: Send OML NACK if bts_model_check_oml() returns negativeHarald Welte1-6/+4
This way, bts_model_check_oml() can return a negated NM_NACK_* constant which will then be sent as cause value in the corresponding SET_ATTR_NACK back to the BSC.
2013-11-05sysmobts: Do a RF mute when Radio Carrier is lockedJacob Erlbeck1-0/+5
Currently a Change Administrative State Request is just applied unconditionally to the object's state object and then acknowledged. This patch implements the special handling of setting the Radio Carriers state to LOCK or UNLOCK. This is done by passing the appropriate mute command to the L1 layer. Always all radio channels are affected, it is not possible to lock single radio channels. On success, an ACK is sent back to the bsc with the new state (based on the state passed in the callback by the L1 layer). If something went wrong or the firmware doesn't support RF mute, a NACK (REQ_NOT_GRANTED) is sent instead. Note that a NACK for such a request hasn't been sent by the BTS to the BSC yet, so (albeit it's spec conformant to do so) the BSC must be prepared to handle this correctly. Ticket: OW#976 Sponsored-by: On-Waves ehf
2013-10-06abis: Use OML remote (BSC) address if RSL CONNECT contains no IPHarald Welte1-2/+1
This introduces a new get_signlink_remote_ip() function whcih we also use in the RSL code to determine the RTP remote address if the CRCX/MDCX contains no remote IP address IE.
2013-10-06migrate away from our own abis.c code to libosmoabisHarald Welte1-11/+6
libosmoabis has a BTS-side implementation of the IPA protocol for years, and osmo-bts should have used that all the time. Unfortunately it had its own local hack, this patch is migrating to the libosmocore implementation.
2013-07-16oml: Remove the unused nofh variable from oml_mo_tx_sw_act_repHolger Hans Peter Freyther1-3/+1
The variable was assigned but nothing was done with it, just remove it for now. Fixes: Coverity CID 1040758
2013-06-30make oml_mo_state_init() a void functionHarald Welte1-1/+1
... so we don't get warnings about not returning anything
2013-06-30Don't send OML STATE CHANGE before OML is connectedHarald Welte1-0/+7
Instead of calling oml_mo_state_chg() [which transmits OML STATE CHG] during bts_init(), we use a new oml_mo_state_init() function which simply sets the state.
2013-03-15Fix: Stop RADIO LINK TIMEOUT couter S from counting, if it has reached 0Andreas Eversberg1-3/+9
In case that the counter S reached 0, it will stay 0. Subsequent received good and bad SACCH frames must not cause to trigger radio link failure again. Once the BSC has been indicated about link failure, it will release channel. The counting of S has been moved to a seperate function. This patch will ensure that the link failure is indicated only once. But even if the link failure would be sent multiple times, the BSC should ignore it. The BSC releases the channel and may only reuse it after confirm from BTS. (There cannot be any link failure indications after confirm of channel release.) The allowed timeout value range is 4..64, as defined in TS 05.08, so if the BSC sends an attribute with value out of range or other failure criterion, the Set BTS Attributes message is NACKed.
2013-03-14OML: fix broken curly braces while parsing SET BTS ATTRHarald Welte1-1/+2
Looking at the problem, it's a surprise that the old code was working at all... (Thanks to jolly for pointing this out)
2013-03-11Added radio link timeout procedure according to TS 05.08 Chapter 5.2Andreas Eversberg1-1/+8
Chapter 5.2 applies to MS procedure, but 5.3 (BSS procedure) defines no exact criterion, so I decided to use the procedure equivalent to MS. The criterion is based on a counter S, which is initialized to a preset RADIO_LINK_TIMEOUT, which can be configured via VTY. Whenever a received SACCH block is bad, S is counted down by one. If SACCH block is successfully decoded, S is counted up by two, but never above initial RADIO_LINK_TIMEOUT value. If S reaches 0, an RSL Connection Failure Indication with cause RF Radio Link Failure is sent to BSC, which then aborts channel. Use link timeout value from BSC via OML attribute. How to test: - Set "debug" for "meas" logging. - Start silent call to an attached mobile. - Remove battery from mobile or shield mobile. - Watch S count down.
2012-11-20Use tlvp_val16_unal() / tlvp_val32_unal() to align 16 and 32 bit valuesAndreas Eversberg1-26/+32
This is required for CPUs < armv6, to access 16 and 32 values at right memory locations.
2012-10-04OML: TA is a 8bit value, not 16bitHarald Welte1-4/+2
... as jolly correctly pointed out.
2012-07-11OML: add missing ntohs() for UL/DL_TBF_EXTHarald Welte1-2/+2
Thanks to Andreas for spotting this.
2012-07-08signal: Add signals for setting/change of GPRS MO attributesAndreas Eversberg1-0/+8
2012-07-08Fixes for handling of GPRS NSE/NSVC/CELL MOAndreas Eversberg1-5/+8
2012-06-28Add 12.21 handling for GPRS NSE/NSVC/CELL MOHarald Welte1-0/+162
We now bring the GPRS related MO up in DEPENDENCY state and parse the various NS, BSSGP and RLC parameters as set by the BSC via 12.21/OML.
2012-04-19add a VTY command for activating PDCH channels (in EGPRS mode)Harald Welte1-0/+4
This allows us to do RF measurements (EDGE EVM and the like) even without having any PCU/RLC/MAC code as of now. To use it, configure PDCH type timeslots (e.g. TS 7) in the BSC and then use "trx 0 7 activate 0" to manually activate the PDTCH lchan on top of that timeslot. The BTS will now happily transmit EDGE/8PSK data.
2012-04-12misc: Fix compiler warning about printing a ptrdiffHolger Hans Peter Freyther1-1/+1
Use 't' modifier for pointer diff in the printf statement. oml.c: In function ‘oml_rx_set_bts_attr’: oml.c:403:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 9 has type ‘int’ [-Wformat]
2012-04-05oml: temporary debug hackHarald Welte1-1/+6
2012-03-18Ensure that ADM_STATE IE is presnent when sending NM_MT_CHG_ADM_STATE_ACKHarald Welte1-1/+14
2012-03-15OML: when allocating merged tlvp arrays for MO, use bts contextHarald Welte1-1/+1
'ts' is not a talloc-managed pointer but an offset into the bts structure. As such, we cannot pass it to talloc as context!
2012-01-23misc: Check return value of msgb _alloc functionsHolger Hans Peter Freyther1-1/+5
Attempt to catch all functions that allocate a msgb and didn't check the return value of the allocation.
2012-01-14oml: Use talloc_free(ptr) instead of talloc_free(ptr_to_ptr)Holger Hans Peter Freyther1-1/+1
tp_merged points to memory allocated by talloc_zero, no need to hand the address of that to talloc itself.
2012-01-14OML SET CHAN ATTR: merge TS attributes (not BTS) and fix mem leakHarald Welte1-1/+5
We have to * merge the new attributes with the exiting TS (not BTS) attributes * in case of success, attach the new merged attributes to our state * in case of success, free the old attributes Thanks to Holger for pointing this out.
2011-11-07common: Include bts.h for bts_shutdownHolger Hans Peter Freyther1-0/+1
2011-09-09OML: make sure max_power_red is scaled by 2 to convert from 12.21 to dBmHarald Welte1-2/+3