aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-oc2g
AgeCommit message (Collapse)AuthorFilesLines
2019-11-14cosmetic: Fix trailing whitespacePau Espin Pedrol1-1/+1
Change-Id: I7b9a091226e3c7dd60b3921ab0d53688f42d1a4d
2019-10-17Fix common misspellings and typosMartin Hauke5-11/+11
Change-Id: I403b9029f57fec3fdec2c1e2cbeac0f6eab53f24
2019-10-11log: set L1 SAPI log contextOliver Smith1-0/+44
Add a new common L1 SAPI enum, to unify all the BTS specific SAPIs. Translate to this enum, and set the context for uplink messages in each BTS specific implementation. Set the context for downlink messages in the common l1sap code, by converting the osmo_phsap_prim back to the SAPI value (mostly looking at chan_nr). The new functions for doing this conversion, get_common_sapi_by_trx_prim() and get_common_sapi_ph_data(), are based on the existing to_gsmtap() and gsmtap_ph_data() functions. Note that we can't set the uplink SAPI context in the common code, because then we can't set it as early as possible. In this patch, the SAPI context is set for the PHYs where the SAPI is readily available. With additional conversion from the RSL channel, the SAPI context could be set for osmo-bts-trx in a follow up patch. Related: OS#2356 Depends: (libosmocore) I814cb3328d99faca9220adb5a80ffb934f219d7d Change-Id: I6b7bb2e1d61502b61214f854a4ec5cbb7267545b
2019-10-05struct gsm_bts: Add model_priv pointer handing bts_model specific dataPau Espin Pedrol2-2/+11
Currently there's bts-virtual specific fields in gsm_bts which is not used by other models and are always allocated. An alternative would be having a union with different structs inside, one per model, but since we already have the bts_model abstraction, in this case it makes more sense to use that abstraction instead of filling code with preprocessor ifdefs to guard against non-defined types, etc. Existing model specific data is moved there. This new infra will be user further in forthcoming commits. Related: OS#4215 Change-Id: Ib17a752cdbaa7d5eb8c5dfa0b197f80a4f38b38e
2019-08-05Remove undefined param passed to {logging,osmo_stats}_vty_add_cmdsPau Espin Pedrol1-1/+1
Since March 15th 2017, libosmocore API logging_vty_add_cmds() had its parameter removed (c65c5b4ea075ef6cef11fff9442ae0b15c1d6af7). However, definition in C file doesn't contain "(void)", which means number of parameters is undefined and thus compiler doesn't complain. Let's remove parameters from all callers before enforcing "(void)" on it. API osmo_stats_vty_add_cmds never had a param list but has seem problem (no "void"), so some users decided to pass a parameter to it. Change-Id: Ia4d1a7914308d1481fe31fe0986265ead339e61e Related: OS#4138
2019-07-21Move Access Burst link quality handling to L1SAPVadim Yanitskiy1-7/+1
Change-Id: I893ec9c6c2ebad71ea68b2dc5f9f5094dfc43b78 Depends: (libosmocore) Ie2a66ebd040b61d6daf49e04bf8a84d3d64764ee
2019-07-21Clarify and refactor link quality (C/I) handlingVadim Yanitskiy1-1/+1
The radio link quality is defined by C/I (Carrier-to-Interference ratio), which is computed from the training sequence of each received burst, by comparing the "ideal" training sequence with the actual (received) one. Link quality measurements are used by L1SAP to filter out "ghost" Access Bursts, and by the link quality adaptation algorithms. One can define minimum link quality values using the VTY interface. On the VTY interface we expect integer C/I values in centiBels (cB, 10e-2 B), while the internal structures are using float values in deciBels (dB, 10e-1 B). Some PHYs (sysmo, octphy, oc2g, and litecell15) expose C/I measurements in deciBels, while on the L1SAP interface we finally send then in centiBels. Let's avoid this confusion and stick to a single format, that will be used by the internal logic of OsmoBTS - integer values (int16_t) in centiBels. This will give us the range of: -32768 .. 32767 centiBels, or -3276.8 .. 3276.7 deciBels, which is certainly sufficient. Change-Id: If624d6fdc0270e6813af8700d95f1345903c8a01
2019-06-05Use #define RSL_CHAN_RACH for RSL Channel Number of RACHVadim Yanitskiy1-1/+1
Change-Id: I7f54fccdae6799e5f4d956a101e11c2d6f998546
2019-05-29osmo-bts-oc2g: Fix status LED responsibilitiesDaniel Willmann1-10/+2
osmo-bts-oc2g no longer modifies the status LED and instead leaves that to the bts manager. The service file now also creates a directory in /var/run needed for osmo-bts to communicate with oc2gbts-mgr. This status file is used by oc2gbts-mgr to figure out when the bts is operational. Related: SYS#4493 Change-Id: Ifae634c6c2ecec7d32298c0f266f91f3e81308f5
2019-05-28lc15,sysmo,oc2g: fix dsp-trace-flag commandNeels Hofmeyr1-1/+1
Remove the '~' from '|= flag', it is plain wrong. This affects the correct parsing of DSP trace flags from the config file only. The bug is not present in the interactive VTY command at runtime. Change-Id: I915971f49642967c969f5dd475e8faa960ef3960
2019-05-25Add severity to OML FAILURE EVENT REPORTHarald Welte1-3/+3
Example: The fact that the PCU has connected with a given version is not a *failure* in the first place, particularly not a MAJOR one. Let's allow callers of oml_tx_failure_event_rep() specify the serverity of the event that they're reporting to the BSC. Change-Id: I49af04212568892648e0e8704ba1cc6de8c8ae89
2019-04-15oc2gbts_mgr: use osmo_init_logging2() instead of osmo_init_logging()Philipp Maier1-3/+3
The function osmo_init_logging() is deprecated, lets use osmo_init_logging2() as suggested. Change-Id: Iebc80cd1f77f10a879d4536d788377f522dd853f
2019-04-08oc2gbts_mgr_calib: do not return NULL on integer functionPhilipp Maier1-2/+2
The functions oc2gbts_par_get_uptime() and oc2gbts_par_set_uptime() try to return with NULL, but both functions are declared as int. Lets return -EINVAL instead. Change-Id: I63b61be2940c59b221089d3d1501371b0116d89a
2019-04-08oc2gbts_mgr_calib: don't use fsync() on *FILE pointerPhilipp Maier1-1/+1
fsync() takes an integer file descriptor but we have a *FILE pointer here. Lets use fileno() first to convert the integer file descriptor to a FILE pointer. Change-Id: I46ffd8c680ba0b445cbbd133d5ce92b79e3d8d87
2019-04-08l1_if: add include for missing header filePhilipp Maier1-0/+1
the function bts_cbch_get() is used in l1_if.c. The function is declared in cbch.h. Lets include this header file in order to be complete. Change-Id: I95d7e89eed969dd5b3ccff0eebcc6c568196a97d
2019-03-27oc2g: change log level for calibration file errors to FATALPhilipp Maier1-3/+3
The log level of the messages that notify calibration file loading problems is NOTICE, but since it is a severe problem when calibration can not be loaded lets change it to FATAL Change-Id: I32aed25ca7925f1c776f00b37f404a58a85ddbc7 Related: OS#3823
2019-03-27oc2g: generate failure event report in case of bad calibrationPhilipp Maier1-30/+7
When the TX/RX calibration files can not be loaded a failure event report should be sent to the BSC. Lets send a failure event report when calbration data is either bad or can not be loaded (see also remvoed TODOs). Change-Id: I3318470518b34807a443f7cb78c7091b4a3d4481 Related OS#3823
2019-03-20oc2gbts_mgr: use msgb_talloc_ctx_init() instead of msgb_set_talloc_ctx()Philipp Maier1-1/+1
The function msgb_set_talloc_ctx() is deprecated. Lets use msgb_talloc_ctx_init() as suggested. Change-Id: I61f80a7b11e9117e8b71c49b7d81d2f959f3150d
2019-03-19oc2g: l1if: delay trx initialization to avoid race conditionPhilipp Maier1-2/+14
On links with high latency it can happen that RADIO CARRIER OPSTART is carried out to early, even before SET BTS ATTRIBUTES is carried out. This means that important parameters for the initalization are not yet set and the TRX initalization failed. Lets delay the TRX initalization a bit in order to be sure that all BTS attributes are set before the initalization is carried out. Change-Id: Id3bdc88d28417e422d2c0c33b03be06f1a4706c2 Related: OS#3782
2019-03-18oc2gbts_mgr_vty: remove calls to vty_install_default()Philipp Maier1-15/+0
The function vty_install_default() is deprecated and throws a compiler warning that suggests to remove it, so lets remove it. Change-Id: I1a4afb6e352bed9a5af794b39b984a7ddef36e08
2019-03-18oc2g: remove unused define constant FACTORY_ROM_PATHPhilipp Maier1-1/+0
Change-Id: I5eb12332568c85bfd2dd83eb5ef1d9c1c9bbfd27 Related: OS#3823
2019-03-05OC-2G: Nominal transmit power is 25 dBm, not 40Harald Welte2-4/+4
According to the OC-2G product specifiacation, the maximum output power is 25 dBm. This should be reflected in the code, there's no point in claiming to be able to trnasmit 40 dBm - which just creates confusion on all levels (such as the logs, where Tx power is claimed to be ramped up to 40 dBm right now). Closes: OS#3823 Change-Id: Ia6b3476ab2f9279f8905b8c7cfd07ef7b0a939ed
2019-02-20oc2g: vty: Compilation error fixes due to commented codePau Espin Pedrol1-2/+5
Change-Id: Id2b16b9acd15d0c80085fac0fdc2a57173ebb0a0
2019-02-20oc2g: Remove unused static functionPau Espin Pedrol1-12/+0
Change-Id: I4d0a476f84bc9e92e02f94c3990daddeeaa3c5d5
2019-02-20oc2g: Remove unused variablesPau Espin Pedrol4-5/+0
Change-Id: I6738adb6b0ae50905351c67c259d7a77cb250624
2019-02-19oc2g: fsync requires fd instead of file streamPau Espin Pedrol1-3/+3
Similar fix was done for lc15 in a8041edb. Change-Id: Idcd9dc48ea2e1f80bfdf5cf8b6bf55d8150fe0d2
2019-02-19oc2g: led_sleep_cb: pass correct ptr to llist_move_tailPau Espin Pedrol1-1/+1
Fix compilation warning. At runtime it's not a big issue because the "list" field is the first field of the led_list (struct lc15bts_led_timer_list) variable. Hence, the address passed is the same. Similar to commit fixing same issue in lc15 in 080302f8. Change-Id: Ie393a21bc3a725520343c70941cb4f591b313420
2019-02-19oc2g: Cleanup of get_hwversion_descPau Espin Pedrol1-8/+3
Remove unused variables, wrong return type values, etc. Change-Id: I5565b904c72a9ac1775818416f05c64722d366b2
2019-02-19oc2g: Add get_hwversion_desc to header filePau Espin Pedrol1-0/+1
it's used in oc2g/main.c and it needs to be in a header file. Similar as previously done for lc15 in 19795c5a. Change-Id: Ic6826d8c8ff5c648158493454a80704bb956b51d
2019-02-19oc2g: Fix compilation error (comment mark inside comment)Pau Espin Pedrol4-18/+19
Change-Id: Ib27b31825744ea397b5b4eb258da78f5f834895c
2018-12-04oc2g: Fix headers missing during make distcheckPau Espin Pedrol1-1/+1
Change-Id: I2e4aad190c44fea047b4aefcf55335789fa4c571
2018-11-26bts_model: Allow TS connect to be processed asynchronouslyPau Espin Pedrol1-3/+7
This commit doesn't change internal logic of any model, only the API to be able to return result of connect TS asyncrhonously since some models (like osmo-bts-trx) require some time to process the result. This way PDCH ACT/DEACT (N)ACK can be sent once the result of this long process is known. For instance, nowadays in osmo-bts-trx we PDCH (DE)ACT ACK before getting the result from SETSLOT on the TRX iface. With this new API, bts_model_ts_connect doesn't return any value synchronously. Instead, it is expected to always end up calling cb_ts_connected with the return code from the TS activation process. 0 is considered a successs, while any other value is considered an error. Change-Id: Ie073a4397dd2f1a691968d12b15b8b42f1e1b0cf
2018-11-22Fix deprecated gsm_arfcn2band(), use gsm_arfcn2band_rc()Vadim Yanitskiy2-3/+13
Change-Id: I45aae70f4bc3f4f85d267dafb757debdef1bb7d7
2018-11-18bts: Allocate TRX for BTS dynamically, deprecate -tPau Espin Pedrol1-5/+7
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-10-29{oc2g,sysmo}-mgr-calib: Fix build against gpsd >= 3.18Pau Espin Pedrol1-1/+11
Change-Id: I1f9176432b3a01bd5e8c179dc269e391df2d446f
2018-10-27Add OC-2G BTS sourcesOmar Ramadan46-0/+13340
Change-Id: I327384fe5ac944dc3996a3f00932d6f1a10d5a35