Commit Graph

6 Commits

Author SHA1 Message Date
Oliver Smith 1741372556 treewide: remove FSF address
Remove the paragraph about writing to the Free Software Foundation's
mailing address. The FSF has changed addresses in the past, and may do
so again. In 2021 this is not useful, let's rather have a bit less
boilerplate at the start of source files.

Change-Id: I73be012c01c0108fb6951dbff91d50eb19b40c51
2021-12-14 12:52:04 +00:00
Vadim Yanitskiy 270af48118 trx_toolkit: remove shebang from non-executable scripts
Change-Id: I5ddc531a4e98d4d6f8672d6ef14034fce605ba3d
2020-07-16 13:42:56 +07:00
Vadim Yanitskiy 7ec1c1ccc8 trx_toolkit/transceiver.py: add frequency hopping support
There are two ways to implement frequency hopping:

  a) The Transceiver is configured with the hopping parameters, in
     particular HSN, MAIO, and the list of ARFCNs (channels), so the
     actual Rx/Tx frequencies are changed by the Transceiver itself
     depending on the current TDMA frame number.

  b) The L1 maintains several Transceivers (two or more), so each
     instance is assigned one dedicated RF carrier frequency, and
     hence the number of available hopping frequencies is equal to
     the number of Transceivers. In this case, it's the task of
     the L1 to commutate bursts between Transceivers (frequencies).

Variant a) is commonly known as "synthesizer frequency hopping"
whereas b) is known as "baseband frequency hopping".

For the MS side, a) is preferred, because a phone usually has only
one Transceiver (per RAT). On the other hand, b) is more suitable
for the BTS side, because it's relatively easy to implement and
there is no technical limitation on the amount of Transceivers.

FakeTRX obviously does support b) since multi-TRX feature has been
implemented, as well as a) by resolving UL/DL frequencies using a
preconfigured (by the L1) set of the hopping parameters. The later
can be enabled using the SETFH control command:

  CMD SETFH <HSN> <MAIO> <RXF1> <TXF1> [... <RXFN> <TXFN>]

where <RXFN> and <TXFN> is a pair of Rx/Tx frequencies (in kHz)
corresponding to one ARFCN the Mobile Allocation. Note that the
channel list is expected to be sorted in ascending order.

NOTE: in the current implementation, mode a) applies to the whole
Transceiver and all its timeslots, so using in for the BTS side
does not make any sense (imagine BCCH hopping together with DCCH).

Change-Id: I587e4f5da67c7b7f28e010ed46b24622c31a3fdd
2020-05-17 14:36:12 +07:00
Alexander Couzens 998ed796c3 target/*.py: shebang: use /usr/bin/env python
Use the system default python instead of a hardcoded python2
Allow to use python2 and python3.

Change-Id: Iab185759b574eff1ca1b189dcbb4e1a3eec52132
2019-07-16 22:46:12 +00:00
Vadim Yanitskiy 152a2da8d2 trx_toolkit/fake_trx.py: refactor global class hierarchy
This change is a big step towards handling of multiple transceivers
in a single process, i.e. multiple MS and multiple BTS connections.

The old class hierarchy wasn't flexible enough, because initially
fake_trx was designed as a bridge between OsmocomBB and OsmoBTS,
but not as the burst router. There were two separate, but 90%
similar implementations of the CTRL interface, two variations
of each simulation parameter - one for UL, another for DL.

The following new classes are introduced:

  - Transceiver - represents a single transceiver, that can be
    used as for the BTS side, as for the MS side. Each instance
    has its own CTRL, DATA, and (optionally) CLCK interfaces,
    among with basic state variables, such as both RX / TX freq.,
    power state (running or idle) and list of active timeslots.

  - CTRLInterfaceTRX - unified control interface handler for
    common transceiver management commands, such as POWERON,
    RXTUNE, and SETSLOT. Deprecates both CTRLInterface{BB|BTS}.

  - FakeTRX - basically, a child of Transceiver, extended with
    RF path (burst loss, RSSI, TA, ToA) simulation. Implements
    a custom CTRL command handler for CTRLInterfaceTRX.

The following classes were refactored:

  - BurstForwarder - still performs burst forwarding, but now
    it doesn't store any simulation parameters, and doesn't
    know who is BTS, and who is MS. Actually, BurstForwarder
    transforms each L12TRX message into a TRX2L1 message, and
    dispatches it between running transceivers with matching
    RX frequency and matching timeslot.

  - FakePM - still generates random RSSI values, but doesn't
    distinguish between MS and BTS anymore. As soon as a
    measurement request is received, it attempts to find
    at least one running TRX on a given frequency.

Please note that fake_trx.py still does handle only a single pair
of MS and BTS. No regressions have been observed. Both new and
refactored classes were documented.

Change-Id: Ice44e2b22566b3652ef6d43896055963b13ab185
Related: OS#3667
2018-12-18 05:47:11 +07:00
Vadim Yanitskiy 23914b9cf8 Rename 'fake_trx' to 'trx_toolkit'
This toolkit has branched out into several different tools for
TRX interface hacking, and creating a virtual Um-interface
(FakeTRX) is only one of its potential applications.

Change-Id: I56bcbc76b9c273d6b469a2bb68ddc46f3980e835
2018-03-13 02:10:02 +07:00