aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-litecell15
AgeCommit message (Collapse)AuthorFilesLines
2017-07-19lc15: port lc15bts-mgr changesMax19-375/+1988
That's mostly changes related to lc15bts-mgr from https://gitlab.com/nrw_noa/osmo-bts branch nrw/litecell15 based on eb5b7f80510b603579f7af6d7d5ead296c2fa260 commit. I wanted to incorporate vty and hardcoded paths changes so we can use it from this point without major backward-incompatible changes as a base for future ports. Change-Id: Iabbaedc84aaaa594150a4e5445c16dd1f6f89858 Related: SYS#3679
2017-07-18lc15: fix BTS revision and hw optionsMax2-7/+15
* remove typo in logging * add missing return statement * fix compilation warnings * add detailed logging for supported GSM band and related errors Change-Id: I73bccd81ec56845ba11b939937b295eb0f51b4a8 Related: SYS#3728
2017-07-18lc15-mgr: update parameter read/writeMax2-1/+4
Better match upstream lc15 code: * fsync on parameter write * use permanent storage directly for parameters Change-Id: Iac150bf2ebffc5fa9544b0f3b19cd647996fc8b6 Related: SYS#3728
2017-07-18lc15: cleanup board parameters readingMax1-22/+25
* move common code into separate function * print error similar to parameter reading code Change-Id: Icf3285d7bb921d212cb8945e835be2c81189fb87 Related: SYS#3728
2017-07-10Use osmo_dump_gsmtime to log fn across different layersPau Espin Pedrol1-2/+5
This commit also fixes a missing end of line in the log output of handle_ph_data_ind Change-Id: I049f58d51333d3590361db5c0105e6899a862af6
2017-07-10Allow passing low link quality buffers to upper layersPau Espin Pedrol2-12/+9
We want to always call l1if_tch_rx and l1sap_up in order to avoid losing triggering events on the upper layer. With this change, the upper layer will increase correctly seq + ts for RTP. It will then send an RTP packet with only the header and no payload, which is not correct but at least we avoid drifting the RTP clock. Upcoming patch in the series solves this issue. This patch assumes that we are not lossing data events from the physical layer and that we receive an event every 20ms, even if the MS is not transmitting due to DTX. Depends on libosmocore If4ae20c22b881e94585dad710f17b9e37f77bf82 Change-Id: If5df8940fab833eb4e3ed851880b66987d356031
2017-07-04sysmo, litecell15: Make sure all TCH events are triggeredPau Espin Pedrol1-0/+5
Change-Id: Ie674c7ec40838af36308c6998f227fa452ace4b4
2017-07-04Fix annoying trailing whitespacePau Espin Pedrol3-13/+12
This whitespace keeps being automatically fixed by editor, polluting my patches. Change-Id: If0ba1321ed326c1498e3f60b611bd962f2a9484a
2017-07-04Use L1P instead of L1C for TCH logging and allocationPau Espin Pedrol1-12/+12
L1C is for L1-Control primitives, while TCH channels are L1 Data channels. Change-Id: I07ea3a7326bfcb62271d58deb0743311f6d97c8b
2017-06-30litecell15/tch.c: Clean up use of empty bufferPau Espin Pedrol1-3/+4
Make code easier to read and avoid reading first byte of the buffer if size is 0. Change-Id: Ib9ee967c0f42098b3a0569e9d84f23832eb4f2d5
2017-06-29osmo-bts-litecell15: Fix missing frame number in MEAS INDPhilipp Maier1-2/+3
The layer 1 interface (l1_if.c) for osmo-bts-litecell15 does not include the frame number into the measurement indications it forwards to higher layers. The frame number is required to properly detect the end of a measurement period. change process_meas_res() to properly include the frame number into the l1sap primitive (struct osmo_phsap_prim *l1sap) Change-Id: Iee9c8f88b05cd5dba9920bb08e079a643e713237
2017-06-24LC15: properly handle BS-AG-BLKS-RES as received from BSCMinh-Quang Nguyen1-1/+1
Closes: OS#2014 Change-Id: Icf437e621d1991f6185e31a0953773309e2bf5ac
2017-06-19Move parameter file opening into separate functionMax5-61/+52
* use talloc for file path allocation * print detailed error on failures This simplifies troubleshooting of lc15bts-mgr failures. Change-Id: I86c93a2a4f080e8ac1517be93f58f6ffd00d248c Related: SYS#3686
2017-06-15Set and report BTS featuresMax1-0/+4
Set (possibly incomplete) list of BTS model-specific features and report them in response to attribute request via OML. Change-Id: I5f8a6681c3562ec261441e84dde6e085b516d92f Related: OS#1614
2017-05-29Consistently check for minimum attribute/TLV length in RSL and OMLHarald Welte1-2/+1
Make more use of TLVP_PRES_LEN() instead of plain TLVP_PRESENT() and implicitly assuming a certain length of the information element. What this obviously doesn't introduce is some kind of error generation/reporting in case the minimum length is not fulfilled. An IE that's too small is silently ignored by TLVP_PRES_LEN() and treated as if the IE wouldn't exist in the first place. Change-Id: If5c4eee65711c49bc8ba4675221b1d5fd16198e9
2017-05-10Set BTS variant while initializing BTS modelMax1-0/+1
This will allow proper BTS attribute reporting via OML in follow-up patches. Change-Id: I1c49d6c39fb4dac7a46ee25ceacf4c6ef0f0b736 Related: OS#1614
2017-02-10all models: fix vty write: bts_model_config_write_phyNeels Hofmeyr1-9/+5
The vty write for phy/inst is broken, leading to a written-out config being unparsable; fix all of these: - in common/vty.c, actually call bts_model_config_write_phy_inst(). - in sysmo and lc15 write the phy instance elements in bts_model_config_write_phy_inst() and not in bts_model_config_write_phy(), which lead to writing the members above their parent 'instance'. - sysmo, lc15 and oct omit the bts_model_config_write_phy_inst() implementation. This did not cause a compilation problem because it was in fact never called. - sysmo writes 'clock-source None' when clk_src is zero, leading to unparsable config (related: OS#1944). Instead omit the 'clock-source' when zero. - osmo-bts-trx seems to be the only part that lacks nothing, yet it also didn't work properly because bts_model_config_write_phy_inst() was never called. This problem existed since commit d784e50747b8cf0ce505489e1451f75be5ccbd4b "Introduce new phy_link and phy_instance abstraction" Change-Id: Icc54fa70045c8fa58e78cf9f788c21a437edfbd4
2017-02-01Fix AMR HR DTX FSM logic.Jean-Francois Dionne2-6/+15
Fix SID_FIRST_INH detection during speech and when SID_FIRST is interrupted by FACCH. Fix SID_UPDATE_INH detection during silence and when SID_UPDATE is interrupted by FACCH. Add a delay for SID_FIRST to appear at the right time after FACCH. Fix extra byte sent in downlink for SID_FIRST and SID_UPDATE. Change-Id: Ia811305e15541f2376005df736bd610e8b0d2f69
2017-02-01DTX: fix "unexpected burst" errorJean-Francois Dionne1-0/+1
Fix error during FACCH interruption of DTX for AMR HR. Max's note: added fix for sysmobts. Change-Id: Ib064952331b4f89676ee68a3d8078b1d9debe570 Related: OS#1801
2017-01-31sysmo,lc15: fix memory leak at each call placedJean-Francois Dionne1-1/+3
Max's note: added same fix for default case and ported it to sysmobts. Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031
2017-01-12lc15,sysmobts l1_if: fix memleak in handle_mph_time_ind()Jean-Francois Dionne1-0/+1
Change-Id: I3061060235a488b114b636b3af9a2253a94de1e8
2017-01-10DTX: fix SID-FIRST detectionJean-Francois Dionne1-1/+1
Max's note: made similar modification to osmo-bts-sysmo/tch.c Change-Id: I76e62783b73803dfc0d32693a68020a9d89878b8 Related: OS#1801
2017-01-04DTX AMR HR: fix inhibitionMax2-1/+6
* Unlike in AMR FR, in AMR HR incoming ONSET have to be treated differently depending on whether we've recently sent SID UPDATE or EMPTY frame. Split ST_SID_U FSM state into 2 states to accommodate for that and make sure that additional states specific to AMR HR are not used for AMR FR. * Avoid sending E_VOICE and E_SID_U in corresponding states as those do not initiate FSM state transitions anyway. This decrease extra load from FSM signalling which otherwise would be triggered on per-frame basis. * Introduce separate signal for SID First P1 -> P2 transition to avoid confusion with E_COMPL and E_SID_U initiated transitions from P1 state. * Don't init DTX FSM for SDCCH channels. Change-Id: I229ba39a38a223fada4881fc9aca35d3639371f8 Related: OS#1801
2016-12-01Fix AGCH/PCH proportional allocationMax2-18/+7
Do not assume that 1 == BS_AG_BLKS_RES but take that information from SI3. Note: due to current implementation quirks we activate channels before SI3 obtained, than we deactivate channels upon receiving SI3 and activate them again. This might not be necessary once we migrate to proper OML state machines. This affects lc15 and sysmo hw. Change-Id: I11377b12680ac3b2f77f80e742b6f0af63fc9c1e Related: OS#1575
2016-12-01Remove duplicated codeMax2-6/+4
Remove lchan deactivation related code duplication to facilitate future use for dynamic CCCH re-activation. Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9
2016-12-01DTX DL AMR: rewrite FSM recursionMax2-32/+32
Add explicit state for recursion (sending the different payload data in response to the RTS request for same FN) and corresponding transition. Remove ST_FACCH_V as with new explicit recursion handling it becomes unreacheable. This makes it easier to maintain preemption (interruption of current procedure due to FACCH or Inhibition). This also reduces the number of possible transitions out of each state thus reducing graph's cyclomatic complexity. Change-Id: If39b68083d23a4a35f468a5d75f54eb733ebfd14
2016-11-11Replace link_id constant with defineMax1-3/+3
Instead of using constant for link_id directly, use shared define value. Change-Id: Ibf3d439d8893bd994ba089796175b6c635db2cf8
2016-11-08DTX DL: tighten check for enabled operationMax2-4/+4
Introduce dtx_dl_amr_enabled() function which checks that DTX is enabled and FSM is allocated and use it for all corresponding checks. Change-Id: Ifa68b641265ed14f242765c85e40da2d1021a541
2016-11-03DTX fix ONSET handlingMax2-3/+2
* re-introduce ST_ONSET_F to guard from repetitive ONSET messages in case multiple FACCH occur duriing DTX silence period. * produce ONSET event after both SID FIRST and UPDATE in case of AMR FR. * always dispatch E_SID_F (SID FIRST) signal if in talkspurt. * allow E_SID_* right after ONSET (zero-length talkspurt). * add missing E_ONSET signal description. * fix FSM transitions for AMR HR *Inhibited and First P*. * fix incorrect return from l1if_tch_encode() in ONSET FACCH with incoming SID UPDATE Change-Id: I0e9033c5f169da46aed9a0d1295faff489778dcf Related: OS#1801
2016-10-28DTX DL: split ONSET state handlingMax2-8/+47
Handle ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send later on in next response to L1 RTS. FACCH have higher priority so it preempts both voice and silence alike - hence we can send ONSET immediately but still have to track previous state in order to get back to it gracefully. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Note: this requires patch for OpenBSC which adds FACCH buffer to tch.dtx struct. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1802
2016-10-2711bit RACH support for osmo-bts-litecell15bhargava1-3/+40
Based on the indication from L1, number of bits in RACH and burst type is determined. Appropriate parameters are filled in osmo-bts-litecell15. These parameters are sent to osmo-pcu for processing of the RACH. Change-Id: Ie5207a15424fb287febf74e830297531232accde
2016-10-18Fix lc15 buildMax1-1/+1
The error seems to be introduced in 21142f789812553b56f493d79184f5a31ab7b1cd Change-Id: I620ac6774fb47479d74bc4470ccc6edd379600ba
2016-10-18Replace magic number with defineMax1-2/+3
SDCCH occupy lchan 0..3 in combined configuration so for CCCH we've always used lchan[4] - replace it with CCCH_LCHAN define and add comment. Change-Id: Ic5d742c292d638f119c6b4672120c1950adeb7f0
2016-10-14msgb ctx: use new msgb_talloc_ctx_init() in various main()sNeels Hofmeyr1-3/+1
Change-Id: I31d62d5e1f0b272985fdef5013270d385c4b988a
2016-10-13DTX DL: use FSM for AMRMax3-38/+102
Use dedicated FSM to handle all DTX DL related events: - add explicit checks if DTX DL is enabled (fixes regression for non-DTX setup introduced in 654175f33bd412671e3ef8cdd65c0689d10f278c) - fix handling of AMR CMI for SPEECH frames - add FSM for DTX DL - sync with corresponding changes in OpenBSC's - handle FACCH-related DTX ONSET events This affects both lc15 and sysmobts and requires corresponding change in OpenBSC (Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd). Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31
2016-10-12Move copy-pasted array into shared headerMax1-6/+0
Change-Id: I377ece2845830e3defab2d515f44b629ce5aed8e
2016-09-30DTX: send AMR voice alongside with ONSETMax3-10/+16
When ONSET event happens (either via Marker bit or due to unmarked talkspurt) we should first send Onset event to L1 and than send voice data in response to the same PH-RTS.ind. Change-Id: I2a7b89430ca49eee4a350c5f980bd6bcbc386347
2016-09-30DTX: move ONSET detection into separate functionMax1-36/+19
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)Max1-81/+33
* 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-25/+9
Note: this also require changes to properly link against libosmocodec - see 2bb65be159dfdabf664fec569b343320301701b0 in libosmocore. Change-Id: I96594cf3aa1013d505bd20069d5bf261d9a2aefb
2016-09-30LC15: Clarify msgb ownership / fix memory leaksMax1-22/+31
This is similar to 21b020b33633683d7c785af15c773aab0f79d0de which changes the way msgb is allocated/freed in sysmobts. Change-Id: I393828a7b1fb5927453ee25f54d605a5d3ea7087
2016-09-26DTX: remove misleading commentMax1-1/+1
There's no SID stored in UL direction so there's nothing to remove. Change-Id: I3f587a66406bc6a02b859e826f4903641fcc5a15
2016-09-24DTX: check Marker bit to send ONSET to L1Max3-11/+36
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-24sysmobts_mgr, lc15bts_mgr: fix tall context for telnet vtyNeels Hofmeyr1-1/+1
Instead of passing the msgb ctx to telnet_init(), pass the *mgr* ctx. Change-Id: I213fe52648a1937d8f8c1730ce787e42f0add75f
2016-09-23lc15, sysmo: Use SID_FIRST_P1 to initiate DTXMax1-2/+1
Some phone seems to not send SID_FIRST_P2 message which seems like a different understanding of the DTX spec. L1 accommodates for that by using P1 to supply data for SID. Hence we should use it to initiate DTX and ignore P2 message in case of AMR HR. Change-Id: Iaf993b89caa0ad49b97d1c745dcaf039f867f018
2016-09-23DTX: fix SID logicMax3-9/+19
Previously receiving SID via RTP always caused it's transmission to L1 regardless of the time which might have resulted in excess traffic. Fix this by only saving SID data and transmitting it later on as necessary according to 3GPP TS 26.093 A.5.1.1. Change-Id: Ifcdc5c60d0238b704a94f6778d4e00f2b087b090 Fixes: OS#1801
2016-09-23DTX: fix SID repeat schedulingMax1-58/+10
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-23DTX: fix last SID savingMax3-13/+7
Previously SID was saved explicitly by each BTS model (lc15, sysmo) instead of relying on generic function. Fix it by using generic function and propagating necessary parameters for it. Change-Id: Ie545212cce5ed2b3ea3228597f18a473f5e1deb4 Fixes: OS#1800
2016-09-17log: sysmo,lc15: tweak log about sapi_cmds queueNeels Hofmeyr1-3/+6
The osmo-bts log used to say this a lot: DL1C <0006> oml.c:758 (bts=0,trx=0,ts=0,ss=1) End of queue encountered. Now empty? 1 - Move this to DEBUG level instead of NOTICE. - Tweak wording and logic so it says one of: [...] End of SAPI cmd queue encountered. Queue is now empty. [...] End of SAPI cmd queue encountered. More pending. Change-Id: I5a46c90d016cee9b50f32db2af568765d3cb74cc
2016-08-30Fix ip.access style dyn PDCH, broken in 37af36e85eca546595081246aec010fa7f6fd0beNeels Hofmeyr1-8/+19
Commit "sysmo,lc15: ts_connect_as(): log error also for pchan_as == TCH/F_PDCH" introduced a check for TCH/F_PDCH intended only for TCH/F_TCH/H_PDCH. It looked correct, but TCH/F_PDCH startup was designed differently: For TCH/F_PDCH, the idea was to look it up in pchan_to_logChComb[] and obtain the TCH/F channel combination, so that TCH/F_PDCH first initialize as TCH/F. So pchan was in fact intended to be passed as TCH/F_PDCH. For Osmocom TCH/F_TCH/H_PDCH, we've in the meantime added a ts_opstart() function that makes this decision explicitly. So, instead of reverting the erratic commit, add TCH/F_PDCH to ts_opstart(), for both sysmo and lc15. In ts_opstart(), move to a switch statement to resolve the actual pchan to use for ts_connect_as(). Drop TCH/F_PDCH and TCH/F_TCH/H_PDCH from pchan_to_logChComb[] and comment. Change-Id: I376b92a06f4cbe943c1c913dea7487fac53a7d08