aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2019-10-31Remove unused API classmark_is_r99()Pau Espin Pedrol1-10/+0
Furthermore, similar API already exist in libosmocore: osmo_gsm48_classmark_is_r99() Change-Id: I6763d8c894f0a0555a9801bddbc0a12c2b945599
2019-10-29rsl: Send IE MS Power Param to osmocom BTS models onlyPau Espin Pedrol1-2/+10
Since MS Power Param IE content is operator dependant, it's currently not known which kind of content non-osmocom BTS support/allow, so let's avod possibily breaking those BTS until each BTS has been checked separately. Related: OS#1622 Change-Id: If44121222042bdac06c2a5e70f7b35a88b00b27c
2019-10-29rsl.c: Clean up some repeated use of long chains of pointersPau Espin Pedrol1-5/+9
Further accesses will be addter in forthcoming commit, so let's first store the pointers in variables to clean up the code. Change-Id: Ie5ea0f44dfb5731cab7e8e5a3dd3d791ee703df7
2019-10-28rsl: Send IE MS Power Param during CHAN ACT and MS PWR CTRL messagesPau Espin Pedrol1-0/+5
TS 48.058 sec 8.4.1 CHANNEL ACTIVATION and state: """ The BS and MS Power Parameters elements are included to indicate that BS and/or MS power control is to be performed by BTS. The maximum power to be used is indicated in the BS and MS Power elements respectively. """ Since we always want the BTS to do autonomous MS power control, let's add it. Related: OS#1622 Change-Id: Icaaa61b363b093f00b6653c3df64d3e66583b9f8
2019-10-28bsc_vty: Fix typo in 'no depends-on-bts' cmdPau Espin Pedrol1-1/+1
Change-Id: I32e0d3dc8672206f346d25b45e06e9e3fe0b64e7
2019-10-11sigtran: Set default remote ip to localhost instead of nullPau Espin Pedrol1-1/+2
NULL or 0.0.0.0 should actually not be used upon connect() calls. Whoever, it worked so far because osmo_sock_init2() calls getaddrinfo() on it which does the 0.0.0.0->127.0.0.1 translation. osmo-msc already passed 127.0.0.1 as default address, so let's do the same here. Change-Id: Ib0d33c66faab78e609742638425cb8a0c382406f
2019-10-03gsm_08_08.c: Mark func bsc_find_msc() staticPau Espin Pedrol1-1/+1
Its currently only used by bsc_compl_l3() in same file. Change-Id: I7273a9452dbc4c1285cfa69269fa36ab09551d89
2019-09-18bsc_subscr_conn_fsm: Cleanly clear BSSAP conn if associated channel closed ↵Pau Espin Pedrol1-5/+28
during WAIT_CC TTCN3 BSC_Tests.TC_ms_rel_ind_does_not_cause_bssmap_reset seems to sometimes run into a race condition on the order of messages received by osmo-bsc comming from MSC and BTS. Usual (expected) scenario): BTS->BSC EST IND BSC->MSC CL3 Info BSC<-MSC CC BTS->BSC REL IND BTS<-BSC DEACT SACCH BSC->MSC ClearRequest BSC<-MSC ClearCommand BSC->MSC ClearComplete BTS<-BSC RF Chan Release BTS->BSC RF Chan Release ACK Sometimes CC message and REL IND message are received swapped (because they are sent by different components asynchronously in TTCN3). As a result, osmo-bsc was failing to go into CLEARING state and was unable to send the ClearRequest because CC was still not received. So the idea is to stay in WAIT_CC until CC is received, then check if the lchan was dropped and in that case go into clearing state. Change-Id: Id1abf5ee44c60925b478123409f26bd29006202b
2019-09-08SMSCB: Send ETWS Primary Notifiation via RSL to BTSHarald Welte2-6/+42
In addition to transmission of the ETWS Primary Notification via all dedicated channels, we also need to send it to the BTS for transmission via PCH (P1 Rest Octets) and for forwarding to PCU for PACCH transmission. Change-Id: I7e45b0373458a4348b12b92dd92861062532548b
2019-09-07bsc: gsm_08_08.c: Remove repeated conn not null checkPau Espin Pedrol1-1/+1
msc_is_connected() already checks against NULL. Change-Id: Ie9635cd2c6149cd0f8c017cfcb47481f91c4bed1
2019-09-07a_reset.c: Don't wait 2 seconds to send first BSSMAP RESETPau Espin Pedrol1-4/+3
Function fsm_reset_ack_timeout_cb() could be called directly from within a_reset_alloc(), but it's still desirable to deferr the BSSMAP RESET to be sent asynchronously by the timer upon next main loop step as soon as possible, so whole process is already configured properly. 1ms needs to be set instead of 0 (immediate asynchronous) because value 0 actually disables the timer. As a result, moving the state_chg() after the msc->a.reset_fsm assignment is not really needed, but still makes it more clear that the pointer will be set upon call of the timer callback. Related: OS#4188 Change-Id: I68d76a4050d4dec7d53b0031d67e0dd35ddd8764
2019-09-06SMSCB: Send ETWS primary warning message via all dedicated channelsHarald Welte2-2/+83
As soon as we have received an ETWS primary notification message from the CBC, we should transmit it as "RR Application Information" to all dedicated channels. Change-Id: I913d0237cffdcb95037da8489acef5f32a7fc02e
2019-09-02Cell Broadcast: CBSP and CBCH scheduling supportHarald Welte9-2/+1615
This adds code to handle CBSP (Cell Broadcast Service Protocol) from the CBC (Cell Broadcast Centre), as well as BSC-internal data structures for scheduling the various SMSCB on the CBCH of each BTS. There are currently one known shortcoming in the code: We don't yet verify if keepalives are received within repetition period. Change-Id: Ia0a0de862a104d0f447a5d6e56c7c83981b825c7
2019-08-28gsm_08_08.c: always pick first msc for unsolicit paging responsesPhilipp Maier1-3/+16
When osmo-bsc receives a paging response via the A-bis interface it tries to find the MSC which is in charge for the paging. This is due to the fact that osmo-bsc supports multiple msc connections, which is not specified by 3gpp specs. In an MT-CSFB call the MSC pages the UE via the SGs interface. Then the UE falls back to 2G. It then reports back as MS on the A-Bis interface with the paging response directly. In those cases osmo-bsc will not be able to determine an MSC in charge, so we will forward the paging response to the first configured MSC. Change-Id: I7f091ed1bbc2afe12656e42031e122144eeb6826 Related: SYS#4624
2019-08-23lchan_select.c: tune log level in lchan_select_by_type()Vadim Yanitskiy1-1/+1
If lchan_select_by_type() fails to find a suitable logical channel, it would print a message using LOGL_ERROR. This can happen if all logical channels of the requested type are busy, thus it is not a error. Let's use LOGL_NOTICE for that. Change-Id: I9b45852116253e5237b779a91bed8b800758360e
2019-08-23abis_nm.c: use LOGP() macro instead of LOGPC()Vadim Yanitskiy1-3/+3
The LOGPC() is usually used for continuation when printing complex logging messages (e.g. where using format string is not enough). In this case, nothing is being printed before calling LOGPC(), so the logging messages appear without the meta info (time-stamp, level, category, etc.), for example: BTS 0 reported connected PCU version 0.7.0.1-2585-dirty Change-Id: I868633ad3e50f2cb3ebfb2c566d16c4710f17563
2019-08-13neighbor config: allow re-using ARFCN+BSIC pairsNeels Hofmeyr4-46/+220
Fix neighbor config to match OsmoBSC manual: implement the plan for neighbor configuration that was so far only described in the manual without actually being in operation. This first allows re-using ARFCN+BSIC pairs in and across BSS. So far the handover_start() code always looked for handover target cells across *all* local cells, even if they were not listed as neighbors to a source cell. Imply all cells as neighbors only as long as there are no explicit neighbors configured. As soon as the first 'neighbor' line appears in a 'bts' config, only the listed neighbors are regarded as handover target cells. (The 'neighbor-list' commands are not related to this, only the relatively new 'neighbor (bts|lac|cgi|...)' commands affect actual handover procedures.) TTCN3 tests TC_ho_neighbor_config_1 thru _7 play through the various aspects of neighbor configuration: both the legacy implicit all-cells-are-neighbors as well as allowing only explicit neighbors by config. Related: OS#4056 Related: osmo-ttcn3-hacks Ia4ba0e75abd3d45a3422b2525e5f938cdc5a04cc Change-Id: I29bca59ab232eddc74e0d4698efb9c9992443983
2019-08-13add vty 'no neighbors' to remove all HO targetsNeels Hofmeyr1-0/+86
This is required for an upcoming TTCN3 test that plays through various neighbor configurations. Related: OS#4056 Ia4ba0e75abd3d45a3422b2525e5f938cdc5a04cc (osmo-ttcn3-hacks) Change-Id: I8623ab581639e9f8af6a9ff1eca990518d1b1211
2019-08-12bsc_msc_data: remove unused member is_authenticatedPhilipp Maier2-9/+0
The struct member struct bsc_msc_data->is_authenticated is set to true permanently. This is a leftover from the sccplite implementation and can be removed now. Change-Id: I966a48b383c85345c92c9a1fec791150e96cd7b9 Related: OS#3112
2019-08-05Remove undefined param passed to logging_vty_add_cmdsPau Espin Pedrol1-1/+1
Since March 15th 2017, libosmocore API logging_vty_add_cmds() had its parameter removed (c65c5b4ea075ef6cef11fff9442ae0b15c1d6af7). However, definition in C file doesn't contain "(void)", which means number of parameters is undefined and thus compiler doesn't complain. Let's remove parameters from all callers before enforcing "(void)" on it. Change-Id: Ic3c578347864fa225feb6d2dbe14798b9c19ace0 Related: OS#4138
2019-07-26rest_octets: add Serving Cell Priority ParametersPhilipp Maier1-2/+19
When we add an EARFCN to to the SI2quater struct we do not add Serving Cell Priority Parameters. This essentially causes to MS to ignore the EARFCN because it is still undefined under which conditions the MS should change to LTE. Related: SYS#4510 Change-Id: I7eaf7de4386fe8aea404e8a187d8a1f5ed596ead
2019-07-19vty: Fix typo in VTY command descrption -> descriptionHarald Welte1-6/+28
Let's add deprecated aliases for backwards compatibility Change-Id: I0e5da9d702910cf2571486e22a56f3ec17d0d67b
2019-07-16Fix some spelling errors found by lintianRuben Undheim7-7/+7
Change-Id: I63a733f8bea69f355a6686d99c3aa194c8ac9012
2019-07-16logging: introduce LOG_BTS and LOG_TRX and use it everywhereHarald Welte8-105/+83
It's quite ugly to have manual "bts=%d" printf-statements all over the BSC code. Let's change this to use shared logging helper functions all over the place, whenever we need to log something related to one BTS or one TRX. This can also help us as the first step to later add alternative logging of BTS identities, e.g. by printing the Cell Global Identifier or LAC+CI, or even a human-readable/vty-defined 'name' of the BTS, rather than its numeric bts number. With this change in place, we can introduce such changes at a single location in the code. Change-Id: I4a7814d164384eecfb6913c31802cf2faead6e6c
2019-07-13silence error for "invalid enum handover_scope value: none"Neels Hofmeyr1-0/+1
If no target cell got selected in a handover attempt, enum value NO_HANDOVER is used. In that case, do not log a lot of errors saying "invalid enum handover_scope value: none" -- they are misleading. Change-Id: I98e748bea58ebb02812b6aaa6431c7d4b813242d
2019-07-13comment and VTY doc tweaksNeels Hofmeyr2-4/+5
Clarify some in-code comments. Fix descriptions of some handover timers, which still talked of "MO" and "MT" handover -- which we now call "inter-BSC out" or "inter-BSC in" instead. Change-Id: I8429a830edd0325893ac90f22fcc05309617bd2d
2019-07-09remove double BSSMAP Clear on HO failureNeels Hofmeyr1-8/+0
If a handover fails when the new lchan is already fully established, osmo-bsc so far caused two BSSMAP Clear Requests to be sent out to the MSC: one caused by detaching the lchan from the gscon, one from returning the gscon back to ST_ACTIVE, which detects that no lchan is present and Clears. In fact only one of those is necessary. Checking for the presence of an lchan when entering ST_ACTIVE is an earlier attempt to catch insane situations. Since then, osmo-bsc has acquired other logic that will ensure sending a Clear Request in all cases, see gscon_forget_lchan(). Sending another BSSMAP Clear Request in ST_ACTIVE's onenter is simply not necessary. Drop gscon_fsm_active_onenter() entirely. Note: the double Clear Request is currently hit by TC_ho_out_fail_no_ho_detect(), which currently fails and will pass again after this patch; however, osmo-bsc should actually not release the lchan at all during this test, see OS#4093. In other words, osmo-bsc behavior for this scenario as well as TC_ho_out_fail_no_ho_detect() need to be changed, and the test will, once fixed, not be useful to trigger this issue anymore. Related: OS#4078 Change-Id: Iac1519eb8b24e8523caec682f9ac8e6dcf1327ce
2019-07-09doc/manuals, vty doc: more handover doc clarificationsNeels Hofmeyr1-1/+2
Related: OS#3487 Change-Id: I1639efb2dbcca4f0e9c33a74f3067606ce5f4209
2019-07-08make bsc_clear_request() staticNeels Hofmeyr1-2/+4
bsc_clear_request() is in fact used only within gsm_08_08.c, make it static to that file. Since the gscon FSM, "real" BSSMAP Clear are sent only by gscon_bssmap_clear(). bsc_clear_request() remains in use for legacy code paths in gsm_08_08.c: - the bsc_filter, i.e. for IMSI filtering; - in move_to_msc(), from handle_cc_setup(), a code path that is in fact not entirely clear to me. It seems to be an old functionality to serve multiple MSCs? Both of which I personally haven't seen in use, are not tested and should probably be completely removed. For now contain legacy code in the static context. Adjust comment. Change-Id: Ic89d0afad42e4b11183a13d2dc6b7bbf0b822fd9
2019-06-26bsc_subscr_conn_fsm: Log Tx of BSSMAP Clear Request with causePau Espin Pedrol1-1/+5
Change-Id: Ief0ec314723ce1d23da334df2add73c36ebf19f3
2019-06-26bsc_subscr_conn_fsm: Use gscon_bssmap_clear() helper on send failurePau Espin Pedrol1-3/+1
Change-Id: I45b42b76c260a5bac416ad3a5761918a8ab59f86
2019-06-18Re-introduce support for IPA-encapsulated MGCPHarald Welte5-20/+167
Old osmo-bsc-sccplite already supported this, but in the migration over to libosmo-sigtran and to real 3GPP AoIP, this functionality got lost. We now create a UDP proxy socket. Any MGCP commands received via IPA from MSC (or rather: bsc_nat) are retransmitted to the MGW via UDP on this socket. Any responses back from the MGW received on the UDP socket are retransmitted back to MSC/bsc_nat as MGCP inside the IPA multiplex. Closes: OS#2536 Change-Id: I38ad8fa645c08900e0e1f1b4b96136bc6d96b3ab
2019-06-06vty: adjust config name for unit-idEric Wild1-7/+32
Having different names for the same config setting is misleading, so let's stick to the one used by osmo-bts. Change-Id: Ide5ceb5db7403a70313405752579e30d7bb94eac
2019-06-06bsc: Append Osmux Support IE only on AoIPPau Espin Pedrol1-2/+2
Since in SCCPlite the BSC-attached MGW is controlled by the MSC, we don't need this kind of signalling. It's only needed for AoIP. Related: OS#2551 Change-Id: I802fc65c593e42aaa7a15cecab7a2f2b77ade3ea
2019-06-06Introduce msc_is_{sccplite,aoip}() helpersPau Espin Pedrol2-17/+3
Having the helper makes it easier to read/find for transport type checks. It will be ifurther re-used in forthcoming commits. Change-Id: Ic0ee4c472e29ec3092049e5e23b744395613616d
2019-05-26rx_fail_evt_rep(): Don't recycle variableHarald Welte1-2/+2
the 'p_val' variable should represent he 'probabl cause value' and nothing else. Let's use other local variables for other things. Change-Id: Ie79279fc1d42cd57e7478820493b250fe38c2f4f
2019-05-26Allow VTY to set the CCCH Load Indication ThresholdHarald Welte3-1/+20
Add a new VTY command "ccch load-indication-threshold <0-100>" by which the user can configure the threshold after which the BTS shall send CCCH LOAD IND. It used to be hard-coded to a default value of 10. Change-Id: I059fe4627438e26a06e00d84e342b736ab7af440
2019-05-24vty: Dump per-bts stat_item group in 'show bts' outputHarald Welte1-0/+2
Change-Id: Ie56d3f0951b56d9b3677bf8cc725ac777d9aa446
2019-05-24keep per-BTS stat_items about RACH busy / RACH access percentageHarald Welte2-0/+10
Change-Id: I3ad0cc4866d6210181cbafbab876e8028ad27540
2019-05-24chan_alloc: Don't include CBCH channels in load computationHarald Welte1-0/+4
When displaying the channel (lchan) load, we are interested in the dedicated channels as available for communication with mobile stations. If CBCH is enabled, it "steals" one of the SDCCH slots, so we have to exclude this channel from the count of available dedicated channels. Before this patch, A CBCH would show up as "in use" dedicated channel (so both the total and the in_use count were incremented). After this patch, neither "total" nor "use" are affected; The CBCH slot is completely excluded from load statistics. Change-Id: I606962e4977f122ff05a2d4e756c04c7f38bdaa0
2019-05-24smscb: Allow transmit of SCHEDULE and DEFAULT SMSCBHarald Welte1-5/+19
Change-Id: Iad41d24c87d091b8eb144544802d44def925ca70
2019-05-24abis_rsl: Fix log message about unimplemented common channel msgHarald Welte1-1/+1
The log is about an unimplemented CChan message, not a TRX message. Change-Id: I52bcf1fd79417ee5bfb054456a0b427e174114dd
2019-05-24abis_rsl: Avoid "Unimplemented" log message for every CBCH LOAD INDHarald Welte1-2/+4
Now that OsmoBTS is generating CBCH LOAD IND messages, let's avoid spamming the BSC log with notices about receiving this unimplemented message. Change-Id: Ida5045ec7a18c1062a3b80a381db52d5c98e9966
2019-05-24abis_rsl: Add support for extended CBCH to rsl_sms_cb_command()Harald Welte2-2/+4
Now that OsmoBTS understands about extended CBCH, let's at least update the BSC side function to allow for other code to generate such messages. Change-Id: I77a16b75ce311d63fb022475c8ff25fbbcee7f55
2019-05-23lcls: Fix MDCX with garbage on LCLS loop breakPau Espin Pedrol1-1/+1
Commit c997ceb750a67baef1a05590febe1c678b287d8f which added initial code did use memset(0) on the structure. However, later commit b407a8aca45ba8f3426003c4960ca8bd5cfe60e5 modifying the code forgot to initialize it, and as a result most of its fields contain garbage. This results in an MDCX with strange/incorrect values sent when LCLS loop breaks, breaking TTCN3 test BSC_Tests_LCLS.TC_lcls_connect_break. Change-Id: Ib1a7d825690db782a5d14f2d8817acf6cb6a52ea
2019-05-19bssap: Feed Assign Complete with Osmux CID retrieved from MGWPau Espin Pedrol1-2/+24
The CID is sent back to the MSC so it can configure its MGW to send Osmux frames to the BSC MGW using this CID. Change-Id: I77dfdd965ae828c39a9818669177aefd22bc02f2
2019-05-19bssap: Parse Osmux CID on BSSAP Assign Req recv and use it in MGCPPau Espin Pedrol2-0/+30
The Osmux CID obtained from the MSC is passed to the co-located BSC MGW to configure the MSC-side MGW conn of a call leg. Depends on: osmo-mgw.git I73b4c62baf39050da81d65553cbea07bc51163de Change-Id: I86e7e13fc7921e3209fb764c0e7797e7ec09b79e
2019-05-19bssap: Announce Osmux support on RESET (ACK) sendPau Espin Pedrol1-0/+16
Related: OS#2551 Depends on: libosmocore I28f83e2e32b9533c99e65ccc1562900ac2aec74e Change-Id: I6b5b475b6109a2882051445762e27046d015b770
2019-05-19bssap: Detect MSC Osmux support on RESET (ACK) recvPau Espin Pedrol1-0/+23
Related: OS#2551 Depends on: libosmocore I28f83e2e32b9533c99e65ccc1562900ac2aec74e Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528
2019-05-19vty: Add option to enable osmux towards MSCPau Espin Pedrol1-0/+24
Change-Id: I30c485c022f2d55e0a004f69b2503da7f91ecb74