aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_data.c
AgeCommit message (Collapse)AuthorFilesLines
2010-06-28gsm_data.c: Reorder includes to put osmocore upHolger Hans Peter Freyther1-2/+4
2010-06-20[BSC] Generate MA for each timeslot that has hopping enabledHarald Welte1-0/+2
The MA is used in 04.08 channel assignment related messages
2010-06-20[BSC] introduce the concept of 'BTS features'Harald Welte1-0/+10
We can then check if a bts supports a certain feature or not.
2010-06-20[BSC] Implement per-timeslot ARFCN lists for frequency hoppingHarald Welte1-0/+3
We now compute the Cell Channel Description for SI 1 by bit-wise OR of the ARFCN bitmask of each timeslot on all the TRX of the BTS. Also, support generating a GSM 04.08 Channel Description IE for the hopping case (with HSN/MAIO instead of ARFCN). What's still missing now: Sending the 04.08 Mobile Allocation IE
2010-05-31[rsl] Introduce an error state for the lchan and set it on releaseHolger Hans Peter Freyther1-0/+1
When we issue a RF Channel Release in case of a failure we receive RLL release indications after the channel was tearn down and we issue another RF Channel Release as a result. The channel allocator might have already allocated this channel and we release the channel again with another MS on it. Make rsl_rf_chan_release take an error argument and make it set a new state in case of an error and change the RF Channel Release ack to not set the state back to none in case of an error but wait for a timeout that is a bit higher than T3111. I tested this with removing the battery during a phonecall and waiting for the channel failure. With this test we only send the release once.
2010-05-14[misc] Silence compiler warning...Holger Hans Peter Freyther1-0/+2
If someone tries to set the type to unknown he should know what he is doing, just silence the warning.
2010-05-11[gprs] NS/BSSGP: Make all timers configurable from VTYHarald Welte1-0/+8
2010-05-01move gsm48_construct_ra() to libosmocoreHarald Welte1-27/+0
2010-04-25[vty] Allow to set the RACH NM attributes on a per BTS basisHolger Hans Peter Freyther1-0/+2
Be able to tune the RACH settings of the BTS via the vty interface, by default they are initialized to -1 which means we will use the content of the static array (BTS default) and can be changed via the VTY interface. I have verified the setting on the nanoBTS with wireshark and I have tested writing the config file.
2010-04-18GPRS: change 'gprs enabled <0-1>' to 'gprs mode (none|gprs|egprs)'Harald Welte1-0/+17
This causes some config file breakage but sounds like a much cleaner approach than to have two separate config variables for this.
2010-04-17[statistics] Keep track of OML/RSL failures of the BTS.Holger Hans Peter Freyther1-0/+2
2010-04-17[statistics] Keep track of rf failures and rll release failuresHolger Hans Peter Freyther1-0/+2
Add two new counters to count the RF Failures and the RLL Release failure and make them available via the vty interface.
2010-03-25increase the use of 'struct value_string' in abis_nm and gsm_dataHarald Welte1-83/+52
2010-03-22Create new gprs-conf branch with the non-SGSN part of the gprs branchHarald Welte1-0/+46
This new gprs-conf branch is intended to contain everything needed to configure GPRS in the nanoBTS, but without implementing the SGSN/GGSN functionality. The SGSN/GGSN development will happen in a branch based on this branch called "gprs-sgsn"
2010-03-04move gsm_band_name() and gsm_band_parse() to libosmocoreHarald Welte1-54/+2
2010-02-20split 'libosmocore' from openbsc codebaseHarald Welte1-6/+18
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-12Fix allocation of BTS from VTYlaforge1-1/+1
In 39315c47989326275823d1589425ee62d15bc823 we introduced per-bts OML attribute parser definitions and disallowed a BTS of type unknown. However, the VTY code first allocates a BTS with unknown type.
2010-01-10[OML] parse attributes depending on BTS typeHarald Welte1-1/+42
Some NM attributes are defined differently depending on the BTS type. Having one big nm_att_tlvdef[] table for all BTS types is no longer sufficient. This patch * introduces 'struct gsm_bts_model' to describe a BTS model * adds definitions of gsm_bts_model for BS-11 and nanoBTS * changes the abis_nm_tlv_parse() function: include a bts pointer
2010-01-07introduce new gsm_bts_trx_by_nr() functionHarald Welte1-0/+11
2010-01-07Initialize reject_cause to a valid numberHolger Hans Peter Freyther1-0/+1
Currently starting with the opencfg.cfg.nanobts and writing it out and then trying to start again will not work. The network reject_cause is initialized to 0 which is not a valid reject reason and when writing this to the config file and trying to parse it will fail. Pick roaming not allowed as a harmless option to those phones accidently trying to connect to the BTS.
2009-12-31[misc] Utilize rf_locking by setting the nm_state.administrativeHolger Hans Peter Freyther1-0/+1
* On start the vty code will call the abis_nm method and this will set the administrative state to unlock/lock * During startup the BTS will report its state as well and would possible overwrite the set administrative. We are only going to update the administrative if it was 0 before. This appears to work on all of my tests. In case this will not be the case for others we will have to split the administrative into two sets one for the BTS and one for the BSC.
2009-12-29rsl: add new 'gsm_trx_name()' function and use itHarald Welte (local)1-0/+9
2009-12-29Introduce gsm_lchans_name() for human readable lchan state nameHarald Welte1-0/+14
Also, use this new function to dump lchan state on VTY and to improve readability of RSL log messages.
2009-12-28set the TRX nominal power by default and/or VTYHarald Welte (local)1-0/+18
2009-12-28Introduce and use gsm_lchan_name() in addition to gsm_ts_name()Harald Welte (local)1-0/+10
In many cases we actually want a name / unique ID for the lchan, not just for the on-air timeslot... especially in SDCCH/8 case, where 8 SDCCHs share one timeslot...
2009-12-28rename gsm_lchan_name() to gsm_lchant_name()Harald Welte (local)1-1/+1
2009-12-27move get_string_value() und get_value_string() into debug.cHarald Welte1-26/+0
this makes bsc_mgcp and ipaccess-proxy compile again
2009-12-26add 'get_string_value()' as inverse function of 'get_value_string()'Harald Welte (local)1-0/+13
2009-12-22statistics: Introduce 'struct counter' instead of using unsigned longHarald Welte1-0/+27
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-22bts: Allow config of RACH control parameters tx-integer & max retransSylvain Munaut1-0/+4
Tweaking theses can be useful especially tx-integer that influence both the spread of rach attemps and the delay between two attemps. Looking up GSM 04.08 3.3.1.1.2 & 10.5.2.29 can help determine good values. The default are choosed with a wide spacing between attemps (tx integer = 9 -> T=12 & S=217 (non-combined CCCH/SDCCH) or 115 (for combined CCCH/SDCCH)). This alleviates the problem of responding to several RACH attempts by a same MS, allocating several RF channels when only 1 is needed. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-12-21[handover] Real handover algorithmHarald Welte1-0/+8
This implements the handover algorithm (and associated parameters) as described in Chapter 8 of the book "Performance Enhancements in a Frequency |Hopping GSM Network" by Thomas Toftegard Nielsen and Jeroen Wigard. The parameters such as averaging windows are configured in struct gsm_network. We keep some state to trakc up to 10 neighbors as they are being reported from the MS. This has so far only been tested in a network with two BTS that have each other as neighbor. Networks with morge neighbors might encounter bugs.
2009-12-15introduce cache of 6 last recently received measurement reports for each lchanHarald Welte1-0/+13
2009-12-15add BSIC parameter to gsm_bts_neighbor()Harald Welte1-2/+4
When looking for the gsm_bts of a neighbor cell, use BSIC and ARFCN tuple rather than just ARFCN for better identification purpose.
2009-12-14Implement gsm_bts_neighbor() function to determine neighbor BTSHarald Welte1-0/+17
We will need this for the actual handover algorithm implementation, as we will only know the current BTS and the BCCH ARFCN of the strongest cell in the measurement reports. Using this new function, we can resolve the matching gsm_bts.
2009-12-14system_information: use bitvec to generate frequency listsHarald Welte1-0/+6
We use a 1024-bit-sized bitvec to generate the BA and neighbor frequency list. This bitvec is still generated from the list of all BTS's inside the BSC, but this patch is the first step to generalize this, i.e. generate arbitrary neighbor lists.
2009-12-13[RRLP] make RRLP mode configurable from config fileHarald Welte1-0/+23
We now support different RRLP modes (including "none" to disable RRLP), you can configure it via "rrlp mode" in the "network" section of openbsc.cfg.
2009-12-12[VTY] add more cell reselection parameters to VTYHarald Welte1-0/+2
allow setting of 'cell reselection hysteresis' and 'rxlev access min' from VTY for experiments with cell reselection.
2009-12-01Assign default values for T3101 and T3113Harald Welte1-0/+3
Without those default values, old config files will no longer work after commit 23975e718fd456ff8be7effbb915903f1bc173be
2009-11-24[vty] Add option to disable RF on a given TRX.Holger Hans Peter Freyther1-0/+1
- Make sure that on runtime the Radio Carrier can be locked and unlocked. The vty code calls into the Abis NM to lock/unlock the channel and the state is stored there. - Make sure that on start the Radio Carries remains offline and we are not starting it. On start the radio carrier is either locked or unlocked. This means the RSL will not connect until the RF is unlocked. It will connect then. To see RSL bringup failures one needs to parse the RSL nack message. - When the TRX is locked on startup the RSL link will only be established after it will be unlocked.
2009-11-12move 'struct value_string' and 'get_value_string()' to gsm_dataHarald Welte1-0/+13
2009-10-29[misc] Use talloc_zero instead of talloc and later memsetHolger Hans Peter Freyther1-6/+3
2009-10-26[USSD] various USSD improvementsMike Haben1-1/+1
- Improved handling of extension-number string (as per review) - Guard against a buffer-overflow if mobile sends a too-long USSD - declare some function-parameters const - fix gsm_ts_name function to display the right BTS number (bts->nr rather than bts->bts_nr)
2009-10-24[GPRS] introudce PDCH and PDCH/TCH physical channelsHarald Welte1-0/+2
GPRS needs PDCH (Packet Data Channels), and we need support in our data model as well as OML and RSL for it
2009-10-24[GPRS] add data structures for OML of NSE,CELL,NSVCEHarald Welte1-0/+6
Supporting GPRS means we have a number of additional OML objects to deal with. We need to extend our gsm_bts structure to at least include the nm_state for each of those objects.
2009-10-05[ipaccess] Add nanoBTS 1900 supportMike Haben1-2/+1
Add support for 1900 nanoBTS by using unified bts_type GSM_BTS_TYPE_NANOBTS for 900, 1800 and 1900 versions. Reduce the nanoBTS enum values to one and derive the version from the user supplied band. In the future we might want to do auto band detection. The configuration file needs to be changed to refer to nanobts instead of nanobts900/nanobts1800. Signed-off-by: Mike Haben <michael.haben@btinternet.com> Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-10-01[lac] Do not use the reserved LAC 0x0 for two different thingsHolger Hans Peter Freyther1-1/+1
We are using LAC=0 for remembering that a GSM subscriber is detached. I recently added code to gsm_bts_by_lac that will return every BTS in case the lac is 0. Harald highlightes that we would now search for detached subscribers at every BTS of our network which is clearly not what we want. Introduce two defines for the two reserved LAC, add a pointer to the specification, check that our config files do not contain these reserved values, use the define and change gsm_bts_by_lac to use the other define.
2009-09-28[paging] Use one of the two reserved LAC to page every BTSHolger Hans Peter Freyther1-1/+1
For the on-waves.com MSC case we want to page every BTS reached of the network. Our gsm_subscriber entry does not have a LAC entry set and defaults to zero. Use the reserved 0x0000 to indicate that we want to use every bts in the network. This will influence the paging code to start and stop paging.
2009-08-13add 'ms max power' vty command to set the maximum MS power in dBmHarald Welte (local)1-0/+1
2009-08-12add a authorization policy field to the network and VTYHarald Welte (local)1-0/+23
this is not being used yet
2009-08-08the actual config file code (not just config files)Harald Welte1-2/+9
this was missing from commit a08a9acdb6bff0ee4fdf0f58b78b6525017a1f9f