aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-05-01sysmobts: Use msgb_free instead of talloc_free to free the messageHolger Hans Peter Freyther1-2/+2
Currently msgb_free is calling talloc_free but we might introduce a msgb pool in the future. So make sure to use the designated free method for the msgb.
2013-05-01sysmobts: Print the lchan name for the S counter.Holger Hans Peter Freyther1-5/+8
2013-04-30rsl: Add the channel name to the act nack and conn fail messageHolger Hans Peter Freyther1-2/+6
2013-04-18osmo-bts: fix linking order in Makefile.amNicolas J. Bouliane1-1/+1
On some system (e.g. ubuntu) libosmovty must precede libosmocore otherwise we get undefined reference errors while linking. Signed-off-by: Nicolas J. Bouliane <nicolas.bouliane@nutaq.com>
2013-04-07sysmobts.service: Install the sysmobts.service at the default targetHolger Hans Peter Freyther1-0/+3
2013-03-24sysmobts: Document the known MphConfig conflict in the codeHolger Hans Peter Freyther1-0/+2
Right now changing the TxPower through the VTY could conflict with a channel activation.
2013-03-24sysmobts: Do not re-configure the channel on non-active channelsHolger Hans Peter Freyther1-0/+7
In case the channel is not active we can omit the external requests to modify it. For the channel modification the higher level is already acking it and for the ciphering it is probably too late to do anything.
2013-03-24oml: Use the queue for the release handling of a channelHolger Hans Peter Freyther1-67/+212
There are three new commands. There are two markers and a deactivate command. The markers are used to wait until all previous commands are executed and then to decide if the SAPI needs to be released at all. When asked to release the SACCH the marker will be queued, then on execution of the marker the SACCH in Up-/Downlink will be released. For the RF Channel Release we use another marker, when the marker is executed we check all the SAPIs we want to release. It is possible that the queue looks like this: (SACCH_REL_MARKER is done) REL_MARKER, SACCH DEACT, SACCH DEACT This could happen if a BSC sends SACCH Deactivate and RF Channel Release at the same time. We deal with issue by changing the SAPI state to the REL_REQ state and check_sapi_release will not ask for another release. So after the execution the queue will look like this: SACCH DEACT, FACCH DEACT, TCHF DEACT.. This code does not check that all allocated SAPIs are released. The lchan_deactivate_sapis could be changed to go through all sapis_dl and sapis_ul to fix that. The normal flow should now be: 1.) lchan_deactivate 2.) Check if the queue is empty then go to 4 3.) REL_MARKER is executed and lchan_deactivate_sapis is called 4.) For all SAPIs to be released, check if they are allocated and then schedule a CMD_DEACTIVATE. If there is an error remember something went wrong but continue. 5.) Once all commands are executed send the channel release ack. For the release markers we need to be careful as they might not schedule any work. E.g. if the BSC sends two SACCH DEACTIVATE the second marker will not generate any release requests and we should proceed with the next command. Make sapi_queue_command return 1 in case the command has been directly executed. So a queue like SACCH_REL_MARKER, LOGCH will result in LOGCH, SACCH DEACT Rx, SACCH DEACT Tx but a 0 will be returned and the sapi_queue_next will then call sapi_queue_exeute again. NITB has been modified to trigger these corner cases more easily. * Do not send IMM.ASSIGNMENT for some timeslots to go through the error path * Issue multile SACCH deactivates in the normal release mode * Send rsl_chan_mode_modify_req before the SACCH DEACT and also when the RLL is being released.
2013-03-24oml: Print out power setting in txpower completion callbackDaniel Willmann1-5/+18
2013-03-24oml: Use sapi command queue for setting the logical channel paramsDaniel Willmann1-3/+25
2013-03-24oml: Enqueue ciphering message through sapi cmd queue as wellDaniel Willmann1-10/+44
2013-03-24oml: Introduce a SAPI queue for activation and deactivation of SAPIsDaniel Willmann2-31/+163
Put all SAPI requests into a queue and handle them one after another. Begin with the channel activation. Once the queue is empty the channel activate will be sent. For the BCCH activation we do not want to send a channel activation message and this is why we set the lchan->state to NONE. One change is that we do not attempt to call the ciphering routines on the BCCH anymore. This change is necessary to fix issues with LCHANs staying open and being marked as broken by the BSC and will help in implementing handover support as this requires a re-configuration of the lchan on the fly.
2013-03-24measurement: Add debug helper when we have a report for an inactive channelHolger Hans Peter Freyther1-0/+5
2013-03-24sysmobts: Prepare to address the documented limitation of this codeHolger Hans Peter Freyther1-3/+12
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-18fixup e2cde1f48379657402332b5a95d4ce242d63069aAndreas Eversberg1-1/+1
2013-03-17Add VTY option to define minimum C/I level for RACH and normal burstAndreas Eversberg3-3/+38
2013-03-17Get RSSI from received uplink data and send to PCUAndreas Eversberg4-5/+11
This bumps the PCU API version and thus requires a new version of the code on the sysmoBTS side!
2013-03-16sysmobts: Name the screen and use '-X quit' to shut it downHolger Hans Peter Freyther3-2/+5
Use "kill -2 0" for the PCU as SIGTERM is not handled yet. With the current set of code the stop function will stop both the PCU and the BTS.
2013-03-16respawn: Adjust the oom score for the supervisor and bts/pcu, increase sleepHolger Hans Peter Freyther2-2/+20
Make the script mostly unkillable due to OOM and make sure that the process has a score of zero. Wait 10 seconds before re-launching. The combination of ( && exec ) & appears to save one sub-process. The script has been tested with bash and busybox's ash.
2013-03-15Fix: Stop RADIO LINK TIMEOUT couter S from counting, if it has reached 0Andreas Eversberg2-22/+40
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 Eversberg7-3/+61
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-03-07l1_if: if ul_power_target==0, hard-code MS power to what RSL saysHarald Welte1-0/+4
RSL CHAN ACT contains a MS_POWER IE which is intended to be used as the initial power level for the MS, before the UL power control loop is starting. In our case, if ul_power_target != 0, then the DSP takes care of power control. If ul_power_target == 0, then we instruct the phone to constantly use the value specified by the BSC in the MS_POWER IE. FIXME: Actually implement a proper power control algoritihm inside osmo-bts so we don't have to rely on the DSP implementation.
2013-03-06gsmtap: Put the RxLevel and RxQual in uplink GSMTAPHarald Welte1-1/+3
2013-03-02doc: Remove the rtp bind-ip from the exampleHolger Hans Peter Freyther1-1/+0
This option is not needed anymore, let's remove it.
2013-02-27calib: Use 2.4.0 as cut-off for the firmware, log errorsHolger Hans Peter Freyther2-3/+7
In case opening a calibration file is failing an error will will be logged, the caller and implementation were inconsistent about the API version that is supported for the calibration data, attempt to make the cut-off at 2.4.0.
2013-02-27tests: Share the stub between the paging and ciphering testsHolger Hans Peter Freyther5-86/+50
2013-02-27sysmobts: Improve the shutdown of the DSP on exitHolger Hans Peter Freyther5-3/+9
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-27Merge branch 'zecke/request-queuing'Holger Hans Peter Freyther4-66/+75
* Simplify the callback signature. The trx is now the first argument. * Embed the calibration data into the femtol1_hdl. Tests: * All commits are compile tested * All commits bring up the radio (without using calibration data) * Calibration data loading has been tested with the merge * All commits allow a IMSI Attach and a MO Call (to an invalid unknown number). All channels are freed after this. It has been tested with the E71.
2013-02-27sysmobts: Fix a memory leak when no callback is setHolger Hans Peter Freyther1-2/+6
The TxPower handled used to call the requestion function without a callback. In that case the msgb is leaked. The code still allows the callback to be NULL so we will just delete the message in that case.
2013-02-27sysmobts: Remove the is_system_primitive from l1if_req_complHolger Hans Peter Freyther3-8/+14
All users (but the gsm_compl) of the l1if_req_compl use it with is_system_primitive=1. We can now remove this parameter from the method. Introduce _l1if_req_compl that will insert the item into the queue for us.
2013-02-27sysmobts: We can now pass the trx to the callback change the signaturesHolger Hans Peter Freyther4-23/+14
2013-02-27sysmobts: Remove the trx parameter from the signatureHolger Hans Peter Freyther3-10/+10
l1if_gsm_req_compl everyone is passing the trx as data pointer right now, remove it from the request procedure right now as it can be deducted from the femtol1_hdl.
2013-02-27sysmobts: Embed the calib state in the femtol1_hdl and use hdl->privHolger Hans Peter Freyther2-17/+16
2013-02-27sysmobts: Use the hdl->priv in l1if_req_compl for all callersHolger Hans Peter Freyther1-9/+8
2013-02-27sysmobts: Remove the data parameter from the l1if_gsm_req_complHolger Hans Peter Freyther3-12/+12
Pass in the trx argument at the lower level as everyone is using the fl1h->priv now.
2013-02-27sysmobts: Use the fl1h->priv and get the ts back from the responseHolger Hans Peter Freyther1-4/+14
2013-02-27sysmobts: Use the fl1h->priv to get the trx instead of using the lchanHolger Hans Peter Freyther1-9/+9
I am working toward killing the last argument of the l1if_gsm_req_compl and just have the trx inside the callback signature.
2013-02-13Merge branch 'zecke/calib-pch-agch-follow'Holger Hans Peter Freyther4-14/+73
Introduce bcch_ccch to scan the PCH on top of the BCCH. The AGCH is included in the PCH. CBCH/NCH are not included at this point.
2013-02-13calib: Attempt to follow the PCH as well and print the SAPI..Holger Hans Peter Freyther3-13/+61
AGCH is reported as part of the PCH because we are not searching for the BS-AG-BLKS-RES inside the SI3 and do not use MphConfigReq to change this setting.
2013-02-13calib: Print the frame number decoded as t1/t2/t3Holger Hans Peter Freyther2-2/+9
2013-02-13calib: Provide the fn and block number for each frameHolger Hans Peter Freyther3-3/+7
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 Welte3-12/+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-02-04Make sure SACCH fill frame is correctly aligned for L1 headerHarald Welte1-1/+1
When we send a fill frame on SACCH, we need to have two bytes for the L1 header at the beginning (inserted by the DSP). Thanks for Andreas Eversberg for pointing it out.
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.