It does not make sense to call function sched_frame_clck_cb() via
a configurable pointer in the l1sched_state. Make this function
public (thus rename) and call it directly. Remove the .clock_cb.
Having l1sched_trigger() globally available makes it possible to
call this function directly, bypassing the internal timer driven
clock module. This is needed for the integration with osmo-trx-ms.
Change-Id: Ied0eed6d514acabb94d819b2f9485868390c0f24
Related: OS#5599
In commit [1] I introduced a regression by removing the conditional
part completely. My intention was to remove the logging statement,
the return should be kept to prevent sending POWERON twice.
This regression affects the following TTCN-3 testcases:
* TC_sacch_chan_act_ho_async,
* TC_sacch_chan_act_ho_sync.
Change-Id: Iccd0bbac91a7899ef72df3dfe623b56eb66305fa
Fixes: [1] 1c75c0012b
With the introduction of the abstract PHYIF, the trxcon_fsm has lost
access to the internal state of the PHY, so now it may be sending the
PHYIF_CMDT_POWERON even if the PHY is already powered on.
Change-Id: Ib500c746430c9082a5fda342257cee7293f46ba0
Related: OS#5599
This change is aimed to simplify the integration of trxcon with
osmo-trx-ms by allowing to replace the TRXC/TRXD interface with
direct API calls.
Change-Id: I3d7c717cfc3616809d22efb1903abbf843594258
Related: OS#5599
We already have the lookup tables for Downlink, so let's also add
the respective tables for Uplink. This renders ul_amr_fn_is_cmi()
useless, so remove it together with the sched_utils.h file.
Change-Id: Ibc23b5a94bd37fba8d918ad6ee61b93a6290d8a3
This reverts commit 1a8a80aeae.
We currently get ALL SI messages wrong - the protocol disseminator is
accidentally being used as SI msg type, and
6=radio resources management - but 6 is also type=si5ter.. so all SI we
receive end up being parsed as SI5, what a coincidence!
Change-Id: I3822f74295920680a935f3031c642ba00162d09d
This reverts commit c5d9507b5d.
Using osmo_ubit2sbit() was a bad idea because this function treats
the input buffer as ubits (while we deal with usbits) and produces
absolute sbit values: either 127 or -127. This is wrong, because
all intermediate usbit values are getting converted to -127.
This bug remained unnoticed so far because trxcon is mostly used in
combination with fake_trx.py, a virtual Um interface which simulates
ideal RF conditions by default and feeds trxcon with 'perfect' bits.
Change-Id: I3a32da19c9f419d51d55b301461ce28ce11b2249
The remote L1CTL peer may send another L1CTL_PM_REQ message right
after getting L1CTL_PM_CONF from us. Handle this properly.
Change-Id: I8e5fd778467567e8ca69ed420b9815073daa7e16
The L1CTL interface logic currently gets access to the trxcon_fsm
via an associated struct trxcon_inst. No other fields are used,
so we can pass trxcon->fi directly. All communication shall be
done via the FSM anyway.
Change-Id: I5a15a676ce3917d2eddc44f1143cea8d3cd8781f
This allows TTCN3 L1CTL module (used in BTS_Tests) to transmit and
receive AMR payloads towards osmo-bts-trx.
Related: SYS#5987
Change-Id: Ia20bc96e39726a919a556c83c8be48cb31af7331
For consistency with trxcon_inst_alloc():
* first allocate an instance of trx_fsm as a child of trxcon->fi,
* then allocate a trx_instance as a child of the trx_fsm.
Change-Id: Iafc486347c6ca7a80da88be73c772397fa2deb7d
Calling l1sched_free() from trxcon_fsm_pre_term_cb() may result in
l1sched_handle_config_req() being called when trxcon->phyif is NULL.
Handling l1sched_config_req via TRXCON_EV_SET_PHY_CONFIG_REQ guards us
against NULL pointer dereference during teardown of a trxcon_fsm
instance, if it's caused by TRXCON_EV_PHYIF_FAILURE.
Change-Id: I44bbc695e8a406a7acb9c163bf223f4ea966ea12
Related: OS#5599
* trxcon_inst_alloc(): allocate trxcon_fsm as a child of the given ctx.
* trxcon_inst_alloc(): allocate trxcon_inst as a child of trxcon_fsm.
* trxcon_inst_free(): move the cleanup logic to .pre_term() callback
of the trxcon_fsm, represented by new trxcon_fsm_pre_term_cb().
* trxcon_allstate_action() properly handle TRXCON_EV_{PHYIF,L2IF}_FAILURE.
Change-Id: I5eb8ef6f62b1dc949dc60eaa558f123b3b93819c
Related: OS#5599
The underlying L1 implementation uses both chan_nr and link_id to
determine a logical channel for sending an Access Burst. If not
set (both 0x00), RSL_CHAN_RACH is assumed. Indicate it implicitly.
Change-Id: Ia40f67920bd712e572b8ea5219eb83064106bd5d
There is a time window between activation of a dedicated channel and
receipt of a L1CTL_DATA_REQ with the first RR Measurement Report, in
which trxcon may need to start transmission on Uplink SACCH.
In this case trxcon is using a dummy SACCH block with hard-coded L1
SACCH header values and hard-coded Measurement Results. This mimics
behavior of the layer1 implementation in firmware for Calypso phones.
When running the mobile application, this error can be seen:
DAPP ERROR trxcon(0)[0x55ee57bee1a0]{FBSB_SEARCH}:
Event TRXCON_EV_RX_DATA_IND not permitted
which means that the mobile is sending L1CTL_DATA_REQ *before*
establishing a dedicated channel. And this message contains an
RR Measurement Report. The idea behind this is to populate the
SACCH cache in advance and thus avoid sending dummy values.
Let's allow the L2 apps populating SACCH cache before establishing
a dedicated connection using new TRXCON_EV_UPDATE_SACCH_CACHE_REQ.
Change-Id: I0f467fc07cf844cc73465f235b36ba7d00788c9f
Related: OS#5635, OS#5599
Basically, everything below layer 2 is layer 1. Let's clarify the
domain of TRXCON_EV_L1IF_FAILURE by saying 'PHYIF' instead of 'L1IF'.
Change-Id: I9159492a04bc071b7b04d9b88d4e6fd13cc3af31
The original trxcon_fsm I wrote back in 2017 [1] was more like
a boolean flag, as there were only two states: IDLE and MANAGED.
Not surprising, given that until recently handling of multiple
L1CTL connections was not supported. Now that we have this
implemented, lifetime of a trxcon_fsm instance is limited by
lifetime of a L1CTL connection, what renders the FSM useless.
This change removes the old 'boolean' trxcon_fsm and introduces
the new one, which will allows us to abstract the L1CTL interface
from the TRXC/TRXD interfaces, as well as the scheduler. The new
FSM will also simplify development of the RLC/MAC layer for GPRS.
Change-Id: Ifaf63ead9dd180181358e771367b2a686ba159ca
Related: [1] I7ee6fc891abe5f775f5b7ebbf093181a97950dea
Related: OS#5599
Currently it may happen that the transceiver (e.g. fake_trx.py) remains
powered on when we loose a L1CTL client connection. This is going to
be fixed in change [1] re-implementing the trxcon_fsm. For now let's
ensure that the transceiver is properly powered off by sending
"CMD POWEROFF" from trx_if_close().
Change-Id: I9c5178907304b36ec3de0ee31b7f7a9ed2e31c16
Related: [1] Ifaf63ead9dd180181358e771367b2a686ba159ca
By default, powering on/off a parent transceiver (child_idx=0) will
automatically power on/off its child transceivers (if any). This
behavior is desirable for the BTS, but not for the MS Transceivers.
Additional MS Transceivers are going to be used by ttcn3-bts-test
for spawning multiple DCCH components in parallel. We don't want
situations when one component powers off transceivers of the other
DCCH components - they must be independent.
Change-Id: I0cd6bac616273bed0e246ad48edc44fff484c589