aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-bts
AgeCommit message (Collapse)AuthorFilesLines
2018-08-01Clarify frame loss counter for l1sched_chan_stateVadim Yanitskiy1-1/+1
Each logical channel (e.g. SACCH, SDCCH, etc.) has a counter of lost L2 frames. Let's use a bit better name for it, and correct its description in the 'l1sched_chan_state' struct definition. Change-Id: I92ef95f6b3f647170cfd434a970701406b0a7c82
2018-07-25preserve lchan-specific SI overrides on SACCH FILLStefan Sperling1-0/+2
During SACCH FILL processing, update lchan SI values only for lchans which follow BTS-global default values, keeping lchan-specific overrides in place. Change-Id: I515bbd9983fa894507386b241863a9aa4d279497 Fixes: eee7247ebe0d0a54a54b53b739bdd434dfceb511 Related: OS#3173
2018-06-29Add min/max/std-dev measurement reporting for TOA256Harald Welte1-0/+15
This patch adds extended processing of the high-resolution TOA256 measurement values. It adds reporting of the following values for each RSL MEAS REP for uplink measurements: * minimum TOA256 value during reporting period * maximum TOA256 value during reporting period * standard deviation of TOA256 value during reporting period Change-Id: Iea4a4781481f77c6163d82dcd71a844a5be87bf2
2018-06-28octphy: add support for 16x oversampling modePhilipp Maier1-0/+1
The latest octphy firmware release (octsdr-2g-02.11.00-B1927-alpha), introduces a 16X oversampling option which is not yet supported in osmo-bts. - Add oversampling flag in phy_link.h - Add VTY commands to enable/disable oversampling - Add phy messages to enable/disable oversampling - Add conditional compilation to preserve support for legacy header files and firmware Change-Id: Ib78f92bfe03ff20aa0a257763c90844fb7b87cf0 Related: SYS#4257 Patch-by: Octasic inc.
2018-06-09Send DELETE_IND when dropping Imm Assign pending messagePau Espin Pedrol1-0/+1
This way we give the opportunity to the BSC to release the channel quicker, otherwise it has to wait until T3101 expires. Same procedure is already done in rsl.c rsl_rx_imm_ass() when we return an error (hard limit AGCH queue len reached) from bts_agch_enqueue(). Related: OS#2990 Change-Id: Id9927c0789054ce3ecc7b30380585a1ffe05db5a
2018-05-25rtp: make port range configurable, assign correct port numbersPhilipp Maier1-0/+5
The current implementation does not allow the user to specify a port range in which the BTS is allowed to allocate a local RTP port. Also the ports the BTS picks do not match the policy described in RFC3550. An RTP Port must be at an even port number and the matching RTCP port must be at the following (odd) port number. The BTS currently picks random port numbers for both. - Add a VTY command to specify a port range in which the BTS may assign local ports. - Pick ports as described in RFC3550. Change-Id: Id75f1dfaf898ed8750d28b1c4840e188f4cfdc87 Related: OS#2825 OS#2635
2018-05-15let osmo-bts log a special notice if OML connection is closed earlyStefan Sperling1-0/+5
A frequent configuration file error is that the unit_id settings of osmo-bts and osmo-bsc don't match. The BSC already prints an error in this case. Let the BTS print an error as well. We use a heuristic for this purpose: If the OML link is dropped within 10 seconds after being established, log a special warning which alerts the user and recommend a manual configuration file check. Change-Id: I476ac797458b5a46edea3ae9cfbd491fd7f77f47 Related: OS#3143
2018-04-23gsm_data_shared.h: Remove unused enum gsm_paging_eventPau Espin Pedrol1-7/+0
Change-Id: I37c026f0e4d5ed6cbedaa237b259742f44c238b9
2018-04-17osmo-bts-trx: perform error concealment for FR framesPhilipp Maier1-0/+6
When a bad voice frame is received, it is replaced by a silence frame. This may cause unpleasant audio effects. This change implements a functionality to craft a replacement frame from the last known good frame using ECU implementation from libosmocodec. At the moment, only FR is supported. Depends: libosmocore I06a21f60db01bfe1c2b838f93866fad1d53fdcd1 Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6
2018-04-04use osmo_init_logging2() with proper talloc ctxNeels Hofmeyr1-2/+0
Completely drop bts_log_init(), call osmo_init_logging2() directly instead: all callers of bts_log_init() passed NULL as category string, so all it ever did was call osmo_init_logging(). The bts_log_info is already declared in the .h. Here and there also define a proper talloc root context instead of using NULL. Change-Id: Ic049f77bef74123b95350bcae182a468e0086b9c
2018-03-17Add 'osmo-bts-omldummy' to bring up only OML without RSLHarald Welte1-0/+1
This is used only in integration testing, where in the TTCN-3 testsuite we currently have no A-bis OML implementation, but only a RSL one. Change-Id: Id8e5f34091e6e32621d8c8673de7ea848dfd252f
2018-03-17virtual: Correctly set+report BTS variant in OML attributesHarald Welte1-0/+1
Change-Id: I76dc47427ec26834859fb737bd319dc379ae8697
2018-03-17Get rid of 'struct gsm_bts_role_bts'Harald Welte3-103/+94
gsm_bts_role_bts was introduced at a time when we still shared gsm_data_shared.[ch] between BSC and BTS, and where we then subsequently needed a BTS-private structure. Since that sharing was abandoned quite some time ago, we can merge gsm_bts_role_bts into gsm_bts and do away with the bts/btsb dualism in a lot of the code. Change-Id: I4fdd601ea873d9697f89a748cc77bcf7c978fa3e
2018-03-17cosmetic: Move agch_queue to sub-structure of gsm_bts_role_btsHarald Welte1-14/+16
Rathert han have 11 direct members of gsm_bts_role_bts, group them into a sub-struct as ew do for other parts like interference, laod, ... Change-Id: Iefecf4b70c1b11c650913f2ae3783718ffb8a36c
2018-03-17gsm_data_shared: Remove unused definitions/members/functionsHarald Welte1-197/+0
What we remove here is a legacy from sharing this header file with openbsc/osmo-bsc-sccplite, which we stopped to do quite some time ago and hence can remove those parts that are only relevant to the BSC but not to the BTS. Change-Id: Icac1656da68f6a006a28c779e3b563bbdd905b3d
2018-03-11implement support for 3-digit MNC with leading zerosNeels Hofmeyr2-3/+6
Record the mnc_3_digits flag from SI and pass on via the PCU interface. Instead of changing to e.g. osmo_plmn_id, add the flag separately, and instead of bool use a uint8_t, to not raise any struct packing issues and clarify the flag's size beyond any doubt. Bump the PCU interface version to 9. This is one part of the three identical pcuif_proto.h patches: - I49cd762c3c9d7ee6a82451bdf3ffa2a060767947 (osmo-bts) - I787fed84a7b613158a5618dd5cffafe4e4927234 (osmo-pcu) - I78f30aef7aa224b2e9db54c3a844d8f520b3aee0 (osmo-bsc) Depends: Id2240f7f518494c9df6c8bda52c0d5092f90f221 (libosmocore) Change-Id: I49cd762c3c9d7ee6a82451bdf3ffa2a060767947
2018-03-02pcuif_proto: add version 8 featuresAlexander Couzens1-1/+19
Add PCU_IF_MSG_DATA_CNF_DT and PCU_IF_SAPI_AGCH_DT to bring the pccif_proto into sync. Both commands are required to support the rb11 with an osmo-bsc co-located pcu. Change-Id: I6d330aca26249ee94ece5e415079f0b75c6e8b48
2018-03-02pcu_if: move definition PCU_SOCK_DEFAULT into pcuif_proto.hAlexander Couzens2-2/+2
PCU_SOCK_DEFAULT is defined in the pcu counterpart of the file pcuif_proto.h To be consistent with the pcu move the definition pcuif_proto.h The pcuif_proto.h will be exact the same in the pcu repo and bts repo. Change-Id: I67f8ec036e219994cc296d0ed5409da7f3ec681e
2018-02-28pcuif_proto: correct indention of gsm_pcu_if_dataAlexander Couzens1-5/+5
Change-Id: I39f3bc1f0a1e238f8f00cb00e2d1e5193f118c16
2018-02-27Add high-accuracy ToA value to Uplink Measurement ReportsHarald Welte1-0/+1
Normal Abis RSL MEasurement Results contain only the "MS Timing Offset IE" in units of full symbols. In some use cases it is important to have higher-accuracy timing information exposed to the BSC. We do this by adding the average timing offset value during the last measurement interval in 1/256th symbol accuracy to the "Supplementary MEasuremen Information" part of the TS 48.058 9.3.25 Uplink Measurements IE. In order to avoid any compatibility issues, this feature is only enabled if the new vty config command "supp-meas-info toa256" at the bts node is enabled. Change-Id: Ie85e53b47d4041cc4e6d7b78406ae8b79b2d9397
2018-02-27measurement: Keep average of high-accurate ToA value in lchanHarald Welte1-0/+1
At the end of a measurement processing window, we currently compute the ToA / timing offset at 1/256th symbol accuracy, but we only print it to the log. Let's store the value in the lchan to make it usable by other code in follow-up patches. Change-Id: I5f00a16ac966b627d9452a98b8fa70984bed684a
2018-02-27L1SAP: Increase resolution of reported burst timingHarald Welte1-1/+1
Before this patch we had: * osmo-bts-trx internally using 1/256th bit/symbol period * osmo-bts-sysmo internally using 1/4 bit/smbol period * PCU interface using 1/4 * L1SAP interface using 1/4 * measurement processing code on top of L1SAP using 1/256 So for sysmo/lc15/octphy we are not loosing resolution, but for osmo-bts-trx we're arbitrarily reducing the resolution via L1SAP only then to compute with higher resolution again. Let's change L1SAP to use 1/256 bits and hence not loose any resolution. This requires a corresponding change in libosmocore for l1sap.h, which is found in Change-Id Ibb58113c2819fe2d6d23ecbcfb8b3fce4055025d Change-Id: If9b0f617845ba6c4aa47969f521734388197c9a7
2018-02-27measurement.c: higher-precision TA/TOA mathHarald Welte1-2/+2
Change-Id: I0dc8e78545465dfc5c93691a49b86b6b8b56b432
2018-02-27trx/scheduler: Use integer math for TOA (Timing of Arrival)Harald Welte2-9/+9
There's no need to express TOA as a float: * We receive it as signed 16bit integer in units 1/256 symbol periods * We pass it to L1SAP as signed integer in 1/4 symbol periods So turn it into an int16_t with 1/256 symbol period accuracy throughout the code to avoid both float arithmetic as well as loosing any precision. Change-Id: Idce4178e0b1f7e940ebc22b3e2f340fcd544d4ec
2018-02-27RACH decoding: Use BER threshold for RACH ghost detectionHarald Welte1-0/+1
When decoding RACH bursts, we should use a BER threshold in order to help distinguish 'ghost' RACH bursts from real RACH bursts. The theoretical ideal threshold according to some papers is 7 out of 41 bits qhich aquals to Eb/N0 of 0 dB = 0.1707 (17.07%) We add a new 'ber10k' parameter to the RACH indication l1sap primitive (needs separate change for libosmocore), and then fill this value from osmo-bts-{sysmo,lc15,trx,octphy}. The common part above L1SAP then applies the threshold, which can be changed from vty using the "max-ber10k-rach <0-10000>" command available at the BTS node. The unit is BER in 1/10000, i.e. a value of 100 equals 1% bit error rate. Change-Id: Ic41c11f6312a36baa2738547e8dcec80829457f8
2018-02-26split scheduler_mframe.c from scheduler.cHarald Welte1-0/+30
There are use cases for the multiframe scheduler tables outside the context of the entire scheduler. Let's prepare for that. Related: OS#2978 Change-Id: I6a501e66c47809ae3cdc55bef2cb6390ee0096b1
2018-02-26counters: split rach:sent into rach:drop, rach:ho, rach:cs and rach:psHarald Welte1-1/+4
Change-Id: I51e9938df0e05b8fdb12686b9a9bb6994546deed
2018-02-24BTS: add rate_ctr about CCCH (paging, agch, pch)Harald Welte3-0/+16
Change-Id: Id6c833746150a3c2e32b00ea6604669f16b84bc4
2018-02-23measurement.c: Hand Frame Number into measurement computationHarald Welte1-1/+1
This is currently only used for logging, but will be needed for proper RX{LEV,QUAL}-SUB reporting in upcoming patches. Related: OS#2978 Change-Id: I07fd06e8a379cab7c0c2eb111c3f5600037d3c9e
2018-02-23scheduler: add trx_sched_is_sacch_fn() functionHarald Welte1-0/+3
For proper measurement processing of RX{LEV,QUAL}-SUB, we will need this information. Related: OS#2978 Change-Id: I768fde62452a74dce471ebf946e56eb1e4de1abc
2018-02-22Introduce + use LOG/DEBUGP with frame number prefixing/printingHarald Welte1-0/+12
Let's make sure whenever we do have a frame number, we print it as context in the related log line Change-Id: I751d5ddb3322fce489bc241459738cbcc55c890b
2018-02-22bts: use feature list instead of speech codec tablePhilipp Maier2-8/+2
osmo-bts has a table of pchan/channel mode combinations for every bts. This table models the codec capabilitys of the BTS hardware. However, having the speech codec apabilities modeled inside the BTS feature list would be much more comfortable and since the feature list is communicated back to the BSC we would get the codec capabilities inside the BSC domain as well. - remove the pchan/channel mode tables - set speech codec variants for each BTS type - fix bts_supports_cm so that it queries the feature list Change-Id: I977dc729ba856631245aedf76afd48eac92166f7
2018-02-22gsm_data_shared: extend bts feature list with speech codecsPhilipp Maier1-1/+7
The feature list does not cover any speech codec related information. - Add speech codec related items to feature list. Change-Id: If6d50c6f4e2348b23f31c3415b0f5577a3f5be50
2018-02-19rsl: do not allow MODE MODIFY request with unsupp. codec/ratePhilipp Maier2-0/+11
When the BSC sends a MODE MODIFY request with an unsupported codec, the BTS must respond with a negative acknowledge. Currently the codec parameter is not checked at all, which may lead into malfunction or crash of the BTS. - Introduce a mechanism to check the codec/rate against a table that is set up in the phy specific code. - Add tables with supported codec/rate combinations for octphy, sysmobts, and trx. Change-Id: Id9b222b7ab19ece90591718bc562b3a8c5e02023 Related: SYS#3212
2018-02-07Add helper to get BCC from BSICMax1-0/+2
Change-Id: Ib539a8739d53ab60d8fadffcef38152b82a28498 Related: OS#1854
2018-02-05Print much more information during 'show lchan'Harald Welte1-0/+5
This adds printing of remote RTP IP/Port, LAPDm SAPI information, MS Timing offset, propagation delay, encryption algorithm+state, loopback status and radio link failure counter to the "show lchan" command. It also adds TODO comments fro those bits that are not yet printed but which would make sense to print. Change-Id: Ic4bc47638b7b402aee9344dc912745a9929c37f4
2018-02-05gsm_lchan: remove unused member fieldsHarald Welte1-2/+0
Change-Id: Icfc601e664ccf33078955e54b02315085cff20a8
2018-01-05Remove BSC-specific partsMax1-101/+0
The dead code is from before repo-split time. Change-Id: I9d4ee8d55a4096bf47407c7d2bdbf3063bf1666e
2017-12-03Put useful information in RTCP SDES.Harald Welte1-0/+1
The RTCP Sender Description is supposed to contain useful information to identify the source of the RTP stream. So far, it only contained compile-time default data of libortp. Let's put the BTS UnitID, the lchan number and the OsmoBTS version in there. This change requires libosmo-abis Change-Id Ice794f9e0c6caeea1c67520c12efbfa375d1fb82 Change-Id: Id6ce7188354d3a0517661c9648854ec829ef1cac Related: OS#2701
2017-12-02scheduler: Harmonize log line format; Always print TS name + decoded FNHarald Welte1-0/+6
Change-Id: I5703b46c8a59fe00a3cdc063bcf72872980ec5e5
2017-12-02Comments on individual members of struct gsm_abis_moHarald Welte1-0/+7
Change-Id: I8e005410080201746906b8a60e9f7957031d2e58
2017-10-08Remove build dependency on legacy OpenBSCMax3-2/+1001
* copy-paste gsm_data_shared.* from OpenBSC master * remove corresponding configure check and option * remove .deb dependency Actual refactoring with removal of unnecessary structures/parts, moving common OpenBSC/OsmoBSC parts into libraries etc. are left for further patches. Current patch will make coexistence with *BSC easier and will simplify our build infrastructure. Change-Id: I9f004fb5c4c1db29d4792dfd281d388c7063da13 Related: OS#1923
2017-09-02trx: avoid deactivating lchan on LCHAN_REL_ACT_REACTMax1-1/+1
* do not deactivate lchan when called with LCHAN_REL_ACT_REACT * add fixme comment It's unclear yet if any special steps are required for osmo-bts-trx so let's just make it compatible with setups [1] using BS_AG_BLKS_RES != 1 for now. Background: CCCH is auto activated by some OsmoBTS - before we receive SI3, see 4a8582846281322e8d7dfc577b18767cf35c24d1. To accommodate for that we deactivate CCCH in common/rsl.c, which triggers BTS-model specific callback sapi_deactivate_cb() which updates parameters and activates it again. In case of osmo-bts-trx there is no auto-activation and (seems to be) no need in special interaction with hw to activate channel (no lchan_activate()) hence we can just skip entire deactivate/setup/activate again routine. [1] "channel-descrption bs-ag-blks-res N" in OpenBSC config file. Related: OS#1575 Change-Id: I20b89ba1e43d1414180b083cd1e085eeffe5d513
2017-09-01Support removing SI13 from PCUMax1-1/+1
If SI13 becomes unavailable in runtime than send 0-length message with BCCH SAPI to PCU to indicate that SI13 have to be removed. Change-Id: I72aef8bd98f21c4b5ea6eed21fc56b30d85bfc1b Related: OS#2400
2017-08-31Support sending SI13 to PCUMax1-0/+1
* explicitly set SAPI when sending data_ind to PCU * drop unused receiving code for BCCH SAPI * send SI13 when PCU is connected * send SI13 when new SI is received Change-Id: I9e83ef792585aa962f99897d9973cef12f186bcf Related: OS#2400
2017-08-24osmo-bts-trx: remove global variables from loopsMax1-1/+3
* move TA related globals into phy_link * move power loop related globals into phy_link * prefix corresponding vty vars with osmotrx Change-Id: I01d7c1abad67e51b886a4ecf2de072929d67da27 Related: OS#1848
2017-08-09TRX: Remove global variables, move SETBSIC/SETTSC handling into phy_linkHarald Welte1-0/+1
Whether or not we are talking to an OpenBTS (SETBSIC) or OsmoTRX (SETTSC) transceiver is a property of the phy_link, and not a property of the BTS. Also, we *really, really* should never use global variables. I'm very happy this is being cleaned up, finally. Change-Id: I51aeb17661dfd63ff347f7b2c0d7ffa383ec814c
2017-08-09L1SAP: Use RSL_CHAN_OSMO_PDCH across L1SAPHarald Welte1-0/+1
So far, L1SAP code is hiding RSL_CHAN_OSMO_PDCH from the bts specific code below L1SAP. This is some kind of a hack/workaround, making code and debug output / logs more difficult to understand. So let's teach the lower layer how to treat RSL_CHAN_OSMO_PDCH and remove the "hiding" code from the common l1sap.c code. Change-Id: Iaaa833febe45b82166d3901f10cc5466a7591c19
2017-07-19lc15: port lc15bts-mgr changesMax1-0/+6
That's mostly changes related to lc15bts-mgr from https://gitlab.com/nrw_noa/osmo-bts branch nrw/litecell15 based on eb5b7f80510b603579f7af6d7d5ead296c2fa260 commit. I wanted to incorporate vty and hardcoded paths changes so we can use it from this point without major backward-incompatible changes as a base for future ports. Change-Id: Iabbaedc84aaaa594150a4e5445c16dd1f6f89858 Related: SYS#3679
2017-07-13VIRT-PHY: Initial check-in of a new virtual BTSHarald Welte2-0/+19
This patch adds a virtual physical layer designed to simulate the Um air interface between BTS and MS. It does so by encapsulating MAC blocks (Layer 2 PDUs) via GSMTAP and sending them through multicast UDP streams, both in uplink and in downlink. The purpose of this is enable testing without any radio hardware or related licenses. OsmocomBB has recently received as similar patch-set, adding a virty_phy executable that can be run on a PC instead of the classic 'layer1' firmware on a real phone. Using GSMTAP means that one can use unmodified wireshark to decode the messages exchanged on the virtual Um layer. This code was originally started by Harald in January 2016, continued by Sebastian Stumpf in late 2016 and early 2017, and finally completed by Harald in July 2017. Change-Id: I1bf7670975b1e367c1c62983020865a043542622