aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc
AgeCommit message (Collapse)AuthorFilesLines
2017-08-27move openbsc/* to repos rootNeels Hofmeyr39-26620/+0
This is the first step in creating this repository from the legacy openbsc.git. Like all other Osmocom repositories, keep the autoconf and automake files in the repository root. openbsc.git has been the sole exception, which ends now. Change-Id: I9c6f2a448d9cb1cc088cf1cf6918b69d7e69b4e7
2017-06-22Fix BTS features length checkMax1-4/+4
While fixing potentially incorrect memory access, the check for maximum number of supported BTS features was incorrectly adjusted instead of feature vectore length check next to it. Fix this by adjusting checks properly and adding comments to avoid future confusion. The error was introduced in a60bb3dd28ce9e3720f8ee1b262893f3e233e2e6. Change-Id: I06d2498d730624d5da535f6add6fa98d004714ae
2017-06-18Add vty command "radio-link-timeout infinite" for uplink rx testingHarald Welte2-7/+36
When we are performing Rx sensitivity testing on a BTS, we want to deactivate the connection failure criterion / radio link timeout, i.e. no matter how many SACCH frames in uplink are failed to decode, the BTS should never close the channel. OsmoBTS Change-Id I736f21f6528db5c16fa80cdb905af20673797be5 covers a way how this behavior can be requested from the BTS via an OML attribute. This patch adds support to the BSC to actually set that attribute. Do not use this in production networks, as the BTS will keep open radio channels indefinitely even if the phone is gone and no longer transmitting anything. This is a pure testing feature. Change-Id: I6cb94e0f024934f7baeeb728ca9ed3042fbf16d2
2017-06-15bsc_init: Forget which SIs are valid for the trxMax2-4/+11
Previously the SI generation lead to setting the BCCH SIs for all TRX in a multi-trx setup. This is because we create the SIs globally but si_valid appears to be limited to the 'current' trx. Warn if we attempt to set SIs for the BCCH on a trx that does not have a BCCH. Change-Id: Ie0e288252a2e7709c4dae16b96a0b1512278847f Tweaked-by: Max <msuraev@sysmocom.de>
2017-06-15Update SI data structures and generationMax4-130/+186
To support segmented SI2quater as per 3GPP TS 44.018 we'll have to support multiple SI messages (up to 16 for SI2q) for a given type in contrast to existing 1:1 mapping: * expand storage space to hold up to 16 SI messages (spec limit) * add assertions for budget calculations * generate multiple SI2q messages * adjust SI2q-related tests * use precise check for number of SIq messages instead of approximate estimation Change-Id: Ic516ec9f0b821557d9461ae9f1c0afdd786f3b05 Related: OS#1660
2017-06-15Move SI-related definesMax2-3/+3
* move SI2quater related defines to shared header * add define from OsmoBTS which checks for presence of a given SI message in gsm_bts struct. Rename it to avoid conflicts with OsmoBTS code and to match naming conventions of similar macros. Change-Id: I11432c93c772d1ead6d45a7bb0f1d13d492c82f1 Related: OS#1660
2017-06-12OML: fix potential OOB memory accessMax1-2/+2
Use sizeof target BTS feature storage to make sure we always fit into pre-allocated memory. Also use it for log check. Change-Id: Ib107daa6e8b9bc397a10756071849f8ff82455d5 Fixes: CID 170581
2017-06-09Request and parse BTS feature list via OMLMax1-0/+40
Request features supported by BTS when getting attributes over OML. Change-Id: Ic35b2865998bca3c2c0cb4b77e4e73d12e08bd7e Related: OS#1614
2017-06-09Get TRX attributesMax2-37/+75
Request per-TRX attributes in addition to BTS attributes. Change-Id: I2b61131b9930afd03357c0b66947ee856d58cc46 Related: OS#1614
2017-06-09don't re-implement osmo_talloc_replace_string()Harald Welte1-1/+1
osmo_talloc_replace_string() was introducd into libosmocore in 2014, see commit f3c7e85d05f7b2b7bf093162b776f71b2bc6420d There's no reason for us to re-implement this as bsc_replace_string here. Change-Id: I6d2fcaabbc74730f6f491a2b2d5c784ccafc6602
2017-05-31Adjust BTS model feature checkMax1-2/+2
Rename gsm_bts_has_feature() -> gsm_btsmodel_has_feature() and adjust type signature to match gsm_btsmodel_set_feature() function and avoid confusion with upcoming functions to check/set BTS features reported over OML. Change-Id: I97abdedbef568e0c2fbd37c110f7d658cf20e100 Related: OS#1614
2017-05-29libbsc: Create pcu-socket only as specified in config fileHarald Welte2-14/+26
Since commit b4999b60d48bcbb5aa575973d068e07ab672e095 we created PCU sockets at hard-coded paths in the filesystem by default for all BTSs. This is inflexible and prevents the use of multiple BSC instances on a single filesystem, or the placement of the sockets in a more secure location than /tmp. The new approach with this patch is that * no PCU sockets are created by default * only for those BTSs where a 'pcu-socket' is configured via VTY, the socket will actually be created Change-Id: Ie9079470584777dcc31f85f9bf0808f479156ccb Closes: OS#2293
2017-05-28bsc_vty: Add command to manually issue IPAC MDCXHarald Welte1-1/+31
Using this command, one can modify the RTP stream associated with a given logical channel and (re)direct it to a specified IP:Port. Change-Id: I63e03b932038a4e2f6d51c5541b52e4a42df27bf
2017-05-27bsc_vty.c: Add command for manual [de]actiovation of logical channelsHarald Welte1-0/+119
Sometimes it is useful to manually activate (or decativate) a given logical channel from the VTY. Doing this on the BSC (rather than the BTS) ensures that the BSC knows that this timeslot / channel is allocated and there is no risk to have clashes between the BSC "owning" the resources and the BTS allocating some by itself. Change-Id: I44fc3904678eb48bd3ab1a3da8c0c265fa082e0d
2017-05-27bsc_vty.c: Further simplify vty_get_ts()Harald Welte1-6/+7
We can also move the string-to-numeric conversion inside vty_get_ts() to reduce the amount of work required in the caller. Change-Id: I2a74ed06e90e39d39f53fff39bb96df172728c0e
2017-05-27bsc_vty: Factor vty_get_ts() out of pdch_act_cmd()Harald Welte1-14/+26
Resolving a timeslot based on its numeric identities is a generally useful function, so lets' factor that out. Change-Id: Id2570232f82542487a1133be7efb1dc1eb3029a8
2017-05-27bsc_api.c: Documentation for handle_mr_config()Harald Welte1-2/+13
Change-Id: I6edd442afc7c20f8f097198941bc592d429ba5da
2017-05-27costmetic: Document gsm48_multirate_config() + const-ify inputHarald Welte1-1/+6
We generally use const pointers for input arguments. Also, document input/output arguments of function and add spec reference. Change-Id: I2532cde69a18e3b021f7371e68f67a28a43d8b5f
2017-05-25Use new e1inp_signal_names from libosmo-abis to print input signal namesHarald Welte2-7/+4
Change-Id: I156027ecdd1456228c9f8776577edd48e70c19da
2017-05-25abis_rsl: use msgb_pull to parse tlli from msgAlexander Couzens1-4/+2
Change-Id: I971bf6c8821689f9d8a1294a9b3bf1af9c4091f7
2017-05-25abis_rsl: fix off-by-one length check when parsing ericson tlli fieldAlexander Couzens1-1/+1
Change-Id: I658f6d82a67944345ddda5534fa996dca9e990ab
2017-05-25pcu_sock: Fix broken paging commandPhilipp Maier1-7/+20
The pcu sends us an already made up MAC-Block that contains the paging request. pcu_sock.c is parsing this paging request wrongly and fails silently, which results into a dropping of the request. This commit fixes the parsing problems. Change-Id: Iefef08123bdc351afd8287d3f27ebf0ae58a6e7d
2017-05-25pcu_sock: Forward imm.ass PCU originated messagesPhilipp Maier2-0/+38
The PCU sends imm.ass messages in response to a rach request. Those messages need to be forwarded to RSL in order to get them send. This commit introduces the required functionality for that Change-Id: Ice099c4ed7008200ed179e581aba1899c6c29455
2017-05-25pcu_sock: implement direct tlli on AGCHAlexander Couzens1-0/+31
Ericsson allows to attach a reference to immediate assignments. A confirmation of the transmission is then sent back, but only containing the reference, not the whole RLC packet. Change-Id: I945f49e62e2a74a7906e2d49940927773edd04a9
2017-05-25pcu_sock: pcu_tx_info_ind allow to use TRX not starting from 0Alexander Couzens1-1/+1
It would prevent using only e.g. TRX 1 when TRX 0 is disabled. Change-Id: I68dc5e837bd2a3602f7875063c85da4082196274
2017-05-25pcu_sock: set flag PCU_IF_FLAG_SYSMO by setting pcu_direct = 1Alexander Couzens1-1/+1
The use of PCU_IF_FLAG_SYSMO enable the PCU to use DIRECT_PHY code path. Change-Id: I1f5407264fc4f209456ffcb73d7853ff315aab86
2017-05-25pcu_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
2017-05-25pcu_sock: Forward paging request from PCU via RSL to BTSHarald Welte1-9/+44
Change-Id: I28bf0995699618f3f5fa15fc8e1733beddfc482f
2017-05-25pcu_sock: get rid of magic numbers and use ARRAY_SIZE() for array iterationHarald Welte1-3/+3
Change-Id: I602b581fab67b3a1c3c03c73a3a99e9afd564e29
2017-05-25pcu_sock: Don't re-implement core functionality like gsm_bts_trx_num()Harald Welte1-14/+2
Change-Id: I5ea506c8240dac124ccf5522d02ba18e4f0cb90d
2017-05-25pcu_sock: add basic pcu interface supportPhilipp Maier4-1/+727
Adds a basic version of a pcu socket interface, similar to the one that can be found in osmo-bts. Change-Id: Ib13cb4099d12fa71e9e0b8727e19ab29e11909b2
2017-05-25libbsc: add debug log message to S_L_INP_* callbacksPhilipp Maier2-0/+7
Improve debug log output of input callbacks by adding a line containing the signal event name. Change-Id: Ifca46dd8b356d0de31cccbd79e406079d3a0d7d2
2017-05-17Get basic BTS attributesMax2-0/+77
Request BTS attributes via OML on connection and parse the response: request/parse incoming response as sw-config. Note: only basic BTS-wide KV attributes wrapped in sw-config are supported for now. Change-Id: I589be51daca0cb9e1f3473b93e910e46b06e23ae Related: OS#1614
2017-05-15SI2quater: fix EARFCN inclusion checkMax2-3/+7
Previously only the existance of bts->si_common.si2quater_neigh_list was checked but not the actual number of EARFCNs in it. Fix it by using si2q_earfcn_count() and adjust tests accordingly. While at it - reformat tests to include extra information. The correctness was checked manually by inspecting GSMTAP output. Change-Id: Ic4fb2a9e870db66cac58b1e8d113587b30d64ce2 Related: RT#8792
2017-05-15Restructure SI2quater generationMax3-104/+188
In preparation for extended SI2q messages: * add SI2q-specific accessor macro * add *_offset variables to gsm_bts struct * internalize memory check while generating rest octets - introduce budget concept (number of bits available in a given message) * internalize *arfcn_size() functions as they are not needed outside of si2q_num() anymore * change rest octets generation to work with gsm_bts struct directly * do not generate rest octets if no SI2q is necessary * adjust unit tests accordingly (cosmetic changes only to avoid regressions) Requires: I92e12e91605bdab9916a3f665705287572434f74 in libosmocore Change-Id: Ib554cf7ffc949a321571e1ae2ada1160e1b35fa6 Related: RT#8792
2017-05-15Prepare for BTS attribute reporting via OMLMax1-5/+5
* use define for number of attributes instead of magic number * add sub_model to gsm_bts struct * expand number of BTS features * mark attributes parameter to abis_nm_get_attr() as const Change-Id: I7ecb0c4339530d3a8354a2f94b34063dda87e030 Related: OS#1614
2017-05-10src: use osmo_timer_setup()Pablo Neira Ayuso8-43/+24
Use new function available in libosmocore to set up timers. Compile tested only. Change-Id: Ibcfd915688e97d370a888888a83a7c95cbe16819
2017-05-09Make BTS type and variant converters shareableMax1-1/+1
* move value_string definition and corresponding functions for BTS type to shared header to make it re-usable by OsmoBTS * use consistent function naming * add similar functions for BTS variant * add enum to be used by OML Attribute Reporting to distinguish between type, variant and other info Change-Id: Ida94725a6fce968443541e3526f48f13758031fd Related: OS#1614
2017-05-08Use libosmocore for SW Description parsingMax1-76/+12
Requires libosmocore with Ib63b6b5e83b8914864fc7edd789f8958cdc993cd. Change-Id: Ib94db414e94a2a1f234ac6f1cb346dca1c7a8be3
2017-04-28Prepare for extended SI2quater supportMax3-55/+48
Supporting SI2quater as per 3GPP TS 44.018 will require chnages to the way System Information is stored because it uses 1:n instead of 1:1 mapping between SI type and generated SI content. This should not affect other SI types though. To facilitate this transition: * convert the code to always use GSM_BTS_SI helper instead of accessing buffer directly * make helper more robust by adding extra parenthesis * add similar helper for gsm_lchan * add function estimating number of SI2quater message to hold configured number of (U|E)ARFCNs * add SI2q index/count fields and pass them to rest_octets generator explicitly * internalize buffer access in generate_si* functions Change-Id: I74e4e3cb86364cec869a1472a41b4a95af0d50dd Related: RT#8792
2017-04-28Save PCU version reported by BTSMax1-13/+9
When BTS reports PCU disconnect - clear it. Change-Id: Idb32c73036413ee912f633604150ee17b611cfa7 Related: OS#1615
2017-04-26Fix MS TO measurement representationMax2-7/+16
* set proper flag when saving MS Timing Offset * use gsm_subscriber's IMSI or lchan's name if bsc_subscriber is unknown * add comments with spec reference * store/display MS Timing Offset instead of raw Timing Offset field from RSL * Compute MS Timing Offset [-63; 192] from Timing Offset field [0; 255], adjust structure gsm_meas_rep with proper type to store it Change-Id: I7e003d23a6edb714c5f17688fd6a8edac131161d Related: OS#1574
2017-04-10gsm_bts: add version and variant detailsMax5-9/+12
* add version string to gsm_bts * add PCU version string to gsm_bts * rename GSM_BTS_TYPE_OSMO_SYSMO -> GSM_BTS_OSMOBTS to avoid confusion between BTS model and variant * add variant enum to gsm_bts_model using enum with variants for each hw vendor of OsmoBTS * show connected PCU version (if available) in vty via 'show bts' This will come in handy when logging details regarding particular BTS reported via OML, see: Related: OS#1614 Change-Id: I6710d53115f34634a7b70969cc05fd5c72ff8ab2
2017-04-08abis: log known ACKs and unknown messagesMax1-1/+18
Log expected ACK messages and unhandled messages to aid in troubleshooting. Change-Id: Id3afaaa76e24f63076ae0e6fd2322e4a7fa29b45 Related: OS#1614
2017-04-03VTY: add the dyn_ts_allow_tch_f optionVadim Yanitskiy1-0/+2
This option allows to enable or disable TCH/F allocation on the TCH/F_TCH/H_PDCH timeslots. Until now, source code modification was required to enable this feature. Related: OS#1778 Change-Id: Id18cab25844dc854a66b4e2713e90c3f43afa712
2017-03-23Handle PCU version received via OML alertMax1-30/+90
Explicitly check for and log PCU version received from BTS via OML alert message. Change-Id: I3c88663d4e2887a4038b4c3f1387128295b8934e Related: OS#1614
2017-03-23libbsc: add rsl_ericsson_imm_assign_cmd() which reply with a confirmation ↵Alexander Couzens1-1/+24
message ericsson can handle a reference at the end of a imm assign command which is used in the confirm response. The confirm response is only sent if the trailer is present. Change-Id: I88560291b5a3a3d7a0bac4d3c089b45f1f6b297f
2017-03-23RBS2000 RSL: Support for sending RSL PAGING CMD for GPRSHarald Welte2-2/+7
Change-Id: I66541f9b20e7fd67fbec329283fc3c821c970a56
2017-03-23RBS2000: 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
2017-03-23abis_om2k: protect MO FSMs by NULL checkAlexander Couzens1-1/+17
Also set MO FSMs to NULL after freeing them. Change-Id: I30df0b9ab8bc47ba9756c8388e977deed0e40200