aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-01-12associate conn with bsc subscriber where possible (TODO)neels/ho_with_on_change_cbNeels Hofmeyr6-3/+26
Various logging in the code (e.g. handover) attempts to log the subscriber information from conn->bsub, but so far, the only time we set conn->bsub is during paging. We do though get IMSI and/or TMSI information from Layer 3 Complete messaging, not only from the Paging Request, which is already used for IMSI filtering. Also extract TMSI and create a conn->bsub subscriber. <-- TODO Make sure conn->bsub also gets cleaned up by bsc_subscr_put() when the conn is freed. Change-Id: Icc20c141ec339385181949b93548a73121bb7615
2018-01-12HO: always use Handover Command, not AssignmentNeels Hofmeyr1-12/+4
Change-Id: I5c1ec8c228a557ac59a31ea47e21fb856467742e
2018-01-12HO: Implement load based handover, as handover_decision_2.cNeels Hofmeyr26-58/+3740
Change-Id: Ice2d3ef5668564a9d3bc4d5118d59dfaa9af6978
2018-01-12ho cfg: add on_change cbNeels Hofmeyr5-32/+52
Change-Id: I22eda734196fb6488b9846c61e8b873ea559e3d0
2018-01-12HO: make bts_by_arfcn_bsic() publicNeels Hofmeyr2-2/+4
Change-Id: Ie746f76433f6b46a71a91b7714cc034c4355d993
2018-01-12HO: rename gsm_bts_neighbor() to bts_by_arfcn_bsic()Neels Hofmeyr1-14/+13
The name sounds like it is looking up neighbors, instead it simply traverses the global list of BTSes. Rename to reflect what it does. Move FIXME comment to its logical place: at the invocation of bts_by_arfcn_bsic(). Change-Id: I063870d09f782a4f18e85d87c7cd17fe660cb3fd
2018-01-12HO: Count number of free timeslot on a given BTSAndreas Eversberg2-0/+67
This is needed for handover algorithm to balance free slots and to prevent congestion of one cell, while other cells still have free capacities. Change-Id: Ic8bee8a515ee8aa9a99af71756fe60b8dd8f868b
2018-01-12HO: Change debug category at handover decision: DHO -> DHODECAndreas Eversberg1-8/+8
Change-Id: I7322b790f647b681bfe3a9c95b04516fbc7cbf88
2018-01-12HO: add handover algo 2 configuration parametersNeels Hofmeyr2-13/+361
Change-Id: I8811ee8a75be09048042b511ee4bd9bc1de63976
2018-01-12HO: add algorithm cfg; skip HO 1 if HO 2 is configuredNeels Hofmeyr2-0/+13
Change-Id: If07c0a7b84937ab92948e9b71b2496a765946020
2018-01-12HO: enable handover by initializing at startup; rename init functionNeels Hofmeyr3-7/+5
Change-Id: I224884c84895ebf6c8cf498c16616214cb2b5779
2018-01-12Fix: Increase the number of measurement report history to 10Andreas Eversberg2-1/+3
If we want to average over up to 10 measurement reports (as configurable at VTY), we need a history of at least 10 measurements.
2018-01-12HO: revamp DTAP cacheNeels Hofmeyr2-49/+58
Rename the 'assignment_queue' to ho_dtap_cache. Implement as plain msgb queue with msgb_enqueue/dequeue and storing the link_id and allow_sacch as msgb->cb[] values. Add a sane maximum counter for cached messages, so far a hardcoded maximum of 23 messages will be cached. Have balanced ho_dtap_cache_add() and ho_dtap_cache_flush() functions (both still static in bsc_api.c). In log messages, log the subscriber as context, as well as a count of cached messages. Change-Id: I6e4d93628befb3d97e5cee0343cd9f8ba0b8620c
2018-01-12Add a queue to bsc_api to queue DTAP messages during handover/assignmentAndreas Eversberg2-0/+68
Change-Id: I26cb5b22e59a00ff731b3e3b005b5ecb6ee6c59b
2018-01-12Correctly set T3105 for ipaccess BTS typeAndreas Eversberg3-5/+5
The given value is 10 * ms, so 13 is used instead of 128. If T3105 is set at config to something greater 0, it is used instead of the default value. Adjusst nanobts_omlattr_test.c accordingly. Change-Id: I3d9687619ba4de35f5d2eff3026d903534b2bbd4
2018-01-12Allow assignment to TCH channel with signalling only modeAndreas Eversberg1-3/+2
This makes sense, if silent call is used. Assignment allows to change from SDCCH (or whatever was available) to given TCH rate.
2018-01-12Do not perform assignment, if the new channel equals the current oneAndreas Eversberg1-0/+7
This can happen, if a TCH/H was requested, but because it is not available, a TCH/F is allocated. If the old channel was TCH/F already, it makes no sense to assign it.
2018-01-12HO: Add handover decision debugging categoryAndreas Eversberg2-1/+9
2018-01-12HO: If handover logic is used to do assignment, signal assignment resultAndreas Eversberg2-0/+31
2018-01-12HO: Always update rqd_ta after receiving measurement reportAndreas Eversberg1-0/+2
The up-to-date rqd_ta is required for assignment command. If the phone moves, the timing advance might change. The rqd_ta will be updated by each measurement report.
2018-01-12HO: Changed availablilty of ts_is_usable() from static to externAndreas Eversberg2-1/+2
Change-Id: I3471e38327c4b98490faed9b604fb76438ba9954
2018-01-12fixup: neigh_meas_avg: fix condition to reduce window sizeNeels Hofmeyr1-1/+1
Change-Id: Ia2269be448436d676289c84b9b05da7f51ee4a85
2018-01-12fixup: neigh_meas_avg: detect invalid window size as <=0, log if invalidNeels Hofmeyr1-1/+3
Change-Id: I8c5d0642aeb4fbee73a035b9f73cf3a09b1bcf90
2018-01-12HO: Count neighbor measurements and reduce window of neigh_meas_avgAndreas Eversberg1-0/+8
Always start with a counter of 0 for a new measurement report. If the neigh_meas_avg is caluclated over the given window, the window is reduced, if there are less measurement reports received so far.
2018-01-12HO: Count the actual meas.rep. get_meas_rep_avg fails if not reachedAndreas Eversberg4-1/+11
get_meas_rep_avg will return -EINVAL, if the required number of measurements are not reached. There will be no handover possible until the given number of measurements are available. Change-Id: Ibc4410b4e162cdb6c070128d2c63946bb79d6d65
2018-01-12Fix of checking TCH rate at chan_compat_with_modeAndreas Eversberg1-1/+5
In case of current channel equals TCH/F and we request half rate, we must return 0, so the calling function will trigger assignment.
2018-01-12HO: Assign SDCCH on channel requestAndreas Eversberg1-2/+20
This is needed, so channel can be negotiated before the actual channel type is assigned. In case there is no SDCCH available, try to assign what ever the MS requested. If this is not possible try to assign TCH/F. If this is still not possible, reject channel request. Change-Id: I10fc9f60c58c6b7ed424a86ce23bf6b9802c9eb1
2018-01-12HO: Add a penalty timer list to the subscriber connection entityAndreas Eversberg2-0/+20
This penalty timer is used to temporarily block cells where handover or assignment failed or where handover is not allowed. This is usefull to prevent repeated handover attempts to broken cells or cells that have limited allowed distance. Change-Id: I95cb7e3211b2470b773965e7aa94d8eb6c8c1a3a
2018-01-12Fix: If paging for half rate was requested, use hr, if supported by MSAndreas Eversberg1-1/+1
2018-01-12cosmetic: explicitly init ho_ref start valueNeels Hofmeyr1-1/+1
The static ho_ref seems to be implicitly initialized to zero, but let's make it explicit for code readability. Change-Id: I00493bcb7ef3e38fb8e0077c60c5bac7199f1073
2018-01-12HO: Add function to count currently ongoing handovers to a given BTSAndreas Eversberg2-0/+20
In order to keep processing power at BTS at a defined level, the handover decision might want to limit maximum number of slots that require RACH detection. Change-Id: I8908e37fe0d8d2eda906cc6301ba0969b25a5575
2018-01-12HO: add indicators for inter-cell and async ho, use for chan act typeNeels Hofmeyr1-1/+12
Change-Id: I2d91765c1f9719c64fd99426a872cecc724215db
2018-01-12HO: Send Channel Mode and Multirate IE along with handover commandAndreas Eversberg1-0/+7
This is needed, if the channel mode should change when doing handover. A change in channel mode makes sense, if available resources at the new BTS are different.
2018-01-12HO prep: introduce per-BTS handover config, with defaults on net nodeNeels Hofmeyr16-148/+649
It is desirable to allow configuring handover for each individual network cell. At the same time, it is desirable to set global defaults. Treat the 'network' node handover parameters as global defaults, add another set of parameters for each individual BTS. This raises questions on how the 'network' node should affect the individual BTS. The simplistic solution would have been: on creating a BTS in the config, just copy the current defaults; with serious drawbacks: - tweaking any parameter in the telnet VTY on network node will never affect any running BTS. - network node defaults *must* be issued before the bts sections in the config file. - when writing a config back to file, we would copy all net node defaults to each BTS node, making the network node configs pointless. Instead, add a handover_cfg API that tracks whether a given node has a value set or not. A bts node ho_cfg gets a pointer to the network node config and returns those values if locally unset. If no value is set on any node, use the "factory" defaults, which are hardcoded in the API. Only write back exactly those config items that were actually issued in a config file / on the telnet VTY. (ho_cfg API wise, we could trivially add another ho_cfg level per TRX if we so desire in the future.) Implement ho parameters as an opaque config struct with getters and setters to ensure the tracking is always heeded. Opaqueness dictates allocating instead of direct embedding in gsm_network and gsm_bts structs, ctx is gsm_net / bts. This is 100% backwards compatible to old configs. - No VTY command syntax changes (only the online help). - If a 'bts' sets nothing, it will use the 'network' defaults. - The 'show network' output only changes in presence of individual BTS configs. On 'show network', say "Handover: On|Off" as before, iff all BTS reflect identical behavior. Otherwise, output BTS counts of handover being enabled or not. Use the same set of VTY commands (same VTY cmd syntax as before) on network and BTS nodes, i.e. don't duplicate VTY code. From the current vty->node, figure out which ho_cfg to modify. For linking, add handover_cfg.c (the value API) in libcommon, while the handover_vty.c is in libbsc. This is mainly because some utility programs use gsm_network and hence suck in the ho stuff, but don't need the VTY commands. Review the VTY online help strings. Add VTY transcript test for handover options, testing config propagation from network to bts nodes, 'show network' output and VTY online help strings. (Needs recent addition of '... !' wildcard to osmo_interact_common.py.) I considered leaving parts of this more readable, but in the end decided for heavy use of macros to define and declare the API, because more values will be added in upcoming patches and I want to prevent myself from messing them up. Inspired-by: jolly/new_handover branch, which moves the config to 'bts' level Depends: I7c1ebb2e7f059047903a53de26a0ec1ce7fa9b98 (osmo-python-tests) Change-Id: I79d35f6d3c0fbee67904378ad7f216df34fde79a
2018-01-12vty: add various manual handover and assignment trigger commandsNeels Hofmeyr1-25/+192
2018-01-12handover_decision: Add more log messages to get more information about HO ↵Ivan Kluchnikov2-6/+31
causes in logs Change-Id: Ib0a0787ac8b877ac63455d72886389b546e7a337
2018-01-10cosmetic: mgcp: remove duplicate loggingPhilipp Maier1-2/+0
do not print an additional log lines when the mgcp FSM gets halted. This is already done by osmo-fsm Change-Id: I5aebbcacb68eab3c6afb19991dbf63a02524e4d7
2018-01-10mgcp: log file and line of calls to handle_error()Philipp Maier1-3/+6
When the FSM runs into an error condition handle_error() is called with a cause code. The information about the error is then printed by handle_error(), by this we do not get the sourcecode line of the location where the error actually happend. Convey the source code line number of the actual error in handle_error() Change-Id: Ifa7f2a655474826630988572616cd26e1e2f3464
2018-01-09Support control connection status query for a particular MSC.Stefan Sperling3-9/+53
Add a new control command 'msc.N.connection_status' which can be used to query the connection status of a particular MSC with number N. Keep the old control command 'msc_connection_status', which always queries MSC 0, for backwards compatibility. Change-Id: Ibd41474a1be80e782b19ec337c856b5efc593fa8 Related: OS#2729
2018-01-08vty: fix OML link state printingMax1-3/+3
Always print newline regardless of BTS uptime availability. Change-Id: Ib80049fe66de17bc7acfbb774a30075f40a44dee
2018-01-08RSL: print link state per-TRXMax1-0/+1
Change-Id: Ie6fad70b4b11d0bb4927b22e32e842422658ba53 Fixes: OS#2715
2018-01-08cosmetic: remove duplicated codeMax2-19/+13
Change-Id: I16c446ef7dc66769826f6e8ae118d8b07bbf6930
2018-01-08abisip-find: add --interval optionNeels Hofmeyr1-3/+17
Change-Id: I9540054bdda185b2585209289cee565f61f33dcf
2018-01-07osmo_bsc_bssap.c: Fix discard of const qualifier in assignmentPau Espin Pedrol1-1/+1
Fixes following compilation warning: osmo-bsc/src/osmo-bsc/osmo_bsc_bssap.c:442:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] enc_key = &data[1]; ^ Change-Id: Ieeab5a822d50ac1267362f57196b80073a7901f9
2018-01-05Fix "CTRL GET msc_connection_status" response.Stefan Sperling1-1/+4
Since 39f62bbcbf4309492a6d5bc07213cd74f650d41e the msc_connection_status variable in osmo_bsc_ctrl.c is no longer updated. Query the connection's status from the is_connected flag in struct bsc_msc_connection instead. Makes test BSC_Tests.TC_ctrl_msc_connection_status in ttcn3-bsc-test pass. However, we only query the connection status of the first MSC. Adapting the control command to work with mulitple MSCs is left for future work. Change-Id: I8ab8aac83ef6b7831b6136f7e9e3eddfbb43ecaa Related: OS#2729
2018-01-04Reduce T3109 default from 19s to 5sHarald Welte1-1/+1
T3109 is started when the BSS sends a RR CHAN REL to the MS and stops downlink SACCH generation. Stopped when the MS successfully releases the LAPDm link. After stop or timeout, the radio channel is released using RSL RF CHAN REL. Recommended values in literature are 1-2s + RadioLinkTimeout*0.48s or 5s, while we had the absurdly high 19s timeout. This means we occupy the radio channel way longer than needed in situations where the MS is no longer able to properly release Layer2 (LAPDm DISC) due to loss of signal or the like. See also: https://osmocom.org/projects/osmobsc/wiki/Timers Change-Id: I7416b4118e5b73c6ffb98e3546bc62a36c7a967a Closes: OS#2734
2018-01-02Remove obsolete ./configure optionMax3-7/+2
The '--enable-vty-tests' is just alias to '--enable-external-tests' anyway. Change-Id: I9492d8e988b464aa41f572611cbf2461bb8be3eb
2017-12-31Check and handle SMS encoding failureMax1-8/+22
The SMS address encoding can fail due to gsm48_encode_bcd_number() which was not checked for because wrong type was used. Fix this by using correct type, checking for error and propagating it to the caller. Change-Id: I9fc16e24f7df5ebad6f4f1b389b2c5e861be95d7 Fixes: CID57882
2017-12-29Fix .deb buildsMax1-6/+2
The code triggers following error: abisip-find.c:317:3: error: format not a string literal and no format arguments [-Werror=format-security] The error was introduced in 5bf1e15c55340f236d84f70d3d04c871403d3503. Change-Id: I613781495edbc53916ca70ff7b78d28ffabd3f5d
2017-12-28Add optional profiling supportMax1-0/+9
This facilitates the use of programs like uftrace. It's disabled by default due to associated overhead. Change-Id: Ia5a48a38962fc99446887a34008c40efd8344d9b