aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2016-08-30cosmetic: common ts_is_pdch()Neels Hofmeyr1-0/+1
Have one common ts_is_pdch(), placed in lchan.c, since this file is pretty empty and pretty close to ts. Publish in gsm_data.h. Remove the if-style implementation from l1sap.c, and instead implement in a switch statement. This prepares for upcoming ts_is_pdch() usage in ph_data_req() for sysmo and lc15. Change-Id: Ib78d663fdbac5a1d7053f1b9d543649b66da00e2
2016-08-27Change interface in osmo-bts for 11 bit RACHbhargava2-3/+6
Interface structure between osmo-bts and osmo-pcu is updated with the parameters to differentiate the type of RACH and further support 11 bit RACH. The function prototype and definitions are changed accordingly. Interface version number is increased. Change-Id: I4f4c501b2d86d77c78de32a84b1804172ffb6f4d
2016-08-08Fill measurements data for L1SAPMax3-3/+10
Fill in values for BER, BTO, Link quality in L1SAP and send them to PCU. Note: this increases the version of BTS <-> PCU protocol. It also requires corresponding changes in libosmocore. All BTS models provide measurements data unless direct DSP access for PCU is enabled. For BTS-specific notes see below. Octphy: conversion from sSNRDb to Link Quality uses formulae which works in practice instead of what's documented for sSNRDb value. Subject to change in future revisions. TRX: C / I link quality estimator is not computed. Change-Id: Ic9693a044756fb1c7bd2ff3cfa0db042c3c4e01c Related: OS#1616
2016-07-28trx: Enable EGPRS handling through burst lengthsTom Tsou2-22/+33
Existing interfaces are coded with the implicit expectation of using a burst sequence length of 148, which is constant with GSM and GPRS. That changes with EGPRS, where the burst length may be 444 due to the use of 8-PSK instead of GMSK modulation. Setup the interface to accept and return a length value with the burst sequence. This allows 444 length bit vectors to/from the EGPRS decoder/encoder. Length is explicitly used as a identifier for 8-PSK vs. GMSK modulated sequences. Change-Id: I90b46b46b11b6ce280e7f8232d5a2fccec2d4f18 Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-25code dup: join [rsl_]lchan_lookup() from libbsc and osmo-btsNeels Hofmeyr1-2/+0
lchan_lookup in openbsc abis_rsl.c and rsl_lchan_lookup() rsl.c are the same code, except for the log context, which is only set in abis_rsl.c. The common code was factored out to gsm_data_shared.c in openbsc.git. Use the *rc return code argument to keep the logging part in the newly introduced thin wrapper lchan_lookup() in common/rsl.c. This also removes code dup for logging The rsl_lchan_lookup() implementation is removed from osmo-bts, so a recent openbsc is needed to build this. Change-Id: Ibc469b75e31560271be8633d524366442d27e6fb
2016-07-25trx: Add EGPRS tables, sequences, and mappingsTom Tsou1-0/+1
Includes EGPRS specific convolutional codes, interleaving tables and functions, burst mappings, training sequences, and parity checks from 3GPP TS 44.060 needed to handle MCS codings 1-9. Change-Id: Ie270398dd7a72f282ba53e646853d8de1eabee93 Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-25prepare dyn TS: split/replace conf_lchans_for_pchan()Neels Hofmeyr1-0/+2
Move the actual switch from static conf_lchans_for_pchan() into new 'public' function conf_lchans_as_pchan(), adding an explicit pchan argument. This allows passing a non-trivial pchan, for dynamic TS. conf_lchans_as_pchan() now takes a pchan argument, so distinguish the naming and drop the 'for_pchan' from conf_lchans_for_pchan(), which takes only a ts argument. Change-Id: I8e458501fff5503c243512aeb3469c12b1f2bbc4
2016-07-25cosmetic: clarify TCH/F_PDCH related naming and commentsNeels Hofmeyr1-3/+3
We're about to introduce a new kind of dynamic channel, which will also use parts of the ip.access mode dyn PDCH code paths. Make sure the general parts have general names and mark ip.access specific parts as such. Rename dyn_pdch_ts_[dis]connected() to cb_ts_[dis]connected(). Rename dyn_pdch_complete to ipacc_dyn_pdch_complete(). From cb_ts_[dis]connected(), factor out the current code into static functions ipacc_dyn_pdch_[dis]connected() -- this will make sense once the new dynamic kind is added to cb_ts_[dis]connected(). Change-Id: I7da5b7cb7b48572671f50e0dec97d9eec3083df1
2016-07-09cosmetic: osmo-bts-trx: add comment, fix comment typoNeels Hofmeyr1-2/+2
Change-Id: Iea62bd98954d0219ba597613cea6db63f7a6b396
2016-06-23DTXu: move copy-pasted code to common partMax1-0/+1
Abstract code for checking/setting lchan's UL SID flag and RTP Marker into generic function and use it for LC15 and sysmoBTS. Change-Id: Ica5392e92bab29164711163e7b01adb174272883 Related: OS#1750
2016-06-23Make get_lchan_by_chan_nr globally availableMax1-0/+2
* Remove static qualifier * Remove duplicated code - use generic function instead Change-Id: I37a312648771f58d3087471083cfcebbd97ccf1d
2016-06-18Move copy-pasted code into common partMax3-1/+11
Related: OS#1750 Change-Id: Ic4342eaf7e32a0e9a5f2b16dd196a1f5f03152a9
2016-06-17dyn PDCH: implement main dyn PDCH logic in common/Neels Hofmeyr1-0/+4
React on IPAC PDCH ACT and DEACT messages and invoke the PCU and bts_model_ts_* APIs to effect switchover. The dyn PDCH interaction is described in the comment to rsl_rx_dyn_pdch(), the main entry point for PDCH switchover. In case the bts_model_ts_* are not implemented (or return other errors), reply with an IPAC PDCH ACT/DEACT NACK. Add callbacks that mark steps in the PDCH switchover process, dyn_pdch_ts_disconnected(), dyn_pdch_ts_connected() and dyn_pdch_complete(). Add hooks in l1sap.c on channel activation and release confirmation, to call dyn PDCH callbacks. BTS dyn PDCH implementations should invoke dyn_pdch_ts_disconnected() and dyn_pdch_ts_connected() when bts_model_ts_disconnect() or bts_model_ts_connect() are called, respectively. (upcoming for sysmoBTS) Change-Id: Id2f5f77121a65d6c14eac127b3d4fb50e97a77ab
2016-06-17dyn PDCH: add bts_model_ts_connect() and _disconnect() stubsNeels Hofmeyr1-0/+3
Enhance bts_model_ API in preparation of dyn PDCH switching. These will be used to re-connect a TCH/F_PDCH TS in a different mode: either as TCH/F or as PDCH. All implementations so far return -ENOTSUP, and thus will cause a IPAC PDCH ACT or DEACT *NACK* to be sent to the BSC as soon as these messages are handled. Also add stubs in tests. Change-Id: I21e60c028a1333431c3ed000f788b654d1170b0d
2016-06-17pcu_sock: add pcu_connected() to query PCU availabilityNeels Hofmeyr1-0/+2
Will be used in upcoming dyn PDCH switching. Change-Id: I8031089ad5e9cb9690ca7e22facc53438f28e12a
2016-06-16Fix OML activationMax1-0/+2
Previously software activation could have been reported multiple times which broke proper BTS init. Introduce guard variable to ensure reporting happens only once. Note: this is just minimal workaround - ideally proper OML state machine should be implemented. Change-Id: Ifffbdb756bc5d2864f985c01a3299b839c4de7af Related: OS#1648
2016-06-15LC15: TRX nominal TX power can be used from EEPROM or from BTS configurationMinh-Quang Nguyen1-1/+2
Change-Id: I173f4126cea41959d48def07bff25fcd29894b7e
2016-06-14l1sap.h: fix wrong L1SAP_FN2PTCCHBLOCK calculation according to TS 45.002 ↵Minh-Quang Nguyen1-1/+1
Table 6 We have seen that the DSP time to time rejects PTCCH message from BTS due to invalid block number. As a result, we patched FN2PTCCHBLOCK calculation according TS 45.0002 Table 6. Change-Id: I8be1c8b9159c94788857c6de5440a418739f1212
2016-05-31Use libosmocore function for uplink measurementsMax1-3/+0
Related: OS#1563 Change-Id: Ide47e8e69e0d2d5859c5249b22f4bad22c18aa57 Reviewed-on: https://gerrit.osmocom.org/108 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-04-29Ensure TRX invariantMax1-0/+1
There is implicit invariant in trx_phy_instance() which is actively used by various hw-specific implementations to get TRX's phy instance. Let's make sure there's explicit assertion for this because there's been segfaults in the past related to it.
2016-03-21octphy: fix for multiple trx with more than 1 dspMax1-1/+2
Explicitly store and use "center" arfcn used by each dsp (1 dsp corresponds to 1 phy link).
2016-03-10pcuif: Do not bump the PCU_IF versionHolger Hans Peter Freyther1-1/+1
I had accidently bumped the version as I thought that osmo_ph_pres_info_type was part of the ABI. It is not an only internal to the BTS. Revert this part of the change.
2016-02-22Fix ocmo-bts-octphy interaction with OsmoPCUMax2-2/+2
Previously osmo-bts-octphy have not provided in-band presence information which cause off-by-one errors and misinterpretation of ph_data_ind by PCU. This fixed now by adding support for explicitly passing PH-DATA presence info. Corresponding check and in-band passing of presence information are removed. Note: this requires libosmocore version with osmo_ph_pres_info_type support integrated. [hfreyther/max: Remove + 1 from the decoded length]
2016-02-15make PCU socket and telnet port configurableHarald Welte2-1/+7
In some cases we'd like to run multiple instances of osmo-bts on a single machine. This is the case where we a multi-TRX PHY is to be used for several BTSs, or in case osmo-bts-trx has multple SDRs attached. This wa currently prevented by having a hard-coded PCU socket path and telnet port, which are now configurable via VTY / config file itself.
2016-02-15declare pcu_direct in pcu_if.hHarald Welte1-0/+2
2016-02-15move auto-band configuration commands to common/vty.cHarald Welte1-0/+3
It remains up to the individual BTS hardware models to decide whether or not to register those commands (depending on whether they support the feature) via cfg_bts_auto_band_cmd / cfg_bts_no_auto_band_cmd
2016-02-15LC15/sysmobts: Don't try to refer to fl1h from PHY configHarald Welte2-0/+12
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-0/+2
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-15introduce + use new generic vty_get_phy_instance()Harald Welte1-0/+2
this function is intended to be used by VTY commands that need to resolve a given PHY interface.
2016-02-15LC15: port litecell 1.5 support to recent osmo-bts masterHarald Welte1-0/+3
This includes changes required for * shared main() function accross all BTS models * use of the new phy_link / phy_instance infrastructure as the basis for true multi-TRX operation
2016-02-15port sysmobts to phy_link/phy_instance abstractionHarald Welte1-0/+1
2016-02-15Introduce new phy_link and phy_instance abstractionHarald Welte7-19/+134
This way we can model a flexible mapping between any number of PHYs, each having multiple instances, and then map BTSs with TRXx on top of those PHYs.
2016-02-15TRX: Move scheduler to src/commonHarald Welte3-1/+258
This is the final step to make the L1 scheduler generally available to other BTS models than OsmoTRX.
2016-02-03abis: Add a queue of OML messagesHarald Welte1-0/+1
When the oml_link is down or not yet established, we currently lost any OML messages that were scheduled for transmission to the BSC. Let's prevent that by keeping a queue of OML messages, which is drained at the time the OML link comes up again.
2016-01-22merge bts-specific main function into common/main.c:bts_main()Harald Welte2-0/+5
This removes a lot of copy+paste duplication between different BTS models.
2016-01-22Add new bts_model_ctrl_cmds_install()Harald Welte1-0/+2
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-17Fix T200 default valuesHarald Welte1-1/+1
t200_ms is an unsigned int [7] array, while the oml_default_t200_ms was an uint8_t[7] array, which we memcpy() to the former as default initializer. Fix this by turning oml_default_t200_ms into unsigned int, too.
2016-01-16TRX: replace some more 2715648 magic numbers with GSM_HYPERFRAMEHarald Welte1-0/+3
2016-01-16move 'GSM_FR_BYTES' and related definitiions to common partHarald Welte1-0/+7
2016-01-16LAPDm: Use T200 settings from OML rather than libosmocore defaultsHarald Welte1-0/+4
2016-01-04fix large amount of compiler warnings in common and sysmobts codeHarald Welte2-1/+2
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-22TRX: Implementation of MS power and timing advance loopsAndreas Eversberg1-0/+1
2015-09-22ABIS: Introduce bts_model_abis_close to indicate ABIS link failure.Andreas Eversberg1-0/+2
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-22TRX: Introduce osmobts-trx, a layer 1 implementation for OpenBTS tranceiversAndreas Eversberg3-0/+10
The code is quite complete, TCH and PDCH channels are not yet tested.
2015-09-22move MS power control handling from sysmobts to common partHarald Welte3-1/+11
MS uplink power control is required in pretty much any BTS, and we cannot assume that they PHY / L1 will always take care of it by itself. So the correspondign code is moved to common/power_control.c and called from the generic part of L1SAP. The corresponding VTY paramter has been moved from the sysmobts-specific trx VTY node to the common BTS VTY node.
2015-09-22Move gsmtap VTY commands from osmo-bts-sysmo to common partAndreas Eversberg1-1/+1
2015-09-22sysmobts: Clean up transitions for lchan cipher stateAndreas Eversberg1-2/+3
There are three transitions: 1. LCHAN_CIPH_NONE -> LCHAN_CIPH_RX_REQ -> LCHAN_CIPH_RX_CONF It is used to enable ciphering in RX (uplink) direction only. 2. LCHAN_CIPH_RX_CONF -> LCHAN_CIPH_RX_CONF_TX_REQ -> LCHAN_CIPH_RXTX_CONF It is used to additionally enable ciphering in TX (downlink) direction. 3. LCHAN_CIPH_NONE -> LCHAN_CIPH_RXTX_REQ -> LCHAN_CIPH_RX_CONF_TX_REQ -> LCHAN_CIPH_RXTX_CONF It is used to enable ciphering in both TX and RX directions. This is used when the channel is activated with encryption already enabled. (assignment or handover) In order to follow the order of these transitions, the RX direction must always be set before the TX direction. If no cipher key is set (A5/0), ciphering is set to ALG 0, but lchan cipher state remains at LCHAN_CIPH_NONE.
2015-09-22l1sap: Port code to new ciphering handlingHarald Welte1-0/+2
... introduced in 2cc37035d73191b71b9ba9c0d559a0da6a5f35e5