Commit Graph

898 Commits

Author SHA1 Message Date
Andreas Eversberg 2ea68e2b7b TRX: Fixes and improvements of scheduler 2015-09-22 16:41:25 +02:00
Andreas Eversberg 2c8787224f Fix: Check right result on bursts_test 2015-09-22 16:41:25 +02:00
Andreas Eversberg 74d63b7212 Add test routing to test transcoding of TCH FR / FACCH frames 2015-09-22 16:41:25 +02:00
Andreas Eversberg d0603d96e9 TRX: Completed transcoding of TCH with reordering Table 2 of TS 05.03 2015-09-22 16:41:25 +02:00
Andreas Eversberg 414faaca19 TRX: Power down tranceiver and reset scheduler, if abis link is lost
If BTS is gone, TRX is powered down, due to loss of abis link. If link is
esablished again, tranceiver and scheduler are provisioned again by BTS.
2015-09-22 16:41:25 +02:00
Andreas Eversberg 7a0d11dd68 ABIS: Introduce bts_model_abis_close to indicate ABIS link failure.
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-22 16:41:25 +02:00
Andreas Eversberg cd0581d815 TRX: On negative response of critical commands, shutdown BTS 2015-09-22 16:41:24 +02:00
Andreas Eversberg 1de7085d31 Add test code for testing GSM burst transcoding 2015-09-22 16:41:24 +02:00
Andreas Eversberg acc71ffb4b TRX: Introduce osmobts-trx, a layer 1 implementation for OpenBTS tranceivers
The code is quite complete, TCH and PDCH channels are not yet tested.
2015-09-22 16:41:24 +02:00
Andreas Eversberg c64fa4f888 Change to new structure of multirate at gsm_data_shared.h 2015-09-22 16:41:24 +02:00
Andreas Eversberg 79bc80102c Fix: Call e1inp_vty_init() before reading config file 2015-09-22 16:41:24 +02:00
Andreas Eversberg 5fa388c366 Fix: Process all TRX on GSM Time indication, not only C0 2015-09-22 16:41:24 +02:00
Andreas Eversberg 75f105bbb5 Fix: Retrieve ARFCN (from OML) for TRX other than C0 2015-09-22 16:41:24 +02:00
Ivan Kluchnikov 2340b88ede fix: make sysmobts tests only when sysmobts is enabled 2015-09-22 16:41:24 +02:00
Harald Welte 329085a8ff Merge branch '201509-l1sap' 2015-09-22 16:39:55 +02:00
Harald Welte 819b50e1a7 move MS power control handling from sysmobts to common part
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-22 16:39:05 +02:00
Andreas Eversberg f449842053 Move detection of handover frames from sysmo-bts code to common code 2015-09-22 16:39:05 +02:00
Andreas Eversberg 9cfbf27d4c Remove obsolete gsmtap handling from osmo-bts-sysmo part. 2015-09-22 16:39:05 +02:00
Andreas Eversberg a450ef73ed Add gsmtap option to command line to main.c of osmo-bts-sysmo 2015-09-22 16:39:04 +02:00
Andreas Eversberg 04b5d65575 Move gsmtap VTY commands from osmo-bts-sysmo to common part 2015-09-22 16:39:04 +02:00
Andreas Eversberg 90e543bd83 Send primitives at PH-/MPH-/TCH-SAP interface via GSMTAP 2015-09-22 16:39:04 +02:00
Andreas Eversberg 75caaf2949 sysmobts: Clean up transitions for lchan cipher state
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-22 16:39:04 +02:00
Andreas Eversberg 5027e122a8 Add MEAS (MPH_INFO) IND message to PH-/MPH-/TCH-SAP interface
This part moves processing of measurement infos from osmo-bts-sysmo to
common part.
2015-09-22 16:39:04 +02:00
Harald Welte a313bb0a47 l1sap: Port code to new ciphering handling
... introduced in 2cc37035d7
2015-09-22 16:39:04 +02:00
Harald Welte 923e324abc sysmobts/l1_if: Sacch/Sdcc/Facch are handled in l1sap/core 2015-09-22 16:39:04 +02:00
Andreas Eversberg bac087c207 Add SDCCH/SACCH/FACCH messages to PH-/MPH-/TCH-SAP interface
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-22 16:39:04 +02:00
Harald Welte 80f039973e l1sap: Avoid compiler warnings regarding uninitialized nmsg 2015-09-22 16:39:04 +02:00
Harald Welte 3a381367a6 l1sap: Use {data,empty}_req_from_l1sap() and avoid code duplication 2015-09-22 16:39:04 +02:00
Andreas Eversberg 12472df8f0 Add TCH messages to PH-/MPH-/TCH-SAP interface
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-22 16:39:04 +02:00
Harald Welte 7cc199ea95 l1sap: re-introduce a comment that was lost during l1sap merge 2015-09-22 16:39:03 +02:00
Andreas Eversberg 793e713c4b Move chan act/rel/modify from bts_model to PH-/MPH-/TCH-SAP interface
This part replaces channel activation/deactivation/modification routines
by MPH_INFO messages.
2015-09-22 16:39:03 +02:00
Andreas Eversberg faba84b9b7 Relace bts_model_get_time() by get_time() at common part 2015-09-22 16:39:03 +02:00
Harald Welte 7cf313c75b l1sap: Re-introduce more correct RACH slot counting
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-22 16:39:03 +02:00
Andreas Eversberg 21b5e6318e Add TIME (MPH_INFO) IND messages to PH-/MPH-/TCH-SAP interface
This part moves GSM time handling from osmo-bts-sysmo part to common part.
2015-09-22 16:39:03 +02:00
Harald Welte 4fe00da9f8 l1sap: additional comments explaining l1sap changes in l1_if.c 2015-09-22 16:39:03 +02:00
Andreas Eversberg 75be092b99 Add PDCH messages to PH-/MPH-/TCH-SAP interface
This part moves PDTCH, PACCH and PTCCH message primitives from
osmo-bts-sysmo to common part.
2015-09-22 16:39:03 +02:00
Harald Welte c9441b3c0b l1sap: Add a warning about assuming BS_AG_BLKS_RES=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-22 16:39:03 +02:00
Andreas Eversberg ace9a8742f Add PCH/AGCH message to PH-/MPH-/TCH-SAP interface
This part moves PCH and AGCH message primitives from osmo-bts-sysmo to
common part.
2015-09-22 16:39:03 +02:00
Harald Welte 54eceac257 l1sap: sysmobts: remove obsolete get_lapdm_chan_by_hl2() 2015-09-22 16:39:03 +02:00
Harald Welte d410eb9787 l1sap: correctly set chan_nr on PRIM_PH_RACH / INDICATION
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-22 16:39:02 +02:00
Harald Welte 9ae5b50d78 l1sap: RACH: Detect hand-over even on TRX0
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-22 16:39:02 +02:00
Harald Welte 52476fc1d4 l1sap: fix missing include file and resulting compiler warning 2015-09-22 16:39:02 +02:00
Harald Welte e969f08892 l1sap: fix coding style 2015-09-22 16:39:02 +02:00
Harald Welte 7b1b832618 l1sap: Use L1SAP_IS_CHAN_RACH instead of magic number 0x88 2015-09-22 16:39:02 +02:00
Andreas Eversberg e0146997a6 Add RACH message to PH-/MPH-/TCH-SAP interface
This part moves RACH message primitives from osmo-bts-sysmo to common
part.
2015-09-22 16:39:02 +02:00
Harald Welte a391d3691a l1sap: Split ph_data_req() into smaller parts
... 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-22 16:39:02 +02:00
Andreas Eversberg 5e90f2a809 Add BCCH message to PH-/MPH-/TCH-SAP interface
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-22 16:39:02 +02:00
Holger Hans Peter Freyther 1eaa3d72ea audio/rsl: Honor the speech mode and don't send anything
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-21 14:34:22 +02:00
Holger Hans Peter Freyther 668f8df3be audio/rsl: Include statistics for one call
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-21 14:34:07 +02:00
Holger Hans Peter Freyther cc4a08bdc7 audio/rsl: Include the connection identifier in the DLCX ind
I have traces that include the connection identifier in the
DLCX indication.
2015-09-21 10:14:11 +02:00