aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2016-09-30DTX: move ONSET detection into separate functionMax1-0/+3
Move code from tch.c (lc15, sysmo) into generic function which: - check if talkspurt is happening - cache SID if necessary or invalidate cache - fill in CMR & CMI prefix This also fixes the problem when SID FIRST was cached without sending just like SID UPDATE instead of being sent right away. Change-Id: I6c7016a54749abadeef4fd4f5b6f750b256fb916
2016-09-30DTX: further AMR SID cache fixes (lc15, sysmo)Max2-3/+5
* consolidate AMR CMR and CMI handling in common/amr.c * use it in save_last_sid() * remove dead code * properly compute RTP payload length for AMR * use save_last_sid() for FR & HR as well * invalidate cached SID if SPEECH frame is received Fixes: OS #1800, #1801 Change-Id: I5a1c1ad0b0a295a50e67775a4db85f1d331755ed
2016-09-30DTX: move scheduling check inside repeat_last_sidMax1-2/+2
Note: this also require changes to properly link against libosmocodec - see 2bb65be159dfdabf664fec569b343320301701b0 in libosmocore. Change-Id: I96594cf3aa1013d505bd20069d5bf261d9a2aefb
2016-09-24DTX: check Marker bit to send ONSET to L1Max2-1/+4
If Marker bit is set than it's a talkspurt which we have to explicitly indicate to L1 by first sending ONSET message and than actual voice data in a separate message. This change affect sysmobts and LC15 hw. Change-Id: I88c41568bcb0d82699f617adc4ad192603dd1bb6 Related: OS#1750
2016-09-23DTX: fix SID repeat schedulingMax1-0/+2
Previously SID retransmission was scheduled incorrectly based on GSM frames instead of voice frames. Fix this by using GSM Fn only as elapsed time estimation: * move saved SID retransmission into generic function from lc15 and sysmo specific code * split retransmission time check into separate generic function * compute estimation for elapsed time since last retransmission using GSM Fn Change-Id: Ib054b458a7345d9ba40dba53754ca59ab099c8e8 Fixes: OS#1799
2016-09-06octphy: fix build: Revert "octphy: fix for multiple trx with more than 1 dsp"Neels Hofmeyr1-2/+1
This reverts commit 06968beab90806cba94c8b331276e4dc209c152b. Theoretically, this patch makes a lot of sense, but in order to be able to build osmo-bts-octphy until the headers version is clarified, revert use of usCentreArfcn: Above commit uses an usCentreArfcn member that is never defined in the history of our octphy-2g-headers.git. This usCentreArfcn does exist in a code snapshot OCTSDR-2G-02.05.00-B780-DEBUG, which is not (yet?) publicly available. Also, the current headers version is apparently 02.07, though the octasic version numbers have been known to cause confusion among osmocom folks. This along with one other revert fixes this build problem: make[3]: Entering directory '/n/s/octphy/git/osmo-bts/src/osmo-bts-octphy' CC l1_oml.o l1_oml.c: In function ‘l1if_trx_open’: l1_oml.c:1350:13: error: ‘tOCTVC1_GSM_TRX_CONFIG’ has no member named ‘usCentreArfcn’ oc->Config.usCentreArfcn = plink->u.octphy.center_arfcn; ^ l1_oml.c:1352:13: error: ‘tOCTVC1_GSM_TRX_CONFIG’ has no member named ‘usCentreArfcn’ oc->Config.usCentreArfcn = trx->arfcn; ^ In file included from ../../include/osmo-bts/logging.h:5:0, from l1_oml.c:33: l1_oml.c:1365:13: error: ‘tOCTVC1_GSM_TRX_CONFIG’ has no member named ‘usCentreArfcn’ oc->Config.usCentreArfcn, oc->Config.usTsc, oc->RfConfig.ulRxGainDb, ^ Change-Id: I222766f6961f5f35aa3651e2907e3e908fe9a66e
2016-09-02common/rsl: move decision whether to chan act ack/nack to common functionNeels Hofmeyr1-2/+1
Prepare for a dyn TS patch that needs to call rsl_tx_chan_act_ack() directly without the rel_act_kind decision. Add function rsl_tx_chan_act_acknack() to wrap rsl_tx_chan_act_ack() and rsl_tx_chan_act_nack(). Move the decision whether to drop the ack/nack, based on lchan->rel_act_kind, to the new function, losing some code dup. Change all callers to use the new function; drop the two older ones from rsl.h and make them static. Note: for nack, the exception for dyn TS in PDCH mode was missing (rsl_tx_chan_act_nack() had only the rel_act_kind != LCHAN_REL_ACT_RSL condition, but should also have had the dyn TS exception as in rsl_tx_chan_act_ack()). I already know that this exception will again be removed in an upcoming commit, but for patch readability it logically makes sense to add it here. To easily include the nack case, drop the check for which pchan the dyn TS is operating as, because a rel_act_kind == LCHAN_REL_ACT_PCU implies that it is either already in or trying to become PDCH mode. Change-Id: I57ba60c670730c6d7877a6a9b96ece0a7679a0bb
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