aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2015-09-22ABIS: Introduce bts_model_abis_close to indicate ABIS link failure.Andreas Eversberg7-1/+20
sysmocom-bts model shuts down on link loss, but other models may not want this, so shutdown is moved tor bts_model_abis_close of osmo-bts-sysmo.
2015-09-22TRX: On negative response of critical commands, shutdown BTSAndreas Eversberg2-23/+32
2015-09-22Add test code for testing GSM burst transcodingAndreas Eversberg7-1/+228
2015-09-22TRX: Introduce osmobts-trx, a layer 1 implementation for OpenBTS tranceiversAndreas Eversberg26-0/+5176
The code is quite complete, TCH and PDCH channels are not yet tested.
2015-09-22Change to new structure of multirate at gsm_data_shared.hAndreas Eversberg3-24/+30
2015-09-22Fix: Call e1inp_vty_init() before reading config fileAndreas Eversberg2-1/+1
2015-09-22Fix: Process all TRX on GSM Time indication, not only C0Andreas Eversberg1-4/+5
2015-09-22Fix: Retrieve ARFCN (from OML) for TRX other than C0Andreas Eversberg1-0/+19
2015-09-22fix: make sysmobts tests only when sysmobts is enabledIvan Kluchnikov1-1/+5
2015-09-22Merge branch '201509-l1sap'Harald Welte24-964/+2066
2015-09-22move MS power control handling from sysmobts to common partHarald Welte13-95/+146
MS uplink power control is required in pretty much any BTS, and we cannot assume that they PHY / L1 will always take care of it by itself. So the correspondign code is moved to common/power_control.c and called from the generic part of L1SAP. The corresponding VTY paramter has been moved from the sysmobts-specific trx VTY node to the common BTS VTY node.
2015-09-22Move detection of handover frames from sysmo-bts code to common codeAndreas Eversberg2-13/+4
2015-09-22Remove obsolete gsmtap handling from osmo-bts-sysmo part.Andreas Eversberg2-104/+0
2015-09-22Add gsmtap option to command line to main.c of osmo-bts-sysmoAndreas Eversberg1-1/+19
2015-09-22Move gsmtap VTY commands from osmo-bts-sysmo to common partAndreas Eversberg4-85/+130
2015-09-22Send primitives at PH-/MPH-/TCH-SAP interface via GSMTAPAndreas Eversberg1-0/+167
2015-09-22sysmobts: Clean up transitions for lchan cipher stateAndreas Eversberg4-8/+22
There are three transitions: 1. LCHAN_CIPH_NONE -> LCHAN_CIPH_RX_REQ -> LCHAN_CIPH_RX_CONF It is used to enable ciphering in RX (uplink) direction only. 2. LCHAN_CIPH_RX_CONF -> LCHAN_CIPH_RX_CONF_TX_REQ -> LCHAN_CIPH_RXTX_CONF It is used to additionally enable ciphering in TX (downlink) direction. 3. LCHAN_CIPH_NONE -> LCHAN_CIPH_RXTX_REQ -> LCHAN_CIPH_RX_CONF_TX_REQ -> LCHAN_CIPH_RXTX_CONF It is used to enable ciphering in both TX and RX directions. This is used when the channel is activated with encryption already enabled. (assignment or handover) In order to follow the order of these transitions, the RX direction must always be set before the TX direction. If no cipher key is set (A5/0), ciphering is set to ALG 0, but lchan cipher state remains at LCHAN_CIPH_NONE.
2015-09-22Add MEAS (MPH_INFO) IND message to PH-/MPH-/TCH-SAP interfaceAndreas Eversberg2-13/+45
This part moves processing of measurement infos from osmo-bts-sysmo to common part.
2015-09-22l1sap: Port code to new ciphering handlingHarald Welte5-48/+44
... introduced in 2cc37035d73191b71b9ba9c0d559a0da6a5f35e5
2015-09-22sysmobts/l1_if: Sacch/Sdcc/Facch are handled in l1sap/coreHarald Welte2-57/+1
2015-09-22Add SDCCH/SACCH/FACCH messages to PH-/MPH-/TCH-SAP interfaceAndreas Eversberg2-133/+267
This part moves control channel message primitives from osmo-bts-sysmo to common part. In order to control ciphering fo BTS model, CIPHER (MPH_INFO) messages are used.
2015-09-22l1sap: Avoid compiler warnings regarding uninitialized nmsgHarald Welte1-2/+2
2015-09-22l1sap: Use {data,empty}_req_from_l1sap() and avoid code duplicationHarald Welte1-21/+4
2015-09-22Add TCH messages to PH-/MPH-/TCH-SAP interfaceAndreas Eversberg6-156/+294
This part moves TCH handling from osmo-bts-sysmo to common part. The RTP handling is done at the common part, so they can be used by other BTS models.
2015-09-22l1sap: re-introduce a comment that was lost during l1sap mergeHarald Welte1-0/+2
2015-09-22Move chan act/rel/modify from bts_model to PH-/MPH-/TCH-SAP interfaceAndreas Eversberg9-57/+240
This part replaces channel activation/deactivation/modification routines by MPH_INFO messages.
2015-09-22Relace bts_model_get_time() by get_time() at common partAndreas Eversberg6-14/+12
2015-09-22l1sap: Re-introduce more correct RACH slot countingHarald Welte1-4/+14
The original code handled both the fact where a TIME indication would be missed (and thus the frame number be higher than previous + 1), as well as the two cases for combined / non-combined CCCH. The L1SAP code removed some of those bits, which I'm re-introducing here.
2015-09-22Add TIME (MPH_INFO) IND messages to PH-/MPH-/TCH-SAP interfaceAndreas Eversberg3-38/+78
This part moves GSM time handling from osmo-bts-sysmo part to common part.
2015-09-22l1sap: additional comments explaining l1sap changes in l1_if.cHarald Welte1-0/+4
2015-09-22Add PDCH messages to PH-/MPH-/TCH-SAP interfaceAndreas Eversberg3-81/+176
This part moves PDTCH, PACCH and PTCCH message primitives from osmo-bts-sysmo to common part.
2015-09-22l1sap: Add a warning about assuming BS_AG_BLKS_RES=1Harald Welte1-0/+1
This is a regression of the code compared to the existing sysmoBTS code, where the L1 tells us whether its AGCH or PCH. However, it was not used even in the old code, so we can afford to simply put a #warning here.
2015-09-22Add PCH/AGCH message to PH-/MPH-/TCH-SAP interfaceAndreas Eversberg2-7/+20
This part moves PCH and AGCH message primitives from osmo-bts-sysmo to common part.
2015-09-22l1sap: sysmobts: remove obsolete get_lapdm_chan_by_hl2()Harald Welte1-13/+0
2015-09-22l1sap: correctly set chan_nr on PRIM_PH_RACH / INDICATIONHarald Welte1-0/+5
In case of a RACH INDICATION on CCCH, we need to set CHAN_NR to 0x88 (RSL_CHAN_RACH). In other cases, chan_nr needs to reflect the actual logical channel (TCH/SDCCH) on whcih the handover happened.
2015-09-22l1sap: RACH: Detect hand-over even on TRX0Harald Welte1-1/+1
I don't understand why we would detect handover only on TRX1-n, but not on TRX0. It is perfectly valid for a handover to occur on TRX0.
2015-09-22l1sap: fix missing include file and resulting compiler warningHarald Welte1-0/+1
2015-09-22l1sap: fix coding styleHarald Welte1-2/+1
2015-09-22l1sap: Use L1SAP_IS_CHAN_RACH instead of magic number 0x88Harald Welte1-1/+1
2015-09-22Add RACH message to PH-/MPH-/TCH-SAP interfaceAndreas Eversberg2-65/+101
This part moves RACH message primitives from osmo-bts-sysmo to common part.
2015-09-22l1sap: Split ph_data_req() into smaller partsHarald Welte1-25/+47
... in an effort to avoid introducing new/more spaghetti code Also, use offsetof() instead of pointer calculation to determine the start of GsmL1_Prim_t.u.phDataReq.msgUnitParam.u8Buffer
2015-09-22Add BCCH message to PH-/MPH-/TCH-SAP interfaceAndreas Eversberg5-13/+310
This first part moves BCCH message primitives from osmo-bts-sysmo to common part. A new file "common/l1sap.c" is introduced to implement handling of layer 1 messages from/to BTS model.
2015-09-21audio/rsl: Honor the speech mode and don't send anythingHolger Hans Peter Freyther1-0/+8
Spotted by Ciaby while debugging an audio issue. Do not send anything to port==0 to the BSC/NITB. Look at the upper bits of the speech_mode to determine if sending is allowed. 0x1 means recv_only and all other modes allow us to send. Manually verified with a single phone call with LCR bridge mode to send a CRCX early but a MDCX sendrecv later. The audio starts to flow after the MDCX message. Virtual Addr space didn't increase over 10 calls. The l1p_msg is freed by the caller. The code might not re-set speech_mode from one call to another but if it is ever != 0 it can be expected that the BSC will always set it. This is because we do not (and don't want to) allocate the lchan dynamically on every usage. Fixes: SYS#2111
2015-09-21audio/rsl: Include statistics for one callHolger Hans Peter Freyther1-3/+37
Use the new libosmo-abis API to query the session for the statistics and then send it as a TLV element to the BSC. This can be used to do post processing about the call. E.g to figure out if no audio arrived at all.
2015-09-21audio/rsl: Include the connection identifier in the DLCX indHolger Hans Peter Freyther1-0/+1
I have traces that include the connection identifier in the DLCX indication.
2015-08-21update README to bring it more in sync with reality.Harald Welte1-8/+5
2015-07-14meas: Do not send incomplete measurement reportsHolger Hans Peter Freyther1-8/+11
The RSL_IE_MEAS_RES_NR is mandatory element with a minimum of 5 octets (two for TL and three for the value). When we establish a new channel we might not have had enough time in a TDMA frame to calculate the average. The issue is not easy to reproduce. At the point we receive the measurement report we have two uplink measurements queued. As it is not easy to reproduce and only occurs when a channel is new I have decided to drop the message instead of sending made up uplink measurement reports. As of now lchan_build_rsl_ul_meas will always return 3 and the condition will never be false. Avoids: SYS#1781
2015-03-28write_queue: Check the result of osmo_wqueue_enqueue and freeHolger Hans Peter Freyther2-9/+39
The write_queue is designed to have a maximum amount of pending messages and will refuse to take new messages when it has been reached. The caller can decide if it wants to flush the queue and add the message again, create a log. But in all cases the ownership of the msgb has not been transferred. Fix the potential memory leak in the failure situation.
2015-03-25Add header file of PH-/MPH-/TCH-SAP interface to common part of osmo-btsAndreas Eversberg2-1/+72
Instead of handling primitives directly at layer 1 specific code, osmo-bts handles primitives at common code. When all primitive are moved, the l1sap interface will: - receive PH-DATA indications and forward them to layer 2. - check for RF link loss and notify BSC. - receive TCH indications and forward them via RTP. - receive PH-RTS indications and send PH-DATA requests with content according to its logical channel. - receive TCH-RTS indications and send TCH requests with content received via RTP or loopback from TCH indications. - send MPH-INFO requests to activate, deactivate and modify logical channels and handle their confirms. - receive MPH-INFO indications with measurements from tranceiver. - forward received and transmitted PH-DATA to GSMTAP.
2015-03-25sysmo-bts: Use correct boundaries of L1 msg when forwarding to L1 proxyAndreas Eversberg1-1/+1
In case of a headroom in a message, the 'head' pointer will not point to the actual data.