aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/paging.c
AgeCommit message (Collapse)AuthorFilesLines
2010-04-20[paging] Continuisly send paging commands.Holger Hans Peter Freyther1-22/+24
Instead of throwing a huge pile of paging commands to the BTS we will submit one paging command every half second. This way we can have different messages between the paging commands.
2010-04-20[paging] When giving credit try to send out paging requests too.Holger Hans Peter Freyther1-0/+2
Make sure the paging timer is restarted after giving some credit and send out paging requests.
2010-04-20[paging] Revert the paging band aid.Holger Hans Peter Freyther1-6/+1
2010-04-19BAND AID... Reduce the delay timer, reduce number of paging requests we sendHolger Hans Peter Freyther1-1/+6
This is a band aid and not a proper fix. Reduce the time between two IPA commands even if it is breaking rugby sized BTSs, limit the paging commands we send during one iteration through the event loop. This should prevent us from killing ourselves in a RACH loop.
2010-04-19[paging] When we ran down to 0 available paging slots start a credit timerHolger Hans Peter Freyther1-9/+17
It might be that we run down to zero available slots but the BTS might not send us a load indication. This can happen if we think we send paging requests and the BTS disagrees and considers them as errors and does not count the paging message. When we drop to zero we will start a credit timer to give us extra credit after six seconds, if we get a CCCH load indication before we will stop the timer.
2010-04-19Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther1-0/+1
Conflicts: openbsc/include/openbsc/abis_rsl.h openbsc/include/openbsc/mgcp.h openbsc/src/abis_rsl.c openbsc/src/chan_alloc.c openbsc/src/handover_logic.c openbsc/src/mgcp/mgcp_network.c openbsc/src/vty/command.c openbsc/src/vty_interface.c
2010-04-19[vty] Count pending paging requests for the vtyHolger Hans Peter Freyther1-0/+12
Implement a method to count the number of pending paging requests per bts and print it on the VTY. This helps to see how big the backlog of requests is for a given BTS.
2010-04-10[paging] Include chan_alloc.h to silence a compiler warningHolger Hans Peter Freyther1-0/+1
paging.c:259: warning: implicit declaration of function ‘trx_is_usable’
2010-04-10[paging] Start with a smaller paging limit...Holger Hans Peter Freyther1-1/+1
The value 20 is just a random number and it really depends on the number of TRX on a bts to be a sane or insane limit.
2010-04-10[paging] Move code to use LOGP and print some more informationHolger Hans Peter Freyther1-6/+6
2010-04-10[paging] Simplify the last request and treat llist as a queueHolger Hans Peter Freyther1-34/+9
The current code was overly complex. It tried to iterate over the list in a round robin and we had to keep track of the last element, see if we remove that one, check if the list becomes empty... This can all replaced by treating the double linked list as a queue. We take the item at the front, do something on it and then and then put it back to the list at the end.
2010-04-09paging: Avoid integer underflow on ipaccessHolger Hans Peter Freyther1-0/+14
On the nanoBTS we do not receive any load indication for the paging channel and we just decrement our available slots and the unsigned int wraps to the maximum value. Together with a not yet understood bug this makes us go amock. For the nanoBTS and even the Siemens BS11 resetting the load to 20 after two seconds should be just fine. For the nanoBTS we would need to reset the 20 a lot more earlier but we need to take a look at how often we run low.
2010-04-09[paging] Start with a smaller paging limit...Holger Hans Peter Freyther1-1/+1
The value 20 is just a random number and it really depends on the number of TRX on a bts to be a sane or insane limit.
2010-04-09[paging] Move code to use LOGP and print some more informationHolger Hans Peter Freyther1-6/+6
2010-04-09[paging] Simplify the last request and treat llist as a queueHolger Hans Peter Freyther1-34/+9
The current code was overly complex. It tried to iterate over the list in a round robin and we had to keep track of the last element, see if we remove that one, check if the list becomes empty... This can all replaced by treating the double linked list as a queue. We take the item at the front, do something on it and then and then put it back to the list at the end.
2010-04-09paging: Fix format compiler warning...Holger Hans Peter Freyther1-1/+2
2010-04-09paging: Avoid integer underflow on ipaccessHolger Hans Peter Freyther1-0/+13
On the nanoBTS we do not receive any load indication for the paging channel and we just decrement our available slots and the unsigned int wraps to the maximum value. Together with a not yet understood bug this makes us go amock. For the nanoBTS and even the Siemens BS11 resetting the load to 20 after two seconds should be just fine. For the nanoBTS we would need to reset the 20 a lot more earlier but we need to take a look at how often we run low.
2010-04-08[paging] Do not use request after it was was destroyed..Holger Hans Peter Freyther1-1/+1
Increment the counter before we call the remove request which is freeing the request...
2010-04-08[paging] Do not use request after it was was destroyed..Holger Hans Peter Freyther1-1/+1
Increment the counter before we call the remove request which is freeing the request...
2010-04-07[paging] Increase the time used to send paging messages to the BTSHolger Hans Peter Freyther1-2/+2
Send a Paging Request to the BTS every two seconds. This way it is unlikely that a phone will try to respond to two paging requests as it is currently happening.
2010-03-24Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther1-5/+10
* Move to libosmocore * Move to new debugging architecture * Register the BTS types * Has only been compile tested Conflicts: openbsc/include/openbsc/Makefile.am openbsc/include/openbsc/gsm_data.h openbsc/include/openbsc/ipaccess.h openbsc/include/openbsc/mgcp.h openbsc/include/openbsc/msgb.h openbsc/include/openbsc/tlv.h openbsc/src/Makefile.am openbsc/src/abis_rsl.c openbsc/src/bsc_init.c openbsc/src/bsc_mgcp.c openbsc/src/chan_alloc.c openbsc/src/debug.c openbsc/src/gsm_subscriber_base.c openbsc/src/msgb.c openbsc/src/rest_octets.c openbsc/src/sccp/sccp.c openbsc/src/vty/command.c openbsc/src/vty_interface.c openbsc/tests/Makefile.am
2010-02-20split 'libosmocore' from openbsc codebaseHarald Welte1-1/+1
This library is intended to collect all generic/common funcitionality of all Osmocom.org projects, including OpenBSC but also OsmocomBB The library currently includes the following modules: bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer, tlv_parse, linuxlist msgb allocation error debugging had to be temporarily disabled as it depends on 'debug.c' functionality which at the moment remains in OpenBSC
2010-01-27[paging] Increase the time used to send paging messages to the BTSHolger Hans Peter Freyther1-2/+2
Send a Paging Request to the BTS every two seconds. This way it is unlikely that a phone will try to respond to two paging requests as it is currently happening.
2010-01-07[signal] Differentiate paging success from expiration in SS_PAGINGSylvain Munaut1-1/+1
This is useful information to know and actually fixes a segfault in rllp.c where lchan is accessed even tough it could be NULL in case of failure. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-12-29export the 'trx_is_usable() function and use it from pagingHarald Welte (local)1-0/+5
this ensures we don't send paging requests to currently inactive transceivers.
2009-12-22statistics: Introduce 'struct counter' instead of using unsigned longHarald Welte1-3/+3
This has the advantage that counters can be added all over the code very easily, while having only one routine that stores all of the current counter values to the database. The counters are synced every 60 seconds, providing relatively fine grained statistics about the network usage as time passes by.
2009-12-22keep some internal statistics inside OpenBSCHarald Welte1-0/+7
the statistics will give us some idea about the network load and performance.
2009-12-01Replace template-based SYSTEM INFORMATION with real implementationHarald Welte1-1/+1
Before this commit, OpenBSC used templates for the SYSTEM INFO 1, 2, 3, 4, 5 and 6 messages. Those templates were patched in various places to reflect the network config like ARFCN. Now, we actually generate those SI messages ourselves, using values from the configuration file, and even calculating neighbor cell lists. All bts'es that you have configured in OpenBSC will end up in the neighbor cell list - which should be more than sufficient for the current small-single-site networks.
2009-11-22[network] Make use of T3113 for pagingHolger Hans Peter Freyther1-1/+1
Add it to the configuration files and make use of it in the the paging.c.
2009-11-17[paging] In expiration handling remove the request before doing the callbackHolger Hans Peter Freyther1-4/+10
Not doing this could lead to a double deletion due the paging request being removed during the callback and afterwards as well. Change the code to save the callback data, remove the request, do the callback. A patch was proposed by Andreas Eversberg and this one is based on it.
2009-09-28[paging] Use paging_request_stop to stop all paging requestsHolger Hans Peter Freyther1-2/+3
This loop looks a lot like the one inside the paging code. Call it instead and change the code in paging_request_stop to cope with a NULL _bts.
2009-09-28[paging] Kill old defines from paging.cHolger Hans Peter Freyther1-3/+0
2009-09-28[paging] Implement paging by IMSI.Holger Hans Peter Freyther1-3/+7
Try to page by IMSI when the TMSI is not set. This will be required to properly support the MSC/BSSMAP.
2009-09-28[tmsi] Make the tmsi a 4 octet numberHolger Hans Peter Freyther1-3/+1
tmsi is four octets long, there is no need to make it a string and then jump through hoops to convert it to a number. Keep the database using it as a string to benefit from the NULL handling of the db. Introduce the reserved tmsi which has all bits set to 1 according to GSM 03.03 §2.4 and start checking for it and make sure the db code will never allocate such a tmsi.
2009-08-20[gsm48] Introduce a gsm48_generate_mid_from_imsi methodHolger Hans Peter Freyther1-1/+1
Prefix generate_mid_from_tmsi with a gsm48_, create a new method to binary encode the imsi. Add a unit test for parsing and decoding. The implementation can parse the data it generated and the last octet seems to be filled with the end mark.
2009-08-20[paging] Better use ';' for the command...Holger Hans Peter Freyther1-3/+3
2009-08-15paging_request() now returns the number of started paging requestsHarald Welte (local)1-2/+5
this helps the caller to determine if he will ever get called back or not (and if he should free his data structures now or not)
2009-08-15Merge commit 'har/master'Harald Welte1-6/+1
2009-08-15provide return code from paging_request() functionHarald Welte1-6/+13
this enables the caller to detect if the paging request was rejected by the paging layer, especially in case it is already paging this very subscriber. In the case of SMS / 04.11, we used to have a memory leak of struct gsm_sms's, since we would only free them from the paging succeeded/expired callbacks.
2009-08-15move talloc context creation out of on_dso / constructorsHarald Welte (local)1-6/+1
the various constructors get called in a non-obvious, linker determined order, which makes certain objects disappear from the talloc report. This change moves the talloc context creation into a new talloc_ctx.c file
2009-08-08when paging a MS, use the channel type indicated by callerHarald Welte1-2/+3
The existing code always paged for a TCH/F, which is really wasteful when considering the delivery of SMS messages. Also, increase the verbosity of the debug message a bit.
2009-08-01gsm_04_08 no longer needs to iterate over all BTS in LACHarald Welte1-0/+1
this task is performed by the paging.c code already.
2009-07-28move allocation of talloc contexts into link-time constructorHarald Welte1-3/+5
This is much more optimal than checking if the context exists every time we allocate the respective object.
2009-06-26use taloc_zero() rather than talloc() and explisit memset()Harald Welte1-2/+1
2009-06-20introduce talloc all over OpenBSCHarald Welte1-2/+8
2009-06-10reworked MNCC codebaseHarald Welte1-1/+5
This is Harald's reworked MNCC base, slowly heading towards integration into master. The key changes are: * provide much more structure to the data in gsm_mncc * encode_* and decode_* functions now take a structure rather than tons of individual arguments (whose order nobody can remember) * make sure we don't have copies of the same code everywhere by introducing mncc_set_cause() and mncc_release_ind() * save horizontal screen space if possible * make sure we break lines > 80 characters
2009-06-10Proposal for a "channel request" interface...Holger Freyther1-2/+2
Reuqests for a subscriber a stored within the gsm_subscriber datastructure and it will keep track how many channels are allocated for this user and of which type to decide on policy... e.g. attempt to submit SMS during a phone call and not doing paging but a simple (immediate) assignment of the channel...
2009-06-10[paging] Unbreak breakge when moving things into paging.cHolger Hans Peter Freyther1-1/+4
By calling _paging_request_stop with NULL for the lchan we have never used the paging complete callback... I didn't spot that when moving the code over and thought it is a great simplification to not call paging_request_stop first and then loop... *sigh* restore the old behaviour. Call the callback first and then free the requests.
2009-06-10Move the "finding" of the right BTS into paging.cHolger Hans Peter Freyther1-4/+42
Move the secret of how to find the BTS in a LocationArea into the paging layer. This allows to implement different strategies without changing other parts. E.g. we might want to try the BTS were the device was seen last and then try... There should be no semantic change and things should continue to work. It is sadly not tested though.
2009-06-10use gsm_bts_by_lac() function to start paging of all bts with same lacHarald Welte1-1/+1
when paging is successfull, the paging_request_stop() function is called with the current lchan, so the callback function will be called. for all other bts', the paging_request_stop() function is called without lchan, so the paging is stopped, but the callback function is not called. this ensures that only one paging result is received when paging multiple BTS. (Andreas Eversberg)