aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
2013-03-17Get RSSI from received uplink data and send to PCUAndreas Eversberg1-1/+3
This bumps the PCU API version and thus requires a new version of the code on the sysmoBTS side!
2013-03-15Fix: Stop RADIO LINK TIMEOUT couter S from counting, if it has reached 0Andreas Eversberg1-3/+9
In case that the counter S reached 0, it will stay 0. Subsequent received good and bad SACCH frames must not cause to trigger radio link failure again. Once the BSC has been indicated about link failure, it will release channel. The counting of S has been moved to a seperate function. This patch will ensure that the link failure is indicated only once. But even if the link failure would be sent multiple times, the BSC should ignore it. The BSC releases the channel and may only reuse it after confirm from BTS. (There cannot be any link failure indications after confirm of channel release.) The allowed timeout value range is 4..64, as defined in TS 05.08, so if the BSC sends an attribute with value out of range or other failure criterion, the Set BTS Attributes message is NACKed.
2013-03-14OML: fix broken curly braces while parsing SET BTS ATTRHarald Welte1-1/+2
Looking at the problem, it's a surprise that the old code was working at all... (Thanks to jolly for pointing this out)
2013-03-13RSL: Fix Channel Number IE in Common Channel RSL messagesHarald Welte1-0/+1
As per Chapter 9.3 of TS 08.58, we have to use RSL_IE_CHAN_NR instead of the zero we were implicitly using so far.
2013-03-11Added radio link timeout procedure according to TS 05.08 Chapter 5.2Andreas Eversberg3-1/+31
Chapter 5.2 applies to MS procedure, but 5.3 (BSS procedure) defines no exact criterion, so I decided to use the procedure equivalent to MS. The criterion is based on a counter S, which is initialized to a preset RADIO_LINK_TIMEOUT, which can be configured via VTY. Whenever a received SACCH block is bad, S is counted down by one. If SACCH block is successfully decoded, S is counted up by two, but never above initial RADIO_LINK_TIMEOUT value. If S reaches 0, an RSL Connection Failure Indication with cause RF Radio Link Failure is sent to BSC, which then aborts channel. Use link timeout value from BSC via OML attribute. How to test: - Set "debug" for "meas" logging. - Start silent call to an attached mobile. - Remove battery from mobile or shield mobile. - Watch S count down.
2013-02-27sysmobts: Improve the shutdown of the DSP on exitHolger Hans Peter Freyther1-1/+3
Issue the RfDeactivate.REQ before sending the MphClose.REQ. Ideally we would issue MphClose.REQ after the RfDeactivate.CNF but this is not possible right now. The current approach makes the following warning of the DSP go away on shutdown. This was tested with my E71 and an active silent-call using a SDCCH. DSP Warning: [ERROR] : DeviceMng_ValidateL1Handle() => Invalid layer 1 handle
2013-02-09RSL: further rtp local bind related fixesHarald Welte1-11/+49
If the CRCX does not indicate the remote IP address, then we still were binding to 0.0.0.0 and used that address successively in the CRCX_ACK. As a workaround, we now use the source IP address of the RTP socket, assuming that the outbound routes to BSC and the MGW are identical. This is of course not always true, but I don't think there are any better alternatives...
2013-02-09rsl: Fix compiler warning in use of osmo_rtp_get_bound_ip_port()Harald Welte1-1/+4
for whatever reason i decided that a port number in osmo_rtp_get_bound_ip_port() needs to be a int * and not a uint16_t * at the time, so we have to deal with this here rather than breaking the ABI.
2013-02-09Fix determination of locally bound IP for RTP socketsHarald Welte1-8/+9
After we create a socket and bind it to INADDR_ANY, we cannot yet use getsockname() to resolve the locally bound IP. This only works after the socket has been connected to the remote IP. So we have to move the osmo_rtp_get_bound_ip_port() to a code section after osmo_rtp_socket_connect() has already happened. With the code prior to this commit, unless "rtp bind-ip" was used in the config file, we reported "0.0.0.0" as the "Source IP AddresS" in the IPA CRCX ACK to the BSC. This is of course wrong, as the BSC will then use this "0.0.0.0" as destination address for the incoming RTP stream :( Please note that for this fix to work, you also need a libosmoabis.git with commit d426d458ca96ba29793e35b1b2a73fbcb3b2c888 which actually causes osmo_rtp_socket_connect() to actually issue connect() on the socket at all.
2013-02-04Deprecate the "rtp bind-ip" configuration directiveHarald Welte2-11/+4
Instead of explicitly having to specify the local IP address for RTP sockets in the BTS, we just use "0.0.0.0" instead, which gets translated to INADDR_ANY. We still accept the configuration directive in old config files, but when we write, the line will no longer be re-written to the file. TODO: IMHO, the IPA RSL CRCX/MDCX actually permit the BSC to specify the IP address on the BTS side, and we probably simply ignore this at this point.
2013-01-25RSL: don't store MS power in lchan->bs_power but lchan->ms_powerHarald Welte1-1/+1
As we currently don't use any BSC-based MS power control in either OpenBSC nor in OsmoBTS, this bug has never shown up so far. Thanks to Andreas Eversberg for spotting this.
2013-01-15fix message: the PCU is not a call control applicationHarald Welte1-2/+1
2013-01-13paging: De-duplicate paging lifetime and max queue length variablesDaniel Willmann2-10/+26
These attributes are saved in paging_state, we don't need to save them a second time in struct gsm_bts_role_bts. Add get and set methods for these attributes and use them consitently in the VTY code.
2013-01-01common: Fix faulty memcpy statement in the paging codeHolger Hans Peter Freyther1-1/+1
This was experienced by Daniel on his 64bit machine. The paging expiration time was too high and not set by the code at all. Using gdb watchpoints he found the place where the memory is written. The issue is that the size of the pointer (8) and not the size of the data structure was copied (3). Fix the issue by assigning the de-referenced value. gcc generates the same code as if we had written: memcpy(&ps->chan_desc, chan_desc, sizeof(*chan_desc));
2012-12-26ciphering: Handle ciphering support for A5/3 correctlyHolger Hans Peter Freyther2-2/+19
This was found and debugged by Sylvain. The BTS will always support A5/0 so we do not keep track of that, the first bit of the flags is used for A5/1, second for A5/2... but for RSL there is an offset to go from RSL to A5(x). Add a testcase and change the code.
2012-12-20openbsc: Prepare to allow to have the OpenBSC directory somewhere elseHolger Hans Peter Freyther1-1/+1
Right now osmo-bts requires access to one OpenBSC header file and this requires that openbsc and osmo-bts git are in the same directory. Begin with making the location of the OpenBSC sourcecode configurable. This approach will allow to build osmo-bts on our Jenkins installation but now has the risk of more code including the openbsc/*.h header files.
2012-12-20misc: Change the method to return void instead of int and garbageHolger Hans Peter Freyther1-1/+1
The method was not returning anything and the callers did not use the result. Change it to void for now.
2012-12-20misc: Include pcu_if.h for pcu_tx_pag_req in rsl.c and make it constHolger Hans Peter Freyther2-1/+2
The rsl.c code was calling the paging request with a const pointer, change the signature to make the code const.
2012-12-20misc: load_ind_period is uint8_t and 60*100 is bigger than that.Holger Hans Peter Freyther1-1/+1
Address the compiler warning and truncate the value by hand.
2012-11-24Add VTY configuration of paging queue size and lifetime of paging recordsHarald Welte3-4/+56
This may be adding bells and whistles that nobody wants to touch, but at least for current analysis/optimiziation they are useful to have. Later on they should probably be removed again and/or obsoleted by OML messages for configuration of paging behaviour by the BSC.
2012-11-24paging: send CCCH load indications even if paging load below thresholdHarald Welte1-0/+6
This is mainly as OpenBSC is adjusting the amount of paging commands it sends based on this magic value 0xffff.
2012-11-20Use tlvp_val16_unal() / tlvp_val32_unal() to align 16 and 32 bit valuesAndreas Eversberg1-26/+32
This is required for CPUs < armv6, to access 16 and 32 values at right memory locations.
2012-11-10VTY: print length/depth of paging queue in 'show bts'Harald Welte1-0/+4
2012-10-04OML: TA is a 8bit value, not 16bitHarald Welte1-4/+2
... as jolly correctly pointed out.
2012-09-29Fix: Set correct paging group for IMM.ASS on PCHAndreas Eversberg1-5/+6
2012-09-29PCU: Add PCH confirm, raise PCU interface version to 4Andreas Eversberg2-0/+30
The confirm is required, so PCU knows when an IMMEDIATE ASSIGN message has has been sent on PCH. The PCU will start packet flow after that confirm.
2012-07-26PCU: Removed -P option, so GPRS support is always enabledAndreas Eversberg1-7/+4
2012-07-25vty: Document parameters of the unit-id and the band selectionHolger Hans Peter Freyther1-2/+12
2012-07-21Send RR paging requests to PCU, in order to page on PACCHAndreas Eversberg2-0/+35
2012-07-21Enable direct access to PDTCH queue of DSP by PCUAndreas Eversberg1-0/+7
Use "-P -M" to enable PCU and direct access.
2012-07-20misc: Quote the warning to avoid additional warningHolger Hans Peter Freyther1-2/+2
2012-07-16PCU: Add verion number of PCU interface to PCU INFO IND messageAndreas Eversberg1-0/+1
The client (PCU) can check if it is compiled with a different version.
2012-07-16PCU interface: fix memory leaks in error pathsAndreas Eversberg1-0/+2
2012-07-11OML: add missing ntohs() for UL/DL_TBF_EXTHarald Welte1-2/+2
Thanks to Andreas for spotting this.
2012-07-08PCU: remove german warnings from the codeHarald Welte1-2/+2
2012-07-08PCU: Add PCU socket interface to BTS.Andreas Eversberg4-5/+860
A special command line option "-P" is used to enable socket interface and signal available GPRS MO object to BSC.
2012-07-08Add BTS to list at the beginning of bts_init()Andreas Eversberg1-3/+6
During init process, signals might be sent. PCU receives these signals and requires that BTS instance is already in the list.
2012-07-08debug: Add new debugging class for PCU interface (DPCU)Andreas Eversberg1-0/+6
2012-07-08signal: Add signals for setting/change of GPRS MO attributesAndreas Eversberg1-0/+8
2012-07-08paging: Alow to store CCCH messages in paging recordsAndreas Eversberg1-30/+107
This is required for PCU to send IMMEDIATE ASSIGNMENT messages on PCH. A message in a paging record is sent only once.
2012-07-08Fixes for handling of GPRS NSE/NSVC/CELL MOAndreas Eversberg1-5/+8
2012-07-05paging: Expire paging requests after the expiration timeHolger Hans Peter Freyther1-1/+1
The paging needs to expire when the expiration time is smaller than the current time.
2012-06-28Add 12.21 handling for GPRS NSE/NSVC/CELL MOHarald Welte2-0/+172
We now bring the GPRS related MO up in DEPENDENCY state and parse the various NS, BSSGP and RLC parameters as set by the BSC via 12.21/OML.
2012-06-21make sure we don't send CCCH LOAD IND before we have an Abis linkHarald Welte2-2/+2
2012-06-18rsl: use correct headroom size for load indicationsHarald Welte1-2/+2
2012-06-15use default value of 63 for maximum timing advanceHarald Welte1-0/+1
As the careful commitlog reader Andreas points out: When the BSC does not sent NM_ATT_MAX_TA, then it would be zero instead of the specified default value of 63.
2012-06-15CCCH LOAD IND: Avoid divide-by-zeroHarald Welte1-2/+11
The total count of RACH or PCH slots should never be zero, as they constantly increment. However, just as a safeguard, we introduce an explicit handign to avoid divide-by-zero situations
2012-06-15RSL: Add CCCH LOAD INDICATION for RACHHarald Welte2-23/+32
We now count the total number of RACH slots, the number with rx level above the busy threshold, and the number of valid access bursts. This data is used to generate RSL CCCH LOAD INDICATION for the RACH.
2012-06-14system information: avoid modulo 0 / SIGFPEHarald Welte1-3/+8
As Holger pointed out, it may well be the case that there are no system information messages to be sent at TC=4, and we should avoid a modulo by 0. I'm simply sending SI2 instead now, as it isn't forbidden to send it more often than the minimum at TC=2...
2012-06-14attempt to make CCCH Load Indications for PCH workHarald Welte4-16/+42