aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
11 hourshodec2: log requirements of best candidate, log rxlev in dBmHEADmasterNeels Hofmeyr1-14/+21
Instead of logging a hex value for the met requirements, fully expand the "ABC" flags for both TCH/F and TCH/H. From HO_CANDIDATE_FMT/_ARGS, split off into REQUIREMENTS_FMT/_ARGS and use that when logging the chosen HO candidates. Also change the RX level to dBm, to match general logging and reduce confusion between rxlev number variants in the log. Change-Id: I1b30a6e98bdb4bd92e72864fafdd2f4f3ae3134c
11 hourshodec2: do not keep candidates with zero requirements metNeels Hofmeyr1-0/+7
When check_requirements() returns zero, do not keep such an entry in the candidates list at all. This removes logging confusion, where some "candidates" are still listed even though not meeting any handover requirements. Change-Id: I12e48292d5731cb601165c870b9570003bc488ec
11 hourshodec2 congestion: consider only congested pchan typesNeels Hofmeyr1-0/+8
If no TCH/H need to be moved, then don't collect TCH/H candidates. Same for TCH/F. Examining a specific congestion scenario, I realized that ho decision 2 collects candidates of pchan types that are not actually considered congested: - handover decision 2 wants to move 2 TCH/F only; TCH/H is fine. - still it collects active TCH/H lchans as candidates. (BTS 0) Congestion check: (free/want-free) TCH/F=0/2 TCH/H=12/0 (BTS 0) Attempting to resolve congestion... (BTS 0) congested: 2 TCH/F and 0 TCH/H should be moved [...] (BTS 0) Considering 8 candidates to solve congestion: (lchan 0.020 TCH_F SPEECH_V1)->(BTS 0) (subscr unknown) #0: req=0x0 avg-rxlev=42 (lchan 0.030 TCH_F SPEECH_V1)->(BTS 0) (subscr unknown) #1: req=0x0 avg-rxlev=42 (lchan 0.040 TCH_F SPEECH_V1)->(BTS 0) (subscr unknown) #2: req=0x0 avg-rxlev=42 (lchan 0.050 TCH_F SPEECH_V1)->(BTS 0) (subscr unknown) #3: req=0x0 avg-rxlev=42 (lchan 0.160 TCH_H SPEECH_V1)->(BTS 0) (subscr IMSI:9017000000xxxxx) #4: req=0x0 avg-rxlev=42 (lchan 0.161 TCH_H SPEECH_V1)->(BTS 0) (subscr IMSI:9017000000xxxxx) #5: req=0x0 avg-rxlev=42 (lchan 0.170 TCH_H SPEECH_V1)->(BTS 0) (subscr IMSI:9017000000xxxxx) #6: req=0x0 avg-rxlev=42 (lchan 0.171 TCH_H SPEECH_V1)->(BTS 0) (subscr IMSI:9017000000xxxxx) #7: req=0x0 avg-rxlev=42 Change-Id: I5077a62c6d77838513eecf3f0e4810c3d3d3a247
11 hourshodec2: fix logging of requirements flagsNeels Hofmeyr1-1/+1
Fix typo to log the "C" requirements accurately. Change-Id: I15ce607f354918167ba81192230db63a5948c742
11 hourshandover_test.c: typo s/more/less in test 19 descriptionNeels Hofmeyr1-1/+1
Change-Id: Ia46fa9bb4f340d35515168f82dd23a1270f6fcd5
5 dayslchan_rtp_fsm: use E1 endpoints if the BTS is not ipaccess typePhilipp Maier3-8/+32
When the BTS is is not an ipaccess BTS, the BTS can only be an E1 bts. In that case E1 endpoints must be used and there will be no RTP stream setup towards the BTS. Change-Id: I4f1f39bf90b0a7c9ea448dab255daf99cd36bb4a Related: OS#2547
8 dayslchan_rtp_fsm: make _fsm_timer_cb and _fsm_cleanup staticPhilipp Maier1-2/+2
The functions lchan_rtp_fsm_timer_cb() and lchan_rtp_fsm_cleanup() only used in lchan_rtp_fsm.c, lets make them static. Change-Id: I31940aff166ccd7a9612574536674e4e483a3cb9
9 dayshandover_test.c: add test case 29: TCH/F -> TCH/HNeels Hofmeyr2-0/+30
Change-Id: I5439beec4d295a8acaa1c49a0fa575dc2f7b973d
10 daysBS-11: Fix "CONNECT TERRESTRIAL TRAFFIC"Harald Welte1-3/+10
On a TS 12.21 spec compliant BTS, each Um traffic channel must be mapped to an E1 sub-slot on the terrestrial back-haul. This happens via the CONNECT TERRESTRIAL TRAFFIC message. We always had code to sen that message, but it got deactivated when ts->pchan_is / ts->pchan_from_config was introduced. Of course, while we are bringing up OML, there is no 'pchan_is' set yet. We only have 'pchan_from_config' and must use it. Change-Id: I8988a027b0e897bd9dda460590f974d6be34a4fa
11 daysIntroduce support for ACC ramping during whole BTS life cyclePau Espin Pedrol5-153/+875
Prior to this patch, ACC ramping was only used to go 0->N in the number of allowed ACCs during BTS startup. It could optionally dynamically stretch or extend the ramping time based on channel load. With this patch, ACC ramping is kept alive during the entire time the BTS is active, and subset of allowed ACCs can now be incresed or decreased based on channel load. A new VTY command "access-control-class-ramping-chan-load" is added to configure a lower and an upper threshold. Channel load under the low threshold will potentially trigger an increment of the subset size of allowed ACCs, while a channel load over the upper threshold will potentially trigger the opposite (a decrease in size). The time between checks is kept fixed per VTY command (reusing old "access-control-class-ramping-step-size"), but the "dynamic" option is deprecated and ignored from now on since it provides nothing valuable in the new implementation, because the size always dynamically changes based on channel load (configured thresholds). Related: SYS#4912 Change-Id: Id17f947c92cdfc0eb9541a9bf066338169caaeb5
12 daysfix CBSP server: actually open the srv_linkNeels Hofmeyr1-3/+10
Change-Id: Ic688573e179381f7798055b647200e508f1bc37f
12 daysacc.c: Don't use C99 constructs, this breaks builds on Debian 8Harald Welte1-2/+6
[ 160s] acc.c: In function 'get_highest_allowed_acc': [ 160s] acc.c:117:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode [ 160s] for (int i = 9; i >= 0; i--) { [ 160s] ^ [ 160s] acc.c:117:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code [ 160s] acc.c: In function 'get_lowest_allowed_acc': [ 160s] acc.c:127:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode [ 160s] for (int i = 0; i < 10; i++) { [ 160s] ^ [ 160s] Makefile:617: recipe for target 'acc.o' failed Change-Id: I03722854634b2d6d6f1abac7c7553762b5fc6890
12 daysAdd example config files for Ericsson DUG20 based BTSHarald Welte3-0/+797
The files have been used successfully in the past weeks to bring up a variety of different combinations of Ericsson DUG20 + RUS. Change-Id: I046f786d68f7cd3fd21693142bd1315bf40696f5
12 daysIntroduce support for ACC subset rotationPau Espin Pedrol14-117/+1610
See updated documentation section in manuals/chapters/bts.adoc regarding an explanation on how the system works. Related: SYS#4911 Change-Id: I952c9eeae02809c7184078c655574ec817902e06
2020-07-26lchan_fsm: silently ignore LCHAN_EV_RLL_ERR_INDHarald Welte1-0/+8
The RLL ERR IND is sent by the BTS in any number of casese that lead to a disconnect of a radio link layer, for example due to bad RF conditions. The lchan FSM currnently prints error messages about this event not being permitted, leading to confusion among users. Let's ignore this event, I don't think the lchan FSM should or could be doing anything as a result. We could also simply remove that event, but let's keep it in case we should need it in the future. Change-Id: I07aad62d25566d6068a95797915bb97fc3c66328
2020-07-26debian: Package E1 configuration file examplesHarald Welte1-0/+1
Change-Id: Idf06c5fa7eb0ea6b73dcc3b67718b3a0a755796f
2020-07-20rename files acc_ramp.* -> acc.c*Pau Espin Pedrol14-15/+15
With upcoming next commit, the file will contain far more code that simply ramping, so rename it to be more generic. Change-Id: I8c368ab87e264439dea4ccf556821a44664cdbb0
2020-07-20{bts,bsc}.adoc: Drop deprecated OsmoNITB referencesPau Espin Pedrol2-14/+8
dyn_ts_allow_tch_f is also deprecated and should not be used, so drop that too. Change-Id: Icc91dd41a237531cb512fa36d8b18d4d8d5ca8ed
2020-07-20doc: Copy {bsc,bts}.adoc from osmo-gsm-manualsPau Espin Pedrol3-2/+627
Those adoc files are only used by osmo-bsc.git and openbsc.git (osmo-nitb), and the later is deprecated and no longer maintained, which means new features are only added to BSC. Hence it makes no sense to keep the doc shared between both. Change-Id: I20aa60d2f4111d66e922f3e2a73a20352ec1f7e4
2020-07-20configure.ac: Fix trailing whitespacePau Espin Pedrol1-1/+1
Change-Id: Id57b953cbeea4ac5c384c0b77cff079c13248a0e
2020-07-19osmo-bsc.spec.in: Add missing directories to packageHarald Welte1-0/+3
CentOS is happy with the spec file as-is, but OpenSuSE is more strict: [ 62s] osmo-bsc-1.6.0.191.bd5b-lp152.1.1.x86_64.rpm: directories not owned by a package: [ 62s] - /usr/share/doc/packages/osmo-bsc/examples/osmo-bsc/ericsson [ 62s] - /usr/share/doc/packages/osmo-bsc/examples/osmo-bsc/nokia [ 62s] - /usr/share/doc/packages/osmo-bsc/examples/osmo-bsc/siemens Change-Id: I40ad5d38b968db847cf5f733f82163ecac1151e0
2020-07-18Move acc_ramp_init inside gsm_bts_allocPau Espin Pedrol8-5/+10
The function initializes the struct owned by a bts, so it makes sense to have it done there instead of somewhere else later. It was most probably put in bsc_vty when it was initially introduced because of all the data structure and object file mess I untangled during last set of patches. Change-Id: I66c4b208583e92070793183b83b3a7b7edf6ba00
2020-07-18Move gsm_bts_{trx_}set_system_infos APIs to bts{_trx}.*Pau Espin Pedrol14-170/+200
Change-Id: I2aa83b499d6e5d06a0fa1001fee3111f7e639c94
2020-07-18Move struct gsm_bts_trx: gsm-data.* => bts_trx.*Pau Espin Pedrol17-331/+398
See rant fro similar recent commit moving stuff to bts.*. Change-Id: I11758ca3d255d849d77bd068f24bb68bde1f89a5
2020-07-18bts: Drop duplicated function to get trx by numberPau Espin Pedrol8-25/+14
In the big mess of gsm_data we reached a point where we have multiple functions doing the same thing, most probably because it's hard finding stuff in there. Let's drop one of them (the one which less callers) and move it to bts.*, where it belongs. Change-Id: I9071a0ab250844619280fbe2be63ed99f2c87eb1
2020-07-18Move struct gsm_bts: gsm_data.* => bts.*Pau Espin Pedrol66-1354/+1471
Place all code related to the object into the related file. Having all the data model in one file made sense in early stage of development to make progress quickly, but nowadays it hurts more than helps, due to constantly growing size and more and more bits being added to the model, gaining in complexity. Currently, having lots of different objects mixed up in gsm_data.h is a hole of despair, where nobody can make any sense were to properly put new stuff in, ending up with functions related to same object in different files or with wrong prefixes, declarations of non-existing functions, etc. because people cannot make up their mind on strict relation to objects in the data model. Splitting them in files really helps finding code operating on a specific object and helping with logically splitting in the future. Change-Id: I00c15f5285b5c1a0109279b7ab192d5467a04ece
2020-07-17osmo-bsc.spec.in: Package E1 config filesHarald Welte1-0/+1
This resolves: [ 272s] error: Installed (but unpackaged) file(s) found: [ 272s] /usr/share/doc/packages/osmo-bsc/examples/osmo-bsc/ericsson/osmo-bsc.rbs2308.cfg [ 272s] /usr/share/doc/packages/osmo-bsc/examples/osmo-bsc/nokia/osmo-bsc.insite.cfg [ 272s] /usr/share/doc/packages/osmo-bsc/examples/osmo-bsc/siemens/osmo-bsc.bs11.cfg Change-Id: I07329564152d6b4314f1ed90a221478e2d765b47
2020-07-17remove examples/osmo-bsc/ericsson/osmo-bsc.cfgHarald Welte1-101/+0
This was an accidential copy of osmo-bsc.rbs2308.cfg Change-Id: I89c6c0fc2b9ec0054e71827118ddaa85fe3e9318
2020-07-16propagate RSL error cause codes to RR Channel Release causeNeels Hofmeyr4-0/+34
In various places that receive an error cause from RSL and place it in lchan.release.rsl_error_cause, translate it to an RR cause and place that in the recently added lchan.release.rr_cause. Hence the RR Channel Release message now reflects more specific error causes when the reason for the error was received in an RSL message's cause value. Change-Id: I46eb12c91a8c08162b43dd22c7ba825ef3bbc6ac
2020-07-16RR Channel Release: pass Cause code from BSSMAP Clear to the BTSNeels Hofmeyr7-12/+64
In lchan.release, add 'cause_rr', and set RR Channel Release message's cause value to lchan.release.cause_rr. In lchan_release(), do not set lchan.release.rsl_error_cause to the RR cause value, these are unrelated. Store in new lchan.release.cause_rr instead. The rsl_error_cause is apparently only used for logging, except for one place in lchan_fsm_wait_activ_ack() that compares it to RSL_ERR_RCH_ALR_ACTV_ALLOC, so there should not be a functional difference by this fix. Propagate the BSSMAP Clear Command cause to the RR Channel Release: Add struct gscon_clear_cmd_data as event data for GSCON_EV_A_CLEAR_CMD -- so far it sent the is_csfb flag, add the gsm0808_cause; invoking the event happens in bssmap_handle_clear_cmd(). Adjust event handling in gscon_fsm_allstate(); there, pass the cause to gscon_release_lchans(). In gscon_release_lchans(), pass the cause to gscon_release_lchan(), and then lchan_release(), which sets the new lchan.release.cause_rr to the passed cause value. As soon as the lchan FSM enters the proper state, it calls gsm48_send_rr_release(). There, set the cause value in the encoded message to lchan.release.cause_rr. Interworking with osmo-msc: so far, osmo-msc fails to set the Clear Command cause code for normal release, it just passes 0 which amounts to GSM0808_CAUSE_RADIO_INTERFACE_MESSAGE_FAILURE. Before this patch, osmo-bsc always sent GSM48_RR_CAUSE_NORMAL in the RR Channel Release, and after this patch it will receive 0 == GSM0808_CAUSE_RADIO_INTERFACE_MESSAGE_FAILURE from osmo-msc and more accurately translate that to GSM48_RR_CAUSE_PROT_ERROR_UNSPC. This means in practice that we will now see an error cause in RR Channel Release instead of GSM48_RR_CAUSE_NORMAL when working with osmo-msc. For changing osmo-msc to send GSM0808_CAUSE_CALL_CONTROL instead (which translates to GSM48_RR_CAUSE_NORMAL), see OS#4664 and change-id I1347ed72ae7d7ea73a557b866e764819c5ef8c42 (osmo-msc). A test for this is in Ie6c99f28b610a67f2d59ec00b3541940e882251b (osmo-ttcn3-hacks). Related: SYS#4872 Change-Id: I734cc55c501d61bbdadee81a223b26f9df57f959
2020-07-16RR Release Cell selection IE: fix repeated EARFCNs encodingNeels Hofmeyr1-4/+8
3GPP 44.018 10.5.2.1e defines the EARFCNs encoded in the 'Cell selection indicator after release of all TCH and SDCCH IE' as follows: <Cell Selection Indicator after release of all TCH and SDCCH value part> ::= [...] | 011 { 1 <E-UTRAN Description : < E-UTRAN Description struct >> } ** 0 So after a 3-bit discriminator of '3' there can be multiple E-UTRAN Descriptions, and each of them starts with a '1' bit to indicate that another item follows. Finally there is a '0' bit to indicate the list end. Before this patch, osmo-bsc only encoded the first '1' bit, and failed to repeat this before each following E-UTRAN Description. Fix that by moving the '1' encoding into the loop. The final '0' was missing. Add it. With these changes, adjust the size calculation in CELL_SEL_IND_AFTER_REL_MAX_BITS to match. Also fix CELL_SEL_IND_AFTER_REL_MAX_BYTES by using OSMO_BYTES_FOR_BITS() instead of the inaccurate (n/8)+1. A test for this is in I882c5e1f70bcc4833fc837a95c900ce291919cc5 (osmo-ttcn3-hacks). Related: SYS#4871 SYS#4872 Change-Id: I59e427e4ebb1c6af99b27a15c40fed82457ac8ab
2020-07-16ipaccess_nanobts: Log ipaccess_sign_link_down eventPau Espin Pedrol1-0/+4
Change-Id: I7c864e67fb2149685c687c137a59d567f5a03ca3
2020-07-16Add example configuration files for E1 BTSHarald Welte4-0/+343
This adds osmo-bsc config files for Ericsson RBS2308, Siemens BS-11 and Nokia InSite which were working in July 2020 to get the BTS initialized, recognized by MS and up to signalling. Voice/TRAU support is still missing in OsmoBSC, but should be added relatively soon. Change-Id: I1fe15cc3654025e52fc1110ac3052fb1f7a009a0 Depends: osmo-python-tests I896b99032d94ba0cdd340a8eed7c7b625661ad69 Closes: OS4651
2020-07-15doc/examples: remove deprecated 'dyn_ts_allow_tch_f'Vadim Yanitskiy2-2/+0
This option has been deprecated back in 2018 [1], but for some reason we still have it in the configuration examples, so it prevents osmo-bsc to allocate TCH/F on dynamic timeslots. [1] Ib2335d02ea545aff837aadd49f15b2fdb418c46e Change-Id: Icc82f6178d18dccc7207485b25dc3bdad91a0052 Related: SYS#5014
2020-07-15Fix trailing whitespace in several filesPau Espin Pedrol7-11/+9
Change-Id: Ide9921dfce3b6d7c580edaa612a3063c94319a02
2020-07-15gsm_data.h: Drop duplicated include stdint.hPau Espin Pedrol1-1/+0
Change-Id: I7610cffc3a641975e05ba4ea9f469e12c99e407f
2020-07-15Use OSMO_FD_* instead of deprecated BSC_FD_*Pau Espin Pedrol11-35/+35
New define is available since libosmocore 1.1.0, and we already require 1.3.0, so no need to update dependenices. Let's change it to avoid people re-using old BSC_FD_* symbols when copy-pasting somewhere else. Change-Id: Ia5a656567d212fa265aef1375d714d0c5fee5dd6
2020-07-15bts_nokia_site: Clean up loggingHarald Welte1-53/+37
We don't want to fprintf directly, and we want to make sure to always log as much context as possible. Change-Id: I29ec935669175a08cb42e1666559b681c50a6e72
2020-07-14Don't print 'bogus channel load sample' message if total == 0Harald Welte1-1/+3
Change-Id: I857fecc76dc16ba4431f3c0142bb0d798a9f73dc Closes: OS#4614
2020-07-14Bring timeslot FSMs on BS-11 out of NOT_INITIALIZED stateHarald Welte1-0/+5
When we introduced the timeslot FSMs in I82e3f918295daa83274a4cf803f046979f284366, the BS-11 stopped to work, as the timeslot FSMs are never brought out of NOT_INITIALIZED stage. Closes: OS#4666 Change-Id: I557cb105247552887ca47a0f2c1b06b71bca6cac
2020-07-14abis_nm: Avoid various "Unhandled message" errors on BS-11 startupHarald Welte1-0/+12
There are a number of OML messages which are not seen on IP based BTSs. Those are perfectly normal and expected on E1 based BTS. Change-Id: Icd87fc9f3652b21f9d569af2572d080c9ac89e8b Closes: OS#4665
2020-07-14ipaccess_sign_link_up: Log sign_link typePau Espin Pedrol1-1/+1
Change-Id: If16d6feae56785a2c60b605227c0602f80b6f407
2020-07-14bsc_main: Use LOG_TRX in log linePau Espin Pedrol1-3/+2
Change-Id: I88b5f572cb2bae8ffa551789e2c344ec2ebb7e7b
2020-07-14bsc_main: Improve log line on Lost E1 linkPau Espin Pedrol1-1/+1
Change-Id: Ia9f8d14d547b2443713fc406ac5c1005351f8cce
2020-07-08SI2quater: allow storing 48 EARFCNsNeels Hofmeyr1-1/+4
Up to 16 SI2quater are multiplexed; each fits 3 EARFCNS, so the practical maximum is 48 (of course depending on how many bits are used by other SI2quater elements). Change-Id: Iabeed10053ee5899b4def3509aedd25abb2410a9
2020-07-06si2quater: fix budget calculation for multiple EARFCNsNeels Hofmeyr2-67/+91
In rest_octets.c append_earfcn(), the unconditional bits added are 40, not 25. Removing only 25 bits from the budget resulted in malformed SI2quater starting with 4 configured EARFCNs, by adding more EARFCNs than fit in 20 bits. These malformed SI2quater were also expected in gsm0408_test.c. Update the expected SI2quater to what is being generated now. This patch passes the ttcn3 testing added in I45382f88686ca60e68569e93569fc4cfb63a0e0d, which provides some confidence that the coding expected in gsm0408_test.c is now correct. Related: OS#4652 Change-Id: I5df269f713456a6ccbb874d6b7faac4a6f123c67
2020-07-03gsm_04_08_rr: fix hopping parameters in RR Assignment CommandVadim Yanitskiy1-3/+9
According to 3GPP TS 44.018, section 9.1.2.4, if at least one of the Channel Description IEs indicates frequency hopping, one and only one of the following IEs shall be present: - Mobile Allocation, after time (see 10.5.2.21); - Frequency List, after time (see 10.5.2.13). For some reason, osmo-bsc includes the GSM48_IE_MA_BEFORE instead of GSM48_IE_MA_AFTER - fix this. According to section 9.1.2.6 of the same document, if any of the Mobile Allocation IEs (before/after time) is present, then the network must ensure that either the MS has already received the the proper reference cell frequency list (CA), or that the Cell Channel Description IE (see 10.5.2.1b) is present. Without this IE, the phone I was using in my testing setup sends RR Status message with cause #100 "conditional IE error". Fortunately, we already have generate_cell_chan_list(), since we also need to include the Cell Channel Description in SI Type 1. Change-Id: I43ef66c109b107ebcaa1cb6197637701b13b3787 Related: SYS#4868, OS#4545, OS#4546
2020-07-03generate_ma_for_ts(): constify per cell/timeslot ARFCN bit-vectorsVadim Yanitskiy1-2/+2
Change-Id: If750003beb8653cf67fd192fa5c16343138155c9
2020-07-03system_information: constify bitvec in freq. list encoding APIVadim Yanitskiy1-3/+3
Change-Id: I95f3a89af16e4a6b4aa1a6a48cf0d0c023f26170
2020-07-03system_information: publicly declare generate_cell_chan_list()Vadim Yanitskiy4-5/+4
Change-Id: Idc7a9ed558ed6897e15a0f6d3c23418db7cee0d0