aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2017-02-01Fix AMR HR DTX FSM logic.Jean-Francois Dionne6-69/+186
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-01rsl: Fix dropping of LAPDm UA message.Minh-Quang Nguyen2-0/+28
In some cases, when successive mobile originated calls are made, the LAPDm UA message gets lost because the channel is relased to early. Too overcome the problem we do not send relase indications immediately. Instead a flag will be set and the message stored and sent on the next TCH-RTS-IND. This commit adds the functionality to store the release indication msg, to rsl.c. It also addes the mechanism to forward the release indication to l1sap.c See also coresponding change in openbsc.git: Change-Id I15fc1ef8e9e83f009bde96de9a8e95702cffbce6 This patch is is a slightly improved/reformatted version of: https://gitlab.com/nrw_noa/osmo-bts/commit/95d1f15ad108c1c1869c1965144acd64c1395d8c Change-Id: Ie4f70c75f0137b4bd72d579b3a32575bac2fca38
2017-02-01DTX: fix "unexpected burst" errorJean-Francois Dionne2-0/+2
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-31cosmetic: remove stray newline in octphy's l1_oml.cPhilipp Maier1-2/+1
Change-Id: I6b60e5ee03b9afe6595bf44c4a963d23d03a4eb7
2017-01-31sysmo,lc15: fix memory leak at each call placedJean-Francois Dionne2-2/+6
Max's note: added same fix for default case and ported it to sysmobts. Change-Id: Ife1293e3238cfda16eac9c28e7e81ffe5595e031
2017-01-31cosmetic: Remove stray newlines in octphy_vty.cPhilipp Maier1-5/+0
Change-Id: I33f5c4a3f40c0299a7cdb9c62094f0f914edfc98
2017-01-31octphy VTY: fix vty write output for octphy's phy sectionPhilipp Maier1-7/+7
Fix invalid configuration generated by VTY 'write' command for the 'phy' section of osmo-bts-octphy. The problem was introduced during refactoring commit d784e50747b8cf0ce505489e1451f75be5ccbd4b (Sat Jan 9 13:13:37 2016 +0100, "Introduce new phy_link and phy_instance abstraction") Change-Id: Ib018e07e332aa8a6144fb2d87889032bd5fc2533
2017-01-25Add ctrl command to send OML alertMax1-0/+15
Change-Id: I228cb71ab945e19e3747843469a52f577ee32f97 Related: OS#1615
2017-01-25OML: internalize failure reportingMax6-55/+80
* make oml_tx_failure_event_rep() static and use osmo_signal_dispatch() wrapped into oml_fail_rep() to trigger event reports outside of oml.c instead of directly calling into OML layer * remove unnecessary formatting from text messages Related: OS#1615 Change-Id: I738555c547926e97b325ab53763c0076c42309bc
2017-01-24build: Do not require more headers from OpenBSCHolger Hans Peter Freyther1-1/+0
There should be no other OpenBSC headers included and nobody is using bsc_controlif_setup. Remove the include. This was introduced in 4723a195081f0f9ff561e360620ee0ade50a2b39. Change-Id: I581f938e8fe9161b1d7076cedd74ff192cea86b2
2017-01-23octphy: set tx attenuation via VTYPhilipp2-7/+29
add code to configure the transmision power via VTY Change-Id: I76bb8660eb1d8baeb6b8f69da4a6ba9ab7319981
2017-01-16l1sap: fix missing 'else's causing wrong rach frame expiry countsPhilipp1-2/+2
This bug was introduced in the recently merged commit 1e399f888e4e1c93e0e5b7fd69fce09a2587fb87 aka change-id I87f40f5f160a4f6750c4f3d06997fc4f24049303 Fixes: coverity-scan CID#160156 and CID#160155 Change-Id: I88ed1b3e59213acdf97f88eda097b8172b952a5e
2017-01-12l1sap: Fix expired rach slot countingPhilipp1-16/+56
The counting of the expired rach slots in l1sap.c is not correctly implemented. This commit fixes the implementation. The expired rach slots are now conted correctly according to the configured channel combination. If a CCCH and SDCCH are combined, only the frames related to rach slots are counted. Change-Id: I87f40f5f160a4f6750c4f3d06997fc4f24049303
2017-01-12lc15,sysmobts l1_if: fix memleak in handle_mph_time_ind()Jean-Francois Dionne2-0/+2
Change-Id: I3061060235a488b114b636b3af9a2253a94de1e8
2017-01-10scheduler: log lchan on which prim error occuredMax1-4/+49
Log both lchan and trx_chan_type (using introduced value_string). Change-Id: I80c581b54eeee371ee524a75a400d1e9ece16c68
2017-01-10DTX: fix SID-FIRST detectionJean-Francois Dionne2-2/+2
Max's note: made similar modification to osmo-bts-sysmo/tch.c Change-Id: I76e62783b73803dfc0d32693a68020a9d89878b8 Related: OS#1801
2017-01-10Remove obsolete define TLVP_PRES_LENMax1-5/+0
The libosmocore version required by configure.ac already has TLVP_PRES_LEN anyway. Change-Id: I3e33d9d1a6160ea17ab0a875c65a98129e3d19c1
2017-01-10CTRL: make the CTRL-Interface IP address configurablePhilipp2-3/+10
Currently the IP address where the control interface is bound to is hardcoded to 127.0.0.1. This leads to problems with multiple instances on one and the same machine. This commit integrates the ctrl interface bind option into the VTY, so that we can bind the ctrl interface to any IP address, just like we do it with the VTY already. Change-Id: If51e0c645c0789a4f4a8c51737fb81fb12f80829
2017-01-10OML: fix possible segfault: add NULL check in oml_ipa_set_attr()Philipp1-0/+2
oml_ipa_set_attr() is using gsm_objclass2mo() to determine the *mo object. However, it is possible that gsm_objclass2mo() returns a null-pointer. The code following up is using *mo without checking. Reject instead of dereferencing a NULL *mo. Fixes: coverity scan CID#159533 Change-Id: Ia2cc9bc504c46ca3843c43d712cd8649bfae9526
2017-01-10RSL: add assertions to check args of public APIPhilipp1-3/+22
The public functions in rsl.c do not check for null pointers, add assertions to catch null pointers early. Change-Id: I63f127ce70a4127180f90238f564b63e355216ec
2017-01-10RSL: drop obsolete NULL checkPhilipp1-1/+1
rsl_rx_paging_cmd() checks if the pointer *trx is NULL, this check does not make much sense since *trx has already been dereferenced without checking earlier in the code. Furthermore *trx is also a mandatory parameter which must not be NULL. Fixes: coverity scan CID#159534 Change-Id: I17dfb42ff404b2a1e18354fb7a7278089b407a79
2017-01-08Alarm on various errorsMax4-8/+85
Send OML Failure Report for unsupported BTS attributes and other errors. Change-Id: Ic163bcfb6361a8ebd39e0bc0f238ef51e2cb214e Related: OS#1615
2017-01-08Add Abis OML failure event reportingMax2-1/+29
Send 3GPP TS 12.21 ยง 8.8.2 Abis/OML failure event report. Change-Id: Ib1170edca2207752984a554d7a6a57c224f6d5f5 Related: OS#1615
2017-01-06Log socket path on errorMax1-2/+2
Change-Id: If912ac0bc815986de2a231facb5cf317a677be68
2017-01-06Move code to libosmocoreMax1-128/+7
With libosmocore commits I9c3bc15662949654e7bba6aad5488c69ee7d0c45 and Ieaaaed19da9c069fe451faa53d24c5b84d7d5615 functions to copy and merge parsed TLV were added as well as abis_nm_att_tlvdef_ipa TLV definition with related enums. Hence we can remove it from here. Change-Id: Ia4980062ea88ffe9019b201f84e92e006ae3c2e3
2017-01-06fix: dyn ts: uplink measurement reportNeels Hofmeyr1-1/+1
Fix pchan value used for uplink measurement decisions for dynamic channels in TCH mode. Fixes this error log message flooding the osmo-bts log when a dyn ts is serving a voice call: <0004> ../../../src/common/measurement.c:104 (bts=0,trx=0,ts=3,ss=0) no space for uplink measurement Change-Id: Id19316701fd8de6f295eeae0272eea0c315ab1b7
2017-01-04DTX AMR HR: fix inhibitionMax8-40/+130
* 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-22Fix some spelling errorsRuben Undheim1-1/+1
Change-Id: I5b57102f961f8fd7fb0689ceeaa37dd021535b17
2016-12-22DTX: don't always perform AMR HR specific checkJean-Francois Dionne1-6/+8
Disable check specific to AMR HR if not DTX is enabled. Change-Id: I8af1daffbd7e59fef6e671dbd9b820497f82d354 Fixes: OS#1892
2016-12-16Optionally use adaptive RTP jitter bufferingMax3-9/+33
* add vty option to manually enable adaptive RTP jitter buffering (disabled by default) on per-bts level * use this setting on per-lchan level when setting jitter parameters via vty at runtime * check and log result of osmo_rtp_socket_set_param() * note: older libosmo-abis will ignore this setting which will be properly detected via return value * if jitter buffer is disabled by configuring "rtp jitter-buffer 0" than adaptive buffering is disabled as well but it will be used if jitter buffer is set to different value for a givel lchan via vty Change-Id: I489f3c419039f40b57c2ef0641c176478b8d3566
2016-12-15DTX: fix TS adjustment for ONSETMax1-5/+15
Previously timestamp was always adjusted according to FN difference. In case of ONSET event this causes unnecessary TS gap with subsequent speech packet. Fix this by checking Marker bit before performing adjustment. Change-Id: I9bf4b45aa990dd4014334dd846f43f793366056c Related: OS#1801
2016-12-12osmo-bts-trx: fix lchan deactivationMax1-2/+4
Use chan_nr for deactivating lchan instead of lchan->nr: chan_nr is the RSL Channel Number IE value, a bitfield aggregation of lchan type bits (cbits) and lchan number (lowest three bits). The error was introduced in 36153239bfd0b633c4d259a9de0a759f41197a2b. Change-Id: I6dd7060422ab9d18743c1ff2ab419e3e7299d74d
2016-12-09Save RTP metadata in Control BufferMax1-2/+11
Having RTP metadata is useful for debugging - save Sequence Number and Timestamp next to Marker bit from RTP header. Change-Id: I359b3bcb74fbfc071547fe2f9d837829374fe997
2016-12-08DTX: add explicit check if DTX enabledMax1-0/+3
Check explicitly if DTX is enabled for AMR before checking if SID frame repetition is optional. Change-Id: I660688d56505798cade1495c30338fd6806a3259 Related: OS#1801
2016-12-05TRX: prevent segfault upon phy initMax2-7/+13
Previously if multiply phy instances were configured but not used osmo-bts-trx would segfault. Terminate with clear error message instead so user can correct configuration. Example configuration which caused problem: ... phy 0 instance 0 instance 1 ... trx 0 phy 0 instance 0 Note the 2nd instance of phy 0 which is not used in trx later on. Change-Id: Id979506731ea92401458f1060e87aeb690901539
2016-12-01Fix AGCH/PCH proportional allocationMax8-49/+42
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-01cosmetic: vty prompts: add space after '#'Neels Hofmeyr1-4/+4
Typically, our VTY prompts have space after the '#', but some of the osmo-bts VTY prompts don't: OsmoBTS# configure terminal OsmoBTS(config)# bts 0 OsmoBTS(bts)#gsmtap-sapi ccch Add spaces after the '#' to yield e.g. OsmoBTS(bts)# gsmtap-sapi ccch Change-Id: If0591a359e77f01abb76c4113181af7a7733ddd4
2016-12-01Remove duplicated codeMax7-21/+36
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 recursionMax6-136/+264
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-12-01trx: Add "maxdlynb" VTY command to control max TA for Normal Bursts.Alexander Chemeris5-1/+68
Originally `maxdly` command in osmo-trx was contrlling max TA for Normal Bursts. This was not a proper behaviour, because it was used to "control maximum distance a handset can attach from" which is controlled by Access Bursts max TA. Osmo-trx was corrected to apply `maxdly` to Access Bursts and a new command was introduced to contrl max TA for Normal Bursts - `maxdlynb`. This patch adds support for this configuration command into osmo-bts-trx. If you wonder why would you need that - some test equipment (namely R&S CMD57) has really bad timing sync and can generate signal a few symbols off. That prevents osmo-trx from properly receiving otherwise perfectly good bursts generated by CMD57. This configuration is a solution for this. Change-Id: Ib5d255299668ac1ef9f0ce95e016f55ba3c82277
2016-11-29osmo-bts-trx: remove obsolete include of netif/rtp.hNeels Hofmeyr1-2/+0
Change-Id: Idf364fd7d69446a7a996062f71d701d9c6cca84c
2016-11-25vty: Ensure to not use negative (error) sapi valueHarald Welte1-0/+2
Change-Id: I282311de8514c1cc0a1b716e97e90ddf48863bb4 Fixes: Coverity CID 57617 Fixes: Coverity CID 57618
2016-11-16vty: Add commands to manually activate/deactivate a channel.Alexander Chemeris1-0/+60
This is the easiest way I found to make BTS level loopback to work. Another way to implement this is to have BSC/NITB to send the OML command, but it's a longer path with no clear benefits. Note, that the current code hardcodes the channel to be TCH/F with v1 speech, which is what we need for the basic BER testing. We may want to extend this later to support more channel types. Change-Id: Ia2734afeff023e5b3d6b934c7e8b1ed95a071b72
2016-11-14l1sap: Fix use-after-free in loopback mode.Alexander Chemeris1-0/+3
By default l1sap_tch_ind() returns 0 which signals to its caller that message has been processed and can be freed. In case of loopback we're forwarding the message to dl_tch_queue who will free it later. Returning 1 from l1sap_tch_ind() prevents caller from freeing message. Change-Id: I1e065075baa51c88fa717f132e1f0a83df68be02
2016-11-11Replace link_id constant with defineMax5-52/+52
Instead of using constant for link_id directly, use shared define value. Change-Id: Ibf3d439d8893bd994ba089796175b6c635db2cf8
2016-11-11Remove duplicated codeMax1-13/+11
Having duplicated code to fill in fn & tn values makes it harder to read and modify static gsmtap_p* functions. Fix this by removing the duplication and moving the common code one level up. Change-Id: I0e67bf7423424cc11435bc0a5a1110297eeee383
2016-11-09fix 'osmo-bts-* --version' segfaultNeels Hofmeyr1-1/+1
Call vty_init() before handle_options() to make sure the host.app_info is populated before --version potentially tries to print it. Change-Id: Ic87b5498b57b2f0f876171a15e769b74c28348c1
2016-11-08Add libosmocodec for octphy buildMax1-2/+2
Similar to 45822227577cba5c6c4a4d4d61a7a9e8b4992c25 fix build by linking with libosmocodec explicitly. Change-Id: Ib52135936ae02d804b60f61088b4bdd227a71aa0
2016-11-08DTX: wrap FSM signal dispatchingMax2-6/+10
Make wrapper function which checks that DTX is enabled for lchan before dispatching any events. Change-Id: Id8b519c4af6d505ec9a4b9aadd5107bf7af53d66
2016-11-08DTX DL: tighten check for enabled operationMax6-9/+18
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