aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/main.c
AgeCommit message (Collapse)AuthorFilesLines
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.
2014-07-30sysmobts: Make it possible to slowly ramp up the output powerHolger Hans Peter Freyther1-0/+5
For systems with a bigger PA enabling the full output power at once might draw more current than a power supply can provide. This code will step up the output power in smaller steps to avoid this situation.
2014-05-25sysmobts: Revert all sysmobts-mgr related changesHolger Hans Peter Freyther1-104/+0
Harald is right and that the code is generally not ready for inclusion. I fell victim of trying to finish it while the code is not ready at all. It is better to re-introduce the patches in a smaller and more tested way. The right way would have been a branch were ready things are split-off the main/wip commit until everything is ready. Revert "sysmobts: Have a common prefix for the enum" This reverts commit 44980347f308fe5bbe48a933dbc81b82b53d310a. Revert "utils: Used the enum manuf_type_id in the parameter of add_manufacturer_id_label" This reverts commit 7d36e5ed46b630203167fc9d5d28e0087fdbd394. Revert "utils: Classify the OML message using the return type" This reverts commit afee0b7929a00500f9c204f3bc7e12f72451e832. Revert "sysmobts: Do not access out of bound string" This reverts commit f5f41e805195c8c3294a9e6a68b10f975fbabbbd. Revert "sysmobts: Separate IPA and OML check into two methods" This reverts commit 13a224063dfcee0be529fba1c8fb9be9c1fb261e. Revert "screenrc: osmobts-mgr now needs a config file" This reverts commit 0a1699ff8a5462c167c24e8b28186abb26331698. Revert "make sure osmobts-mgr.cfg file is included in tarballs" This reverts commit 14c60b425f8146f6a392d2d3de2979c817cd975e. Revert "sysmobts-mgr: Add VTY support for configuring it" This reverts commit c5fedd24c96a4ef6d7a0c0ed3c70d6ef0abd5c17. Revert "sysmobts: Add beginnings of an OML router and create Failure Messages in the sysmobts-manager" This reverts commit c6ab90b27006ff2d1fdfb0b1d7fc01e1dd4a696d.
2014-05-22sysmobts: Avoid memleak when multiple -c arguments are passedHolger Hans Peter Freyther1-1/+1
Rely on optarg pointing to an address that will be valid for the run of the entire application. Fixes: CID 1206578
2014-05-20sysmobts: Separate IPA and OML check into two methodsÁlvaro Neira Ayuso1-1/+10
I have split the function check_oml_msg, in two functions. One for checking if the ipa header is well-formed and in check_oml_msg, Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
2014-05-19Revert "sysmobts: Add support for changing the transmit power in sbts2050"Harald Welte1-121/+1
This reverts commit c64d42573894d8295b58b268a64541c914b69bcd. There are unfrtunately still too many problems with this patch to be merged at this point.
2014-05-18sysmobts: Add support for changing the transmit power in sbts2050Álvaro Neira Ayuso1-1/+121
Make the sysmobts-mgr send a manufacturer O&M message with the power reduction we want the sysmobts to apply. The sysmobts will handle this message and set the new tx output power. An ACK/NACK will be send as a response to the power reduction. Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
2014-05-18sysmobts: Add beginnings of an OML router and create Failure Messages in the ↵Álvaro Neira Ayuso1-0/+95
sysmobts-manager Make the sysmobts listen for OML messages on a Unix Domain Socket. Messages passing a sanity check will be forwarded to the BSC. In case the sysmobts-mgr detects a temperature above or below temperature threshold an OML failure message will be sent to the BTS. [moved confinfo into the #ifdef BUILD_SBTS2050] Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
2014-05-15abis: Separate initialization from connect for AbisHolger Hans Peter Freyther1-0/+2
Initialize the libosmo-abis VTY nodes more early so we can parse the config file that was created by "write". Introduce abis_init to initialize the libosmo-abis and modify abis_open to re-use an existing line. Update the comments. This has only been tried with the sysmobts-remote on x86. A TCP connection is opened toward the configured BSC. Fixes: SYS#285
2014-03-21systemd: Do not restart with a broken config file or suchHolger Hans Peter Freyther1-1/+1
Only restart in case of a crash or the exit(42) when the OML/RSL link is going down.
2013-11-27sysmobts: Make the eeprom/nominal power reading backward compatibleHolger Hans Peter Freyther1-3/+3
There are existing deployments where the EEPROM either contains a wrong value and/or the kernel can not be updated to support the different EEPROM of revD. Revert to the old behavior that if no nominal can be derived from the model_nr we assume that it is 23.
2013-11-27bts: Fix typos in the log messagesHolger Hans Peter Freyther1-1/+1
2013-11-27bts: Fix a typo in the log messageHolger Hans Peter Freyther1-1/+1
2013-11-05sysmobts: Use status flags instead of direct LED accessJacob Erlbeck1-0/+25
Currently the LEDs are being accessed directly from within the l1_if.c file. So the handling of rf mute and activate/deactivate both access LED_RF_ACTIVE directly. This may lead to an inconsistent LED status. This patch replaces these calls to sysmobts_led_set() by an abstract equivalent bts_update_status(), that uses a set of independant status ids. The associated values can than be combined into a visible LED status. Currently LED_RF_ACTIVE is on iff BTS_STATUS_RF_ACTIVE is set and BTS_STATUS_RF_MUTE is not set. Sponsored-by: On-Waves ehf
2013-10-09sysmobts: don't call sysmobts_get_nominal_power() twiceHarald Welte1-1/+1
... no need for that
2013-10-09sysmobts: Set nominal transmit power depending on sysmoBTS modelHarald Welte1-1/+10
This enables the use of up to 5W for each TRX in a sysmoBTS 2050.
2013-10-06abis: delay l1if_reset() until OML link is establishedHarald Welte1-2/+9
2013-10-06migrate away from our own abis.c code to libosmoabisHarald Welte1-23/+4
libosmoabis has a BTS-side implementation of the IPA protocol for years, and osmo-bts should have used that all the time. Unfortunately it had its own local hack, this patch is migrating to the libosmocore implementation.
2013-07-16sysmobts: Set the clock calibration to the value read from the eepromNicolas J. Bouliane1-0/+28
By default read the clock calibration from the EEPROM. It is still possible to set it using the cli. Signed-off-by: Nicolas J. Bouliane <nicolas.bouliane@nutaq.com>
2013-05-11sysmobts: Allow to enable realtime priority for the BTS processHolger Hans Peter Freyther1-1/+21
The latency to respond to a PH-READY_TO_SEND.ind may not be higher than 18ms. Currently we are using nice to increase our priority but for a heavily loaded cell this is not enough. Add an option to enable realtime scheduling and use it in the screenrc. Linux offers two realtime scheduling classes these are SCHED_FIFO and SCHED_RR. For SCHED_FIFO the process is running as long as possible (potentially taking all the CPU and never yielding it), for SCHED_RR the process can still be pre-empted at the end of the timeslice. Using SCHED_RR appears to be the more safe option as a run-a-way sysmobts process will not be able to take all the CPU time. For a very loaded cell we also require to use readv/writev to allow writing multiple primitives in one syscall.
2012-12-26ciphering: Handle ciphering support for A5/3 correctlyHolger Hans Peter Freyther1-1/+1
This was found and debugged by Sylvain. The BTS will always support A5/0 so we do not keep track of that, the first bit of the flags is used for A5/1, second for A5/2... but for RSL there is an offset to go from RSL to A5(x). Add a testcase and change the code.
2012-07-26PCU: Removed -P option, so GPRS support is always enabledAndreas Eversberg1-11/+7
2012-07-21Enable direct access to PDTCH queue of DSP by PCUAndreas Eversberg1-2/+8
Use "-P -M" to enable PCU and direct access.
2012-07-08PCU: Add PCU socket interface to BTS.Andreas Eversberg1-1/+12
A special command line option "-P" is used to enable socket interface and signal available GPRS MO object to BSC.
2012-06-03Use git-generated PACKAGE_VERSION in IPA IDTAG_SWVERSIONHarald Welte1-2/+0
We previously used to send the bogus string "0815" which was a hack from early development time, but is obviously not a generally useful idea.