aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-litecell15
AgeCommit message (Collapse)AuthorFilesLines
2016-08-30dyn TS: sysmo,lc15: ph_data_req: fix PDCH mode detectionNeels Hofmeyr1-1/+1
Though this patch theoretically makes a lot of sense, it is not entirely clear why dyn TS are working without it. Committing due to common sense, not to fix any actual breakage. Change-Id: I6136cb42a4d627ebefc963eb5321fadfe63cca4b
2016-08-10sysmo,lc15: ts_connect_as(): log error also for pchan_as == TCH/F_PDCHNeels Hofmeyr1-1/+2
Change-Id: I76c868a1e70af16268a6fa42dc736cf0b288ecdb
2016-08-08Fill measurements data for L1SAPMax1-1/+5
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-27dyn TS: sysmo,lc15: chan_nr_by_sapi(): add missing assertionNeels Hofmeyr1-0/+1
Addition of GSM_PCHAN_TCH_F_TCH_H_PDCH should have added these assertions. They clarify that only 'real' pchan types are expected in this function. Change-Id: Ifd4b6820861ef716237e7eeed149b2add9e7d485
2016-07-25dyn TS: implement litecell15 specificsNeels Hofmeyr2-9/+33
For chan_nr_by_sapi(), add GSM_PCHAN_TCH_F_TCH_H_PDCH to pick_pchan(). Add GSM_PCHAN_TCH_F_TCH_H_PDCH to pchan_to_logChComb[] for first pchan initialization. In ts_connect_as(), make sure that callers pass proper "real world" pchan types, i.e. reject the "meta" GSM_PCHAN_TCH_F_TCH_H_PDCH pchan constant. In ts_opstart(), connect as PCHAN_NONE since we will only know the desired pchan when the first RSL chan activ is received. Add GSM_PCHAN_TCH_F_TCH_H_PDCH to lchan_to_GsmL1_SubCh_t(), by using its current "real" pchan mode. Call cb_ts_[dis]connected() unconditionally, i.e. not only for TCH_F_PDCH when a pending flag is set. The cb_ts_[dis]connected() will be a no-op if the pchan type is not dynamic. Change-Id: Ie30323f968da25027045c42a7ae7f1e70ca711ae
2016-07-25lc15/oml.c: rename ts_connect() to ts_opstart()Neels Hofmeyr1-2/+2
ts_connect() is only called during OPSTART. Name it such because a special case for OPSTART will be added there for dyn TS. Change-Id: Iba6880d94142096a8371b08f7404035912cadbb0
2016-07-25cosmetic: clarify TCH/F_PDCH related naming and commentsNeels Hofmeyr1-2/+2
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-06-24Remove duplicated nibble shift codeMax1-39/+0
Those functions are now part of libosmocore. Change-Id: Iab3206e3b41caff23f656a727605032df9798953
2016-06-23DTXu: move copy-pasted code to common partMax1-18/+4
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-11/+5
* Remove static qualifier * Remove duplicated code - use generic function instead Change-Id: I37a312648771f58d3087471083cfcebbd97ccf1d
2016-06-23fix compiler warning: remove unused variable 'i' in calib_verify()Neels Hofmeyr1-1/+1
Change-Id: Iea6bc47182d021523285aea8d3f6a93ee4eec0eb
2016-06-23fix compiler warning: remove useless 'static' storage class for struct declNeels Hofmeyr1-1/+1
Change-Id: I4d5d11dd89449e4c9315f963576265bccad7e68c
2016-06-22vty: install orphaned trx nominal power commandNeels Hofmeyr1-0/+2
The cfg_trx_nominal_power_cmd added 12 days ago in 58e4e18206501c3bffa65f0b876bbc5ebe175d6e was floating. Actually add it to the TRX_NODE. Change-Id: I89d638b2e2bb1fb9baeabe566035ff171f4bfad0
2016-06-22dyn PDCH: lc15: complete for litecell15-bts: implement bts_model_ts_*()Neels Hofmeyr1-2/+49
Analogous to 63b296bdd9a25134ee61ce6f269750e796a8bfca on osmo-bts-sysmo. Implement bts_model_ts_disconnect() by sending an MphDisconnect message to L1. Pass a disconnect callback to invoke dyn_pdch_ts_disconnected() in common/rsl.c. Implement bts_model_ts_connect() by calling ts_connect_as(). Pass a connect cb to invoke dyn_pdch_connected() in common/rsl.c. Change-Id: I8c8c3244c726fd6055cedb22ee11706994ff9cd4
2016-06-22dyn PDCH: lc15: handle TCH/F_PDCH init like TCH/FNeels Hofmeyr1-1/+2
Analogous to 57fc1124e1649fa2b08ef143697689aca4677625 on osmo-bts-sysmo. Change-Id: If65c5a86cbc1b5556b71de8a6744d92113fbbcba
2016-06-22dyn PDCH: lc15: add ts_connect_as(), absorbing ts_connect() gutsNeels Hofmeyr1-3/+10
Analogous to 294fbe104b9fb12f06f7cebe68a4b7a6ed28d5ef on osmo-bts-sysmo. For upcoming dyn PDCH switching, I want to be able to set the pchan dynamically upon ts_connect() and not continue with OPSTART ACK, but with the dyn PDCH. Thus recoin ts_connect(ts) to ts_connect_as(ts, pchan, cb) and leave ts_connect() as a thin wrapper to leave init code unchanged. Change-Id: I7a27193168f83e8c40b6e54d1842f4502d0475e5
2016-06-22dyn PDCH: lc15: chan_nr_by_sapi(): handle TCH/F_PDCH according to ts->flagsNeels Hofmeyr1-3/+15
Analogous to 0d10f0e482cdd50acc916e75a8b3ba1beb94227c on osmo-bts-sysmo. According to the PDCH Active flag, handle a TS as TCH/F or PDCH. Change-Id: I0c97b360136f76bdae8d70d06af9a31fdf75c1ba
2016-06-22lc15: add L3 handle to l1prim messagesNeels Hofmeyr2-11/+127
Analogous to 7158c2ed082eaca6063a501e490e8d3c3b181560 in osmo-bts-sysmo. Place a layer 3 handle into GSM L1 messages to better match up confirmations to respective requests. This handle is a uint32_t transparently returned in the confirmation messages, so a match-up is easy to add. So far, a GSM L1 confirmation message received for a preceding L1 Request was matched only by the prim_id. That meant that only one instance of the same primitive could be waiting for a confirmation at any given time, or the responses would get mixed up: the struct wait_l1_conf instances entered into the fl1h->wlc_list queue would be returned to a possibly mismatching confirmation handler. (Seen during testing of dyn pdch switching.) Send the hLayer3 handle out via prim_init(), using new static functions to produce handles on different scopes: * l1p_handle_for_trx() * l1p_handle_for_ts() * l1p_handle_for_lchan() (These could possibly move to a more general .h/.c file later.) Remember the hLayer3 handle in * struct wait_l1_conf. Match the incoming confirmations' and stored hLayer3 handles up in, and remove a now obsolete comment from: * is_prim_compat() Since the hLayer3 members are at different byte offsets in GsmL1_Prim_t.u.*, use large switch statements to set/get the value: * In prim_init(), extend existing switch statement to set in GsmL1_Prim_t. * Add l1p_get_hLayer3() to retrieve from GsmL1_Prim_t (could possibly move to a more general .h/.c file later). Note that some messages are already using the hLayer3 handle, and will overwrite it after calling prim_init(), so those are not affected. Change-Id: I17f95ba744c3e944a2241809106506f8dd1b24f0
2016-06-22fix lc15 build: put src/common/libbts.a left of -losmogsmNeels Hofmeyr1-1/+1
When switching to the gsm_chan_t_names string list from libosmogsm, libosmogsm actually became a dependency of the local libbts.a. The breaking change is in openbsc.git 29048b2a80b5865ffc41fa4401113c5826227e23 and came in here because gsm_data_shared.h is included from openbsc. Change-Id: I70e5735fc2a212305182d46a7e8485d0199ade7b
2016-06-18Move copy-pasted code into common partMax1-73/+4
Related: OS#1750 Change-Id: Ic4342eaf7e32a0e9a5f2b16dd196a1f5f03152a9
2016-06-18DTX: add support for AMR/HRMax1-1/+35
Change-Id: Id744b67904011eb328b24c46a645b3eb53525c04 Fixes: OS#1562
2016-06-17dyn PDCH: add bts_model_ts_connect() and _disconnect() stubsNeels Hofmeyr1-0/+11
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-15LC15: TRX nominal TX power can be used from EEPROM or from BTS configurationMinh-Quang Nguyen3-3/+224
Change-Id: I173f4126cea41959d48def07bff25fcd29894b7e
2016-06-15LC15: Hardware changes:Minh-Quang Nguyen17-310/+296
- Change system devices path - Remove obsoleted sensors and add new sensors - Change TRX and sensors numbering to 0,1 instead of 1,2 (JFD) Change-Id: I5172daf68d3145a6398e37df87df21b0e5affe42
2016-06-15LC15: Bring back DSP trace argumentMinh-Quang Nguyen2-2/+13
Change-Id: I822651d9ba4959ce5885a2c0362f1ea583b724da
2016-06-14DTXu: mark beginning of speech burst in RTPMax1-6/+44
Set Marker bit in RTP header to mark the beginning of talkspurt. Change-Id: I3dd70ad8ff94356e3c3cc5458255f6c23534783e Related: OS#1562
2016-06-14DTXd: store/repeat last SIDMax3-17/+118
Store last SID received over RTP and repeat is if necessary (no new SID or SPEECH frames) according to codec-specific scheduling rules. Related: OS#1563 Copy-paster from I4d23846a27d3dbd2a6e75e481c1efcdb2a85f305 for LC15. Change-Id: I29acea6e8bbf426330ce52554a48afb5d2ef1679
2016-06-14Fix debug outputMax1-0/+1
Previously frame number was not saved in case of PRIM_TCH rendering many debug statements with g_time useless. Copy-paste from ef30f50d5d6d5f863fc147d05ccdceb89284934e. Change-Id: I952b39458d921622d5964cbdcc2f4e45ff9ea951
2016-06-12Use libosmocodec for AMR RTPMax2-17/+12
Use libosmocodec function to parse RTP with AMR payload in sysmoBTS and LC15. This replaces "manual" parsing of AMR frame with function covered by test suite and makes adding DTXd support easier. Related: OS#1563 Change-Id: I1464f9a12e3f92926d03d5dd5d18e8f0f7206dd9 Reviewed-on: https://gerrit.osmocom.org/204 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-06-12Add DTXd support for sysmoBTS and LC15Max1-0/+2
* set/clear DTXd activity indicator for measurement reporting * set DTXd status based on information from RSL Related: OS#1563 Change-Id: I148a75725c4e5089b6f2da6e9adcbe94170d3257 Depends-On: I4a033b03fcd0deb4db7a38273b5407511dbf1d6c Reviewed-on: https://gerrit.osmocom.org/220 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-03-22LC15: properly initialize unmapped phy instancesMax1-0/+7
Fixes: OS#1665
2016-03-22LC15: add stubs for phy link/instance defaultsMax1-0/+8
2016-02-15LC15: remove bogus check_for_ciph_cmd() copyHarald Welte1-45/+0
2016-02-15LC15: set nominal transmit power of 37dBm for all TRXHarald Welte1-2/+5
2016-02-15LC15: Fix 'make dist' (missing include files)Harald Welte1-2/+2
2016-02-15Use consistent naming of binaries accross BTS modelsHarald Welte1-3/+3
Let's use one systematic naming schemes for all BTS models. osmobts-trx -> osmo-bts-trx sysmobts -> osmo-bts-sysmo lc15bts -> osmo-bts-lc15
2016-02-15declare pcu_direct in pcu_if.hHarald Welte2-4/+1
2016-02-15move auto-band configuration commands to common/vty.cHarald Welte1-26/+0
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: Call l1if_reset() after l1if_open()Harald Welte2-4/+2
We want to start talking to the L1 from the point the PHY link has been opened, and not only once an OML connection has been established.
2016-02-15LC15: Remove clk_cal (another unused struct member)Harald Welte2-2/+0
2016-02-15LC15/sysmobts: Don't try to refer to fl1h from PHY configHarald Welte4-52/+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-15LC15: Remove unused clk_use_eeprom and clk_src fieldsHarald Welte2-3/+0
this is part of the copy+paste legacy from sysmobts and can be removed as it is not used.
2016-02-15sysmobts/LC15: Fix startup-time DSP trace flage configurationHarald Welte4-9/+57
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-24/+4
this function is intended to be used by VTY commands that need to resolve a given PHY interface.
2016-02-15LC15: fix compiler warning against more recent libosmovtyHarald Welte1-1/+1
2016-02-15LC15: Fix printed msgq file names in error messagesHarald Welte1-4/+2
2016-02-15LC15: cosmetic whitespace fixesHarald Welte5-13/+13
2016-02-15LC15: port litecell 1.5 support to recent osmo-bts masterHarald Welte9-351/+174
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-15LC15: configure.ac: Allow specifying an alternate include-dirHarald Welte1-1/+1
The user can now use ./configure --with-litecell15=/my/local/path
2016-02-15LC15: use talloc pool for msgb and ortp libraryYves Godin1-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. From 2ecbf871301cdc36c0212dd7526fc94ffa4597d1