summaryrefslogtreecommitdiffstats
path: root/src/target/trx_toolkit/ctrl_if.py
AgeCommit message (Collapse)AuthorFilesLines
2021-12-14treewide: remove FSF addressOliver Smith1-4/+0
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-10-03trx_toolkit: support setting artificial delay for TRXCVadim Yanitskiy1-0/+7
Change-Id: Idb1ef445bc14a6312f08a83ecacc3a938b0e1d70 Related: OS#5245
2020-07-16trx_toolkit: remove shebang from non-executable scriptsVadim Yanitskiy1-1/+0
Change-Id: I5ddc531a4e98d4d6f8672d6ef14034fce605ba3d
2020-05-17trx_toolkit/transceiver.py: add frequency hopping supportVadim Yanitskiy1-3/+8
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
2019-07-16target/*.py: shebang: use /usr/bin/env pythonAlexander Couzens1-1/+1
Use the system default python instead of a hardcoded python2 Allow to use python2 and python3. Change-Id: Iab185759b574eff1ca1b189dcbb4e1a3eec52132
2019-01-14trx_toolkit: use 'TRXC' and 'TRXD' in logging messagesVadim Yanitskiy1-2/+2
One can confuse TRX control interface with libosmoctrl's one. TRX toolkit is not using libosmoctrl, and will never do. But, in order to avoid this confusion, and potential confusion of DATA interface, let's call them 'TRXC' and 'TRXD' in logging. Change-Id: I67b1e850094cf8e279777c45c7544886be42a009
2019-01-14trx_toolkit/{ctrl,data}_if.py: add init log messageVadim Yanitskiy1-0/+4
Change-Id: I1a2caf6999ed4f33df76328e48ff5076d166d9fe
2018-12-11trx_toolkit/ctrl_if.py: read data from socket in handle_rx()Vadim Yanitskiy1-1/+5
It makes much more sense to read data from socket in handle_rx(), instead of expecting a buffer with received data from caller. Change-Id: I83479c60c54e36a2a7582714a6043090585957ae
2018-12-07trx_toolkit: use generic logging module instead of print()Vadim Yanitskiy1-1/+3
There are multiple advantages of using Python's logging module: - advanced message formatting (file name, line number, etc.), - multiple logging targets (e.g. stderr, file, socket), - logging levels (e.g. DEBUG, INFO, ERROR), - the pythonic way ;) so, let's replace multiple print() calls by logging calls, add use the following logging message format by default: [%(levelname)s] %(filename)s:%(lineno)d %(message)s Examples: [INFO] ctrl_if_bts.py:57 Starting transceiver... [DEBUG] clck_gen.py:87 IND CLOCK 26826 [DEBUG] ctrl_if_bts.py:71 Recv POWEROFF cmd [INFO] ctrl_if_bts.py:73 Stopping transceiver... [INFO] fake_trx.py:127 Shutting down... Please note that there is no way to filter messages by logging level yet. This is to be introduced soon, together with argparse. Change-Id: I7fcafabafe8323b58990997a47afdd48b6d1f357
2018-03-13Rename 'fake_trx' to 'trx_toolkit'Vadim Yanitskiy1-0/+79
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