aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/main.c
AgeCommit message (Collapse)AuthorFilesLines
2024-02-17Fix license headers.Harald Welte1-1/+1
We have licensed the code under GNU Afffero Public License, and state that in the first paragraph as well as in the link to the license. However, a paragraph in the middle stated "see the GNU General Public License", which is somewhat misleading. Let's fix that. Change-Id: I37e503b195fe43e1da42c080900504ca8e682e76
2023-09-21oml: implement handling of NM_ATT_IPACC_SUPP_FEATURESVadim Yanitskiy1-0/+13
Change-Id: I88c6c6af18be054bd152832e60c8afbbd16098a3 Depends: libosmocore.git Ia4208e10d61843dd6ae77398f6624c918dc81ea4 Depends: libosmocore.git I85316af9b57e8113077305798cb2d82a24e48e00
2023-07-21sysmo: Enable VGSCS + VBS feature flagsHarald Welte1-0/+2
This tells the BSC that osmo-bts-sysmo supports VBS/VGCS Change-Id: I1625d2a0f4905437fad0b5220a551f81eba9a00e Related: OS#4851
2023-05-27all models, HR1 codec: select RTP output format via vty optionMychaela N. Falconia1-0/+6
The new vty option "rtp hr-format (rfc5993|ts101318)" selects the RTP output format to be used for HR1 codec, consistently across all models. The default is set to match legacy behavior: ts101318 on osmo-bts-{lc15,oc2g,sysmo} and rfc5993 on osmo-bts-trx. On models where no legacy behavior is applicable, the default is set to rfc5993 as a forward-looking measure - see OS#6036. Closes: OS#5688 Change-Id: I168191874a062429a57904511a1e89e3f588732e
2022-04-25src/common/bts.c: set BTS_FEAT_PAGING_COORDINATIONOliver Smith1-1/+0
I did not realize with my previous patch that there's a common place where features available for all backends should be enabled. So move it there. Related: SYS#5922, OS#5538 Change-Id: Id688ddae5cd714355fcc5324f33c9397fecae261
2022-04-21model_init: set BTS_FEAT_PAGINATION_COORDINATIONOliver Smith1-0/+1
According to osmo-bsc I0e80ca5afc06737273b6699bde6e325e454b57f6, the PAGING_COORDINATION feature should be well supported in osmo-bts. Adjust the bts_model_init functions to report this to the BSC, so it properly sets this in SI13 and so we can avoid this notice in the log: Get Attributes Response: reported feature 'PAGING_COORDINATION' is not supported, while we thought it is. Related: SYS#5922, OS#5538 Change-Id: Ib06829501f4221a7f7b0344ec7991ceba74e7641
2022-04-21model_init: order features alphabeticallyOliver Smith1-6/+7
Make it easier to compare the lists of features. Related: SYS#5922, OS#5538 Change-Id: I67887d89912d963fbbe90590c8467cbbd2566e09
2021-05-17sysmo,oc2g,lc15: Make RadioChannel MO depend on RadioCarrier MOPau Espin Pedrol1-0/+1
lower layer specific APIs require first to enable the TRX object (GsmL1_PrimId_MphInitReq, which requires ARFCN received during Set Radio Carrier Attributes) before enabling the per-TS structure. Hence, OPSTART must happen in RCARRIER MO before OPSTART can be sent to the Radio Channel MOs, otherwise the initialization of the TS objet will fail and OPSTART for the RadioChannel MO will send back a NACK. In order to avoid this, we need to keep the RadioChannel MO announced as "Disabled Dependency" until RCARRIER is OPSTARTed. Related: OS#5157 Change-Id: I8c6e5ff98c32a3cd5006f5e5ed6875bcabb1d85f
2020-11-03fixup: vty: call bts_model_vty_init() from bts_vty_init()Vadim Yanitskiy1-2/+0
Now bts_model_vty_init() must be called only once, otherwise the process would crash when bts_model_init() is called from main(). Change-Id: I262c39896b5db86c54ad9aa7042c7ca6657815d9 Related: SYS#4937, OS#3036
2020-10-24main: separate model-specific arguments in helpVadim Yanitskiy1-1/+1
Change-Id: I9646a45d61153499ad3d580a03d930ed20e23cda
2020-10-24main: increase spacing between commands and descriptionVadim Yanitskiy1-3/+3
Otherwise it's hard to fit new options with long names. Change-Id: If9a418545abff6d22602ba07cfd4447f5ace7742 Related: SYS#4910
2020-10-19remove dead oml_router codeHarald Welte1-10/+0
We originally wanted to intrdouce an OML router which would permit external proceses to implement certain OML MOs. However, that code was never completed, and all the existing implementation (in three copies) does is to create a unix domain socket and discard what is received there. Change-Id: I7fcbbd5d6b64ddc666ca836dc49abb430be0d5cb
2020-06-11Do not mix public and private BTS features, use libosmocore's APIVadim Yanitskiy1-12/+13
It was a very bad idea to mix "public" BTS features, that are reported to the BSC via OML, and those features, that are used locally (and exclusively) in osmo-bts. Why? At least because we already have the BTS feature manipulation API in libosmocore, that is used by osmo-bsc, but for some reason not by osmo-bts. New features added to libosmocore would clash with the existing "internal" ones like BTS_FEAT_MS_PWR_CTRL_DSP. So what this change does can be described as follows: - remove duplicate definition of the "public" features, - use libosmocore's API for the "public" features, - separate both "internal" and "public" features: - the "public" features continue to live in bitvec, - the "internal" features become flags, - s/BTS_FEAT/BTS_INTERNAL_FLAG/g. Change-Id: Icf792d02323bb73e3b8d46384c7890cb1eb4731e
2020-02-17osmo-bts-sysmo: merge measurement data and payloadPhilipp Maier1-0/+1
For osmo-bts-sysmo the MPH INFO MEAS IND indication is still sent separately. Lets merge the measurement information into the PH DATA Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Related: OS#2977
2019-11-14Introduce BTS feature BTS_FEAT_MS_PWR_CTRL_DSPPau Espin Pedrol1-0/+1
It indicates whether BTS model supports managing an MS Power Control Loop over HW/DSP instead of using the software based osmocom algorithm present in osmo-bts. osmo-bts-trx own loop implementation is considered to be a "DSP/HW" one since it acts on lower layers and interferes with osmocom algorithm since it controls the same end variable "lchan->ms_power_ctrl.current", this way we make sure both aren't enabled at the same time. Old behavior in kept: if common upper-layer algo is not enabled explicitly in VTY (ms-power-control osmo) and bts-trx specific lower layer algo is neither enabled (osmotrx ms-power-loop <xyz>), then no power control is done at all. Related: OS#1851 Change-Id: I49706926b1e962b18791174627bc3cc0cd0cd9d5
2019-05-10osmo-bts-sysmo: fix: indicate BTS_FEAT_CBCH support on OMLVadim Yanitskiy1-0/+1
It seems osmo-bts-sysmo does support CBCH (Cell Broadcast), but for some reason it doesn't report BTS_FEAT_CBCH to the BSC. Change-Id: I42dd3f84c44c210d9255e17153372bf252f897a1
2018-11-18bts: Allocate TRX for BTS dynamically, deprecate -tPau Espin Pedrol1-0/+5
No need to pass -t num_trx anymore to specify number of TRX to use. It is calculated based on dynamic allocation from VTY config. Using parameter -t is flagged as deprecated and is transformed into a NOOP por backward compatibility. As a result, TRX now are allocated after the BTS is allocated and initial config (pre-VTY) is applied. A new function bts_trx_init() is added, to set default config on each TRX during allocation and before setting VTY config on it. A new per BTS model function bts_model_trx_init() is added, to allow per model specific default configuration of each TRX. Change-Id: Iab1a754ab12a626759f9f90aa66f87bdce65ac9c
2018-03-17Get rid of 'struct gsm_bts_role_bts'Harald Welte1-3/+1
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-02-22bts: use feature list instead of speech codec tablePhilipp Maier1-12/+0
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-22octphy: ensure all BTS models set featuresPhilipp Maier1-0/+5
Most of the BTS models do not or do register not all of thier features to the the feature list. - Update/extend the feature lists for all BTS-Models Change-Id: I26765a64153368016921c2ac115b1c4aec9bc5e4
2018-02-19rsl: do not allow MODE MODIFY request with unsupp. codec/ratePhilipp Maier1-0/+12
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
2017-07-05sysmo: Remove non longer valid -p option from helpPau Espin Pedrol1-1/+0
The dsp-trace-flags command line argument was removed in 9684099ae905e6e61cbc326035d0b37c480f6172 Change-Id: I8dbcdc7080ca3f7d7968aeef24422faa75d925fe
2017-06-15Set and report BTS featuresMax1-0/+5
Set (possibly incomplete) list of BTS model-specific features and report them in response to attribute request via OML. Change-Id: I5f8a6681c3562ec261441e84dde6e085b516d92f Related: OS#1614
2017-05-10Set BTS variant while initializing BTS modelMax1-0/+1
This will allow proper BTS attribute reporting via OML in follow-up patches. Change-Id: I1c49d6c39fb4dac7a46ee25ceacf4c6ef0f0b736 Related: OS#1614
2016-02-15declare pcu_direct in pcu_if.hHarald Welte1-2/+1
2016-02-15LC15/sysmobts: Don't try to refer to fl1h from PHY configHarald Welte1-28/+0
At the time the phy link / phy instance level VTY configuration commands are parsed, we did not yet call l1if_open() and thus pinst->u.{lc15,sysmobts}.hdl == NULL. PHY or PHY instance specific configuration must thus be stored inside the phy_link or phy_instance itself, and not inside the (not yet existing) handle. We solve this by moving around some parameters: * clk_use_eeprom/clk_cal/clk_src/calib_path get replicated in phy_instance * min_qual_{rach,norm} are moved into the generic part (which means that osmo-bts-octphy and osmo-bts-trx should also implement them)
2016-02-15sysmobts/LC15: Fix startup-time DSP trace flage configurationHarald Welte1-7/+1
Due to the changes introduced by the phy_link API, it's not easy to set the default DSP trace flags via a command line argument anymore. We now rather introduce a persitent VTY configuration command, by which the default DSP tracing configuration can be set (for each PHY). The persistent trace flags are stored in the phy_instance, while the current operational run-time flags are in fl1h->phy_instance.
2016-02-15sysmobts: make clock calibration eeprom default (again?)Harald Welte1-0/+1
2016-02-15port sysmobts to phy_link/phy_instance abstractionHarald Welte1-28/+14
2016-01-22merge bts-specific main function into common/main.c:bts_main()Harald Welte1-259/+65
This removes a lot of copy+paste duplication between different BTS models.
2016-01-22Add new bts_model_ctrl_cmds_install()Harald Welte1-3/+0
This is one step in making the main() functions of different BTS models more similar, so we can share one code rather than multiple copies of it.
2016-01-16sysmoBTS: port 'press Ctrl+C twice for immediate exit' from osmo-bts-trxHarald Welte1-2/+5
2015-12-06use talloc pool for msgb and ortp libraryHarald Welte1-1/+1
by using a talloc pool, we avoid having to go back to the libc malloc pool all the time. The msgb allocations and libortp allocations happen quite frequently during processing and show up as one of the high priority items in osmo-bts profiles on sysmoBTS with 14 concurrent TCH/H calls (highest load scenario). talloc still consumes significant CPU, this is mostly due to the zero-initialization of all the associated buffers. Strictly speaking we shouldn't need this, but any change there would require lots of testing, as there might be hidden assumptions in the code? In some percentage of cases, talloc still seems to fall back on malloc for msgb allocations, which is currently a bit of a mystery. The pools certainly are large enough, talloc_reprt() rarely reports more than a few tens of kilobytes used by the msgb pool.
2015-12-05osmo-bts-sysmo: Disable DSP trace flags by defaultHarald Welte1-1/+1
2015-09-22Allow TRX 0..254 at VTY, even if less TRX are availableAndreas Eversberg1-1/+1
Instead of limiting the number of TRX at VTY to the actual number of supported TRX, VTY allows to configure any possible number of TRX. If a TRX is configured, which is not supported by BTS model, an error message is returned, which states that the given TRX is not supported.
2015-09-22Allow one or more TRX to configure via VTYAndreas Eversberg1-1/+1
2015-09-22ABIS: Introduce bts_model_abis_close to indicate ABIS link failure.Andreas Eversberg1-0/+6
sysmocom-bts model shuts down on link loss, but other models may not want this, so shutdown is moved tor bts_model_abis_close of osmo-bts-sysmo.
2015-09-22Fix: Call e1inp_vty_init() before reading config fileAndreas Eversberg1-0/+1
2015-09-22Add gsmtap option to command line to main.c of osmo-bts-sysmoAndreas Eversberg1-1/+19
2015-09-22Move gsmtap VTY commands from osmo-bts-sysmo to common partAndreas Eversberg1-2/+2
2014-12-16sysmobts: Remove unused global variablesHolger Hans Peter Freyther1-2/+0
We do not need to have these variables anymore. Just remove them.
2014-11-10bts: In case the line isn't created do not exit with code 1Holger Hans Peter Freyther1-1/+1
The service file will prevent a re-launch of the sysmobts.service in case the main process exits with '1'. In case the ethernet is not available yet the routine would fail and the sysmobts process will not be restarted. unable to connect/bind socket: Network is unreachable <000f> input/ipaccess.c:885 cannot open OML BTS link: Network is unreachable unable to connect to BSC root@sysmobts-v2:~# echo $? 2 Fixes: SYS#736
2014-08-24ctrl: Add sysmobts control interfaceHarald Welte1-0/+1
This sysmobts specific control interface allows for clock calibration from an external program by means of the "trx.0.clock-info" and "trx.0.clock-correction" values.
2014-08-24fix build problem introduced with control interfaceHarald Welte1-1/+0
2014-08-24use libocmocore #defines for VTY port numbersHarald Welte1-1/+2
2014-08-24ctrl_if: Move control interface to port 4238Harald Welte1-1/+2
... which is now defined in libosmocore
2014-08-24add control interface to common BTS (for thermal attenuation)Harald Welte1-0/+5
Using this control interface, an external program can request attentuation of the transmitter for thermal management reasons. The external application doesn't have to know anthing about the actual transmit power, but it can just configure a certian value of milli-dB (1/10000 bel) and update (increase/decrease) that value depending on the thermal environment.
2014-08-24New generic transmit power handlingHarald Welte1-5/+1
In order to support transmit power reduction by thermal management as well as the variety of new internal / external PA configurations of BTSs, we need a slightly more complex system. Also, as at high power a single dB can be quite a big difference, we are now doing all computations in milli-dB(m), i.e. 1/10000 bel. Ramping is now used both for up and down ramping, as that is useful in cases where you want to gracefully shut down a cell by shrinking its radius, gradually handing over subscribers to neighboring cells. Furthermore, this code is becoming part of the 'common' codebase, as it is not really specific to how sysmobts is working. The user can specify a single aggregate value for external system gain/attenuation. Let's say you have 1dB loss of antenna cable, so you can put that as 'user-gain -1' into the config, which means that a 'transmit power of 20dBm' will be compensatet for that and the TRX is instructed to output 21dBm to compensate the cable loss. Similarly, external PAs can be described by a positive user-gain. One of the next steps will be to communicate those values and the nominal power capability of the specific BTS to the BSC, so the BSC will automatically show correct signal levels in the VTY and log files. The code includes provisions for future extensions regarding * an external and an internal PA with calibration tables * a thermal attenuation setting to be controlled by the site manager
2014-07-31sysmobts: Make sure that the omlrouter is in a FHS pathHolger Hans Peter Freyther1-2/+3
I wondered if I should use the 'abstract namespace' feature of Linux but just put the router into /var/run/ to make it work out of the box. Change the signature to provide a sane error message.
2014-07-31sysmobts: Begin with an OML router that will be used by the managerHolger Hans Peter Freyther1-0/+8
Begin with the basics of a OML Router. This is currently only capable of accepting a connection and read messages but it will evolve into a router in multiple stages. The first usage will be by the sysmobts-mgr. An OML Error Indication will be sent by the sysmobts-mgr and it will be forwarded to the BSC. In the second step we will set a relative power reduction from the sysmobts-mgr. In the long-term this code will be used to communicate with a second TRX.