aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
2013-10-06abis: Use OML remote (BSC) address if RSL CONNECT contains no IPHarald Welte3-7/+23
This introduces a new get_signlink_remote_ip() function whcih we also use in the RSL code to determine the RTP remote address if the CRCX/MDCX contains no remote IP address IE.
2013-10-06Call e1inp_vty_init() to make abis interface accessible from VTYHarald Welte1-0/+1
It might not be particularly useful, but then there's no disadvantage either...
2013-10-06migrate away from our own abis.c code to libosmoabisHarald Welte4-452/+168
libosmoabis has a BTS-side implementation of the IPA protocol for years, and osmo-bts should have used that all the time. Unfortunately it had its own local hack, this patch is migrating to the libosmocore implementation.
2013-07-16oml: Remove the unused nofh variable from oml_mo_tx_sw_act_repHolger Hans Peter Freyther1-3/+1
The variable was assigned but nothing was done with it, just remove it for now. Fixes: Coverity CID 1040758
2013-07-09rsl: Fix the audio handling after the 'alignment' handling fixHolger Hans Peter Freyther1-26/+21
The issue got introduced in fcdba6bfaca9e016f35fc9fa826948ec74f66121 when moving from the uint32_t pointer to a plain int. The code was now like this: if (connect_ip > 0) { if (connect_ip == 0) lookup_ip_based_on_rsl ... Coverity detected this as logically dead code and it was breaking audio handling for the osmo-bsc case. Remove the tristate handling, the RSL behavior is that leaving out port/ip is like specifying it as zero. Fixes: Coverity CID 1040769
2013-06-30make oml_mo_state_init() a void functionHarald Welte1-1/+1
... so we don't get warnings about not returning anything
2013-06-30Don't send OML STATE CHANGE before OML is connectedHarald Welte2-5/+12
Instead of calling oml_mo_state_chg() [which transmits OML STATE CHG] during bts_init(), we use a new oml_mo_state_init() function which simply sets the state.
2013-06-24lapd: Fix a +ptrsize memory leak for each opened lchanHolger Hans Peter Freyther1-1/+1
The lapdm/lapd_core code needs to keep a history of messages sent. This history is not freed when lapdm_channel_reset is called and the init code will just allocate a new array. This means there is a memory leak on every released channel every time it is released.
2013-06-20rsl: fix the unaligned memory access0.3.0sysmocom/0.3.0-stableNicolas J. Bouliane1-14/+18
the armv5 can do 32bit/16bit reads only from the aligned address use tlv.h macro to copy data to local variable Signed-off-by: Nicolas J. Bouliane <nicolas.bouliane@nutaq.com>
2013-06-12Makefile.am: Use AM_CPPFLAGSAlexander Huemer1-1/+1
Since automake 1.13 INCLUDES is depricates and causes a warning
2013-05-04measurement: Mark the internal functions as internalHolger Hans Peter Freyther1-2/+2
In terms of assembly code this only removes the ".global FN" from the code. GCC does not attempt to inline it right now.
2013-04-30rsl: Add the channel name to the act nack and conn fail messageHolger Hans Peter Freyther1-2/+6
2013-03-24measurement: Add debug helper when we have a report for an inactive channelHolger Hans Peter Freyther1-0/+5
2013-03-23oml: Only shut the bts down onceHolger Hans Peter Freyther1-0/+6
If the shutdown timer is already running do not deactivate the RF and do not close the trx. This is addressing another instance of the following warning: [ERROR] : DeviceMng_ValidateL1Handle() => Invalid layer 1 handle
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.