aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-11-29libbsc/pcu_sock.c: pcu_tx_info_ind allow to use TRX not starting from 0laforge/rbs2000Alexander Couzens1-1/+1
It would prevent using only e.g. TRX 1 when TRX 0 is disabled. Change-Id: I68dc5e837bd2a3602f7875063c85da4082196274
2016-11-29libbsc: enable pcu_direct to flag PCU_IF_FLAG_SYSMOAlexander Couzens1-1/+1
The use of PCU_IF_FLAG_SYSMO enable the PCU to use DIRECT_PHY code path Change-Id: I1f5407264fc4f209456ffcb73d7853ff315aab86
2016-11-28libbsc: add chreq type for CHREQ_T_PDCH_ONE_PHASE & CHREQ_T_PDCH_TWO_PHASEAlexander Couzens2-4/+16
When using a BSC located PCU the BSC must understand PDCH requests. Change-Id: Ie7f4ed000cf1b40d269873cf0ddf5ff9f5bbc18a
2016-11-21pcu_sock: Send non-NULL hLayer1 to PCUHarald Welte1-0/+1
The BSC-located PCU case looks to the PCU like a BTS-located PCU with "direct PHY" access, i.e. the data related primitives are communicated from the PCU directly towards the TRAU Frames or whatever transport method is used between CCU and PCU. In order to make the PCU believe that, we need to pass in a 'layer 1 handle'. As we don't use it, we can just pass any non-zero value and be happy. Change-Id: I8170bd4134904702b6b272e496100361ba473cbc
2016-11-17pcu_sock: Forward paging request from PCU via RSL to BTSHarald Welte1-9/+45
Change-Id: I28bf0995699618f3f5fa15fc8e1733beddfc482f
2016-11-17RBS2000 RSL: Support for sending RSL PAGING CMD for GPRSHarald Welte3-3/+9
Change-Id: I66541f9b20e7fd67fbec329283fc3c821c970a56
2016-11-17pcu_if: remove function to transmit RTS requestHarald Welte2-34/+0
The BSC will never be in charge of sending RTS requests to the PCU. Change-Id: I3473f47eaa686375a39e3e49cfdfadf1f238106f
2016-11-17pcu_sock: get rid of magic numbers and use ARRAY_SIZE() for array iterationHarald Welte1-3/+3
Change-Id: I602b581fab67b3a1c3c03c73a3a99e9afd564e29
2016-11-17pcu_sock: Don't re-implement core functionality like gsm_bts_trx_num()Harald Welte1-16/+4
Change-Id: I5ea506c8240dac124ccf5522d02ba18e4f0cb90d
2016-11-17pcu_if: make pcu_connected() privateHarald Welte3-20/+19
Code like RSL shoudln't have to worry about whether a PCU is connected or not. Hide this behind the API. Change-Id: I9583d2e9b2742516a7e7ca28b045402018ee3a31
2016-11-17HACK: re-activate dynamic PDCH after activation failureHarald Welte1-2/+8
Change-Id: Iaa6ace3da2439610e12804bdd1b3186c1d269be6
2016-11-17WIP: PCU interface integration into BSCHarald Welte9-157/+192
This still has plenty of details to be ironed out. Change-Id: I44c8d84e5fb240af605483312dd5d1f86adbf758
2016-11-17pcu_if: original pcu sock interface from osmo-btsPhilipp3-0/+1101
The pcu interface required to support bsc co-located pcu uses pcu_sock.c and its related header files as a starting point. See also: osmo-bts.git: ced9a5d0e2c7e3371760f1c07df7b41cfe7ab71d Change-Id: I46b0a65f1633c40053d43b57b786b042f20f12bd
2016-11-16RBS2000: Add the P-GSL Timer IE to RSL CHAN ACT for PDCHHarald Welte1-0/+7
This seems to be mandatory when an Ericsson RBS2000 uses a SuperChannel as back-haul. Change-Id: I793e7d62df1ca9f9c38d39e22d3868064d446c8d
2016-11-16OM2000: Send ALTCRQ for SuperChannel after receiving IS Enable Req AckHarald Welte3-0/+32
When the BTS is configured to use a SuperChannel and it is using a unix domain socket based transport towards the L2TP daemon, then we must instruct the L2TP daemon to instruct the SIU to change the Abis Lower Transport Mode using the ALTCRQ / ALTCRP L2TP signalling. Change-Id: I672bfaa09c42fbeb0c8459f24b2222b952de954b
2016-11-16OM2000: Change the order of MO initializationHarald Welte1-16/+17
So far: CF-IS-CON-TF Now: CF-TF-CON-IS Change-Id: I8efd9bafdcf9504d2e5fc85c44c708fa53f4dff8
2016-11-16OM2000: Add FIXME comments for missing resolving of RX/TX MO!Harald Welte1-0/+2
Change-Id: I45708df724c5fc3316eca6bd2ac2c0738b19a45b
2016-11-16HACK: Don't require TRX numbers to start at 0Harald Welte3-56/+50
Change-Id: I6c5fcb06bdbe0377e2ebc46ecd73d11e834a6d99
2016-11-16unixsocket: include UNIXSOCKET into sabmAlexander Couzens1-2/+4
Change-Id: If98c037119142cc33b46ab5c1bf02d4cda81c81e
2016-11-16OM2000: Fix missing dynamic TCH initializationHarald Welte1-0/+12
When OM2000 has confirmed that a TS is started, call dyn_ts_init() on the timeslot to start the processing for fully dynamic (osmocom style) TCH/F_TCH/H_PDCH. This should in turn trigger the activation of idle timeslots as PDCH until we want to allocate any of them for TCH/F or TCH/H. Change-Id: I1a1fd61d6afd85449cacad4bacfb830252dab6b1
2016-11-16OM2000: Add three IEs to TCH activation about which we have no clueHarald Welte1-0/+4
Change-Id: Ie3067606033e894c558659ddf0025d01b8198cf9
2016-11-16rsl: support for ericssons propritary SI13 formatPhilipp1-2/+11
Ericsson has introduced a propritary format to issue the S13 BCCH information. Normally the system info type field for SI13 would be encoded as 0x28. Ericsson encodes that field as 0x02 and ads a bcch mapping parameter, (IEI=F2) This patch sets the BCCH mapping to 0x00 (=BCCH Normal) statically (0xF200) The new constands are added to libosmocore, see commit: f0f9c8c29daaefbf9cff19177ade4a13ffb2e36c Change-Id: Ie0900f9b810744172b3090ce1b0ef7b7a1132946
2016-11-16OM2000: Fixup based on Coverity Scan suggestionPhilipp1-2/+2
This commit fixes Coverity Scan defect: CID 151901: Insecure data handling (TAINTED_SCALAR) Passing tainted variable "tag_len" to a tainted sink. Change-Id: Ic71ed6a3bbb228bc03e95bfc4a6f5fe09cf5a021
2016-11-16rbs2000: Add missing bts feature definitionsPhilipp1-0/+2
function bts_model_rbs2k_start() in bts_ericsson_rbs2000.c lacks the feature definition for GPRS and EGPRS. Change-Id: I777a67862084aa6cca39cfc43f5708e47608b0e6
2016-11-15abisip-find: use protocol constantMax1-2/+2
Use library define instead of directly using hardcoded value. Change-Id: Ie9b8bc55bf40cf005434f27e205d47ffab959413
2016-11-15SNDCP: Fixup based on Coverity Scan suggestionPhilipp1-1/+1
This commit fixes Coverity Scan defect: CID 151900: Null pointer dereferences (FORWARD_NULL) Passing null pointer "comp_field->v42bis_params->nsapi" to "memcpy", which dereferences it. Change-Id: Iff83e21168a267dd4b4c401ab7c603e029b3ac39
2016-11-15test/gbproxy: Test for possible memory corruption when link_info is freedDaniel Willmann2-0/+276
This test is to trigger the use-after free issue in commit bff7b0d80972. If compiled with address-sanitizer the test will abort without the fix. Change-Id: I5e8c6626ba43342740f08d699383bdded739079f Ticket: OW#3049 Sponsored-by: On-Waves ehf
2016-11-15gbproxy: Check whether gbproxy_update_link_state_after() deletes the link_infoDaniel Willmann3-13/+27
In case the link_info is deleted we have to stop handling the stored messages inside link_info. Not doing so can lead to invalid memory being accessed. Change-Id: Ieb8503e9e94e7a5ac450ad8aa1713ec4f21cdea5 Ticket: OW#3049 Sponsored-by: On-Waves ehf
2016-11-13OM2000: CON MO: Allow larger range for CCP and CI valuesHarald Welte1-2/+2
it seesm more recent RBS2000 models have much larger CCP and CI value ranges than those of older models. Change-Id: Ib116c1fac901b293929fce34223d1fd0af15d2bc
2016-11-13Support configuration of CON MO Groups/Paths from VTYHarald Welte5-69/+235
The code for supporting the configuration of the OM2000 CON (LAPD Concentrator) MO was so far incomplete and not used from the OM2000 FSM initialization. This patch adds * VTY commands for configuration of CON Groups and Paths * The FSM integration to actually configure the CON MO Change-Id: I56dc1b5e35adef3a2078bcf9536537eb0f454192
2016-11-11RBS2000: Ensure the is-connection-list command is only used on RBS2000Harald Welte1-0/+6
... and not on other BTS models. Change-Id: I8882ca9a9ab974b0bbdcbd5c3bab0eadf4bc0927
2016-11-11RBS2000: Avoid segfault if ts->lapd instance doesn't existHarald Welte1-0/+2
This happens e.g. with DAHDI driver, when the DAHDI device cannot be opened. Let's not prematurely seg-fault early in the RBS2000 signal handler, but take the proper error handlign for this. Change-Id: I9223fb1568d3db7e278f07240c4be334c6602a13
2016-11-11bs11_config: remove compiler waring about unused variableHarald Welte1-2/+2
bs11_config.c:78:22: warning: ‘too_fast’ defined but not used [-Wunused-const-variable=] static const uint8_t too_fast[] = { 0x12, 0x80, 0x00, 0x00, 0x02, 0x02 }; ^~~~~~~~ Change-Id: I1fdb9645128c2dfeb489bf75e89ab0adea919d2b
2016-11-11talloc_cxt: Fix compiler warning / missing #includeHarald Welte1-0/+1
talloc_ctx.c: In function ‘talloc_ctx_init’: talloc_ctx.c:40:2: warning: implicit declaration of function ‘msgb_talloc_ctx_init’ [-Wimplicit-function-declaration] msgb_talloc_ctx_init(ctx_root, 0); ^~~~~~~~~~~~~~~~~~~~ Change-Id: Ib8ebc02d5cf0d2b4019473d3750ae7c6f8a32896
2016-11-10OM2000: disallow ip.access style TCH/F_PDCH pchan typeNeels Hofmeyr1-0/+9
For TCH/F_PDCH, return an invalid chan comb (0) and print an error message that hints at the proper pchan type to use instead: TCH/F_TCH/H_PDCH Change-Id: Ibe0f944573f0a6d1be4bf7cf4986c4b2b3bd6d0d
2016-11-10OM2000: for TS conf of dyn TS, always send TCH/F chan combNeels Hofmeyr1-5/+1
When OM2K sets up the timeslots with the BTS, the dynamic channel state is not yet resolved to any particular pchan type. Instead of using the dyn state, always advertise dynamic timeslots as pchan2comb(TCH/F). In the past, the Ericsson dynamic timeslots were handled as pchan type TCH/F_PDCH. This is a mistake, as this pchan type is intended for the ip.access dynamic PDCH way of dynamic channels. In any case, in the initial state of this pchan type, the timeslot was initialized as pchan2comb(TCH/F) because the ts->flags do not reflect an active PDCH yet. In short, this patch does not change the behavior of TCH/F_PDCH timeslots, only clarifies it. It would in fact make sense to disallow use of TCH/F_PDCH for OM2K, but that should probably be a separate patch. The proper pchan to use for Ericsson dynamic timeslots is TCH/F_TCH/H_PDCH. These do not use ts->flags, but ts->dyn.* as state, which first reflects pchan_want == pchan_is == GSM_PCHAN_NONE. Hence the timeslot was initialized by OM2K as pchan type zero, which is unknown / invalid. So, instead of using pchan_is, which is not yet reflecting anything meaningful, always initialize as TCH/F chan comb, as Ericsson hardware apparently expects it. Change-Id: If0693f7c5c85977b0e4acbc701ee5d635434d0d1
2016-11-10fix use after free in bsc_config_freeNeels Hofmeyr1-1/+1
talloc_free the cfg only after asserting num_bsc count sanity. This caused a failure in the 'bsc-nat' test with -fsanitize build. Should fix the Osmocom_Sanitizer build on jenkins.osmocom.org https://jenkins.osmocom.org/jenkins/job/Osmocom_Sanitizer/ Change-Id: Ic20aacaccffcaa58ccec6d24c884727dc1bc50e6
2016-11-09OM2000: Throw error when MO can not be enabledPhilipp1-0/+10
Throw warning message in case the MO state does not change to enabled after sendeing an Enable-Request message. Change-Id: Idfde8d6f71526e8acfea51835732515a4bee858e
2016-11-09om2000: added support for ericssons sabm negotiationPhilipp1-0/+3
This patch adds support for ericssons sambm negotiation. This patch depends on libosmo-abis commit: 2788c7eacab91cd39d68e316fc8ee87763bbfeb4 Change-Id: I56b1c1cef07a61143fc0e8058480805cddfeff96
2016-11-09OM2000: Add fault report parsingPhilipp1-1/+129
This patch adds parsing for OM2000 MO fault report map parsing, the bits in the fault maps are counted out and displayed. Change-Id: I6e2928f39b09bc08e9ab78bc10bc81e07f7eb55d
2016-11-09RBS2000: re-establish any lost signalling linksHarald Welte1-0/+12
Contrary to standard A-bis, in the RBS2000 case the BSC connects the signalling data links (LAPD) to the BTS. In case one of them drop, we need to attempt to re-establish them. This requires libosmo-abis with Change-Id I07f0f79e0cda09766f357032ffb4e7ad643d448a Change-Id: I710b5af5d0acbdd3febd314849340f2adb7abd80
2016-11-09om2000: Add support for querying RBS capabilitiesroot3-0/+28
Change-Id: Id1fbaf41286f3651ce8f210eb8da05fb51179c96
2016-11-09lchan: Release channel in case of late activation ackHolger Hans Peter Freyther1-3/+28
In case of the sysmoBTS and receiving a channel activation ack on a channel that was marked as broken, release it again. Use a normal release without SACCH deactivation and release the rqd_ta data. Also add a local variable 'ts' to shorten some lines. The typical situation where this would occur is with high latency between BTS and BSC (or NITB). If a channel activation ack does not arrive in time, a channel is marked broken, and never recovers after that. This patch will release the channel again, which will remove the BROKEN_UNUSABLE state and makes lchan available again. Reported by Rhizomatica. However, in case of packet loss, i.e. when the channel activation ack never arrives at the BSC, this patch does not provide a resolution of the BROKEN_UNUSABLE state. On dynamic timeslots: clearing the dyn ts state could possibly happen in lchan_free() instead of in rsl_rx_chan_act_ack(). That's to be done in a separate patch, if at all. Tweaked-By: nhofmeyr Change-Id: I63dc0deaf15ba7c21e20b1e0c7b85f0437e183ed
2016-11-09SGSN: Use dummy all-zero MSISDN value in PDP Context Act on GTPHarald Welte1-1/+14
The GTP protocol specification requires us to include the MSISDN IE in all non-secondary PDP context activations. However, when no real HLR is used (e.g. via GSUP), we do not have the MSISDN information available and so far simply sent a zero-length MSISDN IE in GTP. The latter is a violation of the spec. So to resolve this, we now send a 15-digit all-zero dummy MSISDN IE, as described in TS 23.003. Change-Id: I8d0a5d52d6cd2a00b5dda060bd41d45056dfa84d
2016-11-09OM2000: Fix state machien for CF/TRXC on START ResultHarald Welte1-1/+1
When receiving the 'Start Result' message, for CF and TRXC MO we directly transition to performing the Operational Info. In that case, we need to return after sending the Operational Info and skip the usual processing for the default case below. Change-Id: I99860d198b337ffe461b240bda20dc10e1b5b2cb
2016-11-08WIP: OM2000: Full state machine implementation using osmo_fsmHarald Welte4-286/+1132
Our existing OM2000 code for initializing all Managed Objects of a BTS at startup was never complete. Rather than trying to fix the old-style code, introudce a hierarchy of osmo_fsm's reflecting the full protocol hand-shake and sequence of bringing up the individual MO's. If this works out well, it mihgt make sense to convert the TS 12.21 OML code for other BTS models, too. Change-Id: I3e11b28ba22b8c227e0401e6207fdda5381dda8c
2016-11-03bsc_vty: include dyn TS info in vty show lchanNeels Hofmeyr1-3/+53
Extend both 'show lchan <bts> <trx> <lchan>' and 'show lchan summary' to include information on dynamic timeslots. Have one common function that prints " as foo" or " switching foo -> bar" to the vty, use it in lchan_dump_full_vty() and lchan_dump_short_vty(). In lchan_dump_short_vty(), split the vty_out call in two in order to interleave the dyn ts info right after the pchan. The summary hence looks e.g. like this for osmocom style dyn ts: BTS 0, TRX 0, Timeslot 5 TCH/F_TCH/H_PDCH as PDCH, Lchan 0, Type NONE, State ACTIVE - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm or BTS 0, TRX 0, Timeslot 4 TCH/F_TCH/H_PDCH switching NONE -> PDCH, Lchan 0, Type NONE, State BROKEN UNUSABLE - L1 MS Power: 0 dBm RXL-FULL-dl: -110 dBm RXL-FULL-ul: -110 dBm Change-Id: I3eb72ac7f0a520a8eefe171b9fb357f149aa3fda
2016-11-02log: count_codecs(): drop logging of non-TCH lchan typesNeels Hofmeyr1-3/+0
count_codecs() is called on every chan act ack, also for channels other than TCH/F and TCH/H. So this logging happens a lot during normal operation but adds no real information. Also, RSL would be the wrong logging category for this -- RSL is about the RSL communications, not whether our internal code tries to count lchan codecs for the wrong channel types. Change-Id: Ibdac3bbe48745fe6a1c31d6f87369c9066c0374a
2016-11-02mncc_builtin: Properly reject DTMFlynxis/masterHarald Welte1-0/+2
As per TS 23.014, a GSM MSC must implement mobile-originated DTMF generation. We gate the DTMF signalling messages to MNCC, and expect the external MNCC handler to deal with it. However, the internal MNCC handler simply ignored such singalling messages, rather than rejecting DTMF altogether. It turns out failure to respond to START DTMF will cause some phones to behave in interesting ways, particularly with modem firmware v6.01.00, see https://osmocom.org/issues/1817). In this case the phone is not able to release the call as the pending response to the START DTMF is probably keping a reference or lock of some sort. Change-Id: I336f0cd0a6396b522d228479a417fd4d606157ac
2016-11-01Cosmetic: Add missing switch to usage helpPhilipp1-0/+1
Adds the -p --pcap option to the help text. Change-Id: I3e763c30ca13bc51c8b72af8a94558c92439f109