aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/utils.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
2018-11-22Fix deprecated gsm_arfcn2band(), use gsm_arfcn2band_rc()Vadim Yanitskiy1-1/+4
Change-Id: I45aae70f4bc3f4f85d267dafb757debdef1bb7d7
2018-03-17Get rid of 'struct gsm_bts_role_bts'Harald Welte1-2/+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
2017-02-14sysmobts: fully support trx_power_paramsHarald Welte1-26/+0
The simplistic approach of sysmobts_get_nominal_power() is insufficient to cope for devices that have an internal PA. The Actual transceiver board is driven to a certain level (0..23 dBm typically), and the external PA must be handled independent of that. Increasing the return value of sysmobts_get_nominal_power() would result in the sysmoBTS mainboard attempting to reach a higher power, which is wrong. This change affects sysmoBTS 1020 and 1100. It causes power-ramping to be used by default. For 1002 and 2050, no behavior change is expected. Change-Id: Ieff75d5becaa80a2097b6e744c75c2d16259c9a4
2017-02-07Revert "sysmobts: Add correct nominal transmit power for sysmoBTS 1020"Harald Welte1-2/+0
This reverts commit 1965b0d88082e427930f95071e992f0d9be79047, which was a premature change. The 10dB gain are not the power of the TRX board, but are due to an internal, factory mounted PA, i.e. the trx_power_params.pa. This will be introduced after adding a set of tx_power.c unit tests. Change-Id: I524b63c51fb0fe1f90ced28486a8e712f2dc50ae
2017-02-02sysmobts: Add correct nominal transmit power for sysmoBTS 1020Harald Welte1-0/+2
The sysmoBTS 1020 is a 2W BTS, hence its nominal transmit powre is 33dBm. We must handle this correctly based on the model-nr in the EEPROM. As a result, proper power ramping will be made during start of the unit by default. Change-Id: I91a78dadfd7d2e1bc74c8086808c55effdcdd132
2014-08-25Revert "add nominal transmit power for upcoming sysmoBTS 1020 and 1100"Harald Welte1-6/+0
This reverts commit d0866fe4773918381c80c7362ef2d043845ebf54, as it was a bit premature. We need to address this more properly.
2014-08-25add nominal transmit power for upcoming sysmoBTS 1020 and 1100Harald Welte1-0/+6
2014-08-24New generic transmit power handlingHarald Welte1-84/+0
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-30sysmobts: Make it possible to slowly ramp up the output powerHolger Hans Peter Freyther1-6/+81
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-06-22sysmobts: Fix typo in the commentHolger Hans Peter Freyther1-1/+1
2014-05-25sysmobts: Revert all sysmobts-mgr related changesHolger Hans Peter Freyther1-166/+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-20sysmobts: Have a common prefix for the enumHolger Hans Peter Freyther1-2/+2
Make the manuf_type_id enum have a common prefix for the symbols.
2014-05-20utils: Used the enum manuf_type_id in the parameter of add_manufacturer_id_labelÁlvaro Neira Ayuso1-2/+2
Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
2014-05-20utils: Classify the OML message using the return typeÁlvaro Neira Ayuso1-5/+7
Classify the OML message and return the manufacturer type or an error. Currently ETSI, ip.access and Osmocom are known. Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
2014-05-20sysmobts: Do not access out of bound stringÁlvaro Neira Ayuso1-3/+3
One can either use "strlen(str) + 1" but not add one to the result of the sizeof.
2014-05-20sysmobts: Separate IPA and OML check into two methodsÁlvaro Neira Ayuso1-23/+27
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-18sysmobts: Add beginnings of an OML router and create Failure Messages in the ↵Álvaro Neira Ayuso1-0/+160
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-04-29osmo-bts-sysmo/utils.c: Added a function for calculate the power transmitterÁlvaro Neira Ayuso1-0/+11
Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
2013-11-27sysmobts: Print the model number that is not supported.Holger Hans Peter Freyther1-0/+5
When using an old kernel on revD hardware we will read garabge from the EEPROM and it is nice for debugging to see which model number has been picked.
2013-10-28sysmobts calibration: skip bands not supported by L1Harald Welte1-0/+16
If L1 tells us that a certain band is not supported, then there is no point in even trying to read+load calibration tables from EEPROM or files.
2013-10-09sysmobts: Set nominal transmit power depending on sysmoBTS modelHarald Welte1-0/+20
This enables the use of up to 5W for each TRX in a sysmoBTS 2050.
2013-10-09Do not attempt to initialize L1 with a band unsupported by hardwareHarald Welte1-8/+18
If the EEPROM tells us that a given unit doesn't support a given band, we shouldn't try to use it, even if the BSC tells us to use an ARFCN in such an unsupported band. The reason is simple: The given BTS unit might have band specific filter / duplexer / PA.
2013-06-24sysmobts: Introduce an auto-band config to ease DCS/DCS, PCS/PCS changesHolger Hans Peter Freyther1-0/+87
During development one switches from GSM900 to GSM1800 and GSM850 to GSM1900. This commit attempts to make this switch more easy. GSM1800 and GSM1900 have overlapping ARFCNs. This means that the mapping from bands to arfcn is not injective. Because of that I removed the code to deduce the band from the ARFCN. This was done in commit 8c3d807b3fc785ffb18aeb97355150c92221e8a0. The auto-band option allows to move between GSM900/GSM1800 and GSM850/GSM1900. Add a simple testcase with these auto-band configurations.