summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2021-10-03trx_toolkit: support setting artificial delay for TRXCVadim Yanitskiy2-0/+16
Change-Id: Idb1ef445bc14a6312f08a83ecacc3a938b0e1d70 Related: OS#5245
2021-07-04trxcon/scheduler: unify and enrich decoding error messagesVadim Yanitskiy4-15/+8
Regarding the removal of burst_mask2str() from the TCH/H handler, it does not make sense to print it because the mask is already shifted and an earlier logging should already contain this info. Change-Id: I42d20e2da73c21ca366dd246244cd716c8ccb459 Related: OS#4823
2021-06-16trxcon/trx_if: send NOPE indications if there is no burstVadim Yanitskiy1-5/+4
In a typical setup operating on the real radio interface, it's the duty of the transceiver (e.g. osmo-trx) to send NOPE.ind to the L1 implementation (e.g. osmo-bts-trx). However, in a virtual environment for ttcn3-bts-test we use a fake transceiver, which due to its simplicity cannot send NOPE indications itself. The lack of queues and buffering does not allow us to implement NOPE indications in fake_trx.py, so the easiest approach is to generate them from trxcon. Send TRXD PDUs without the burst bits, and fake_trx.py will tranform them info NOPE.ind for us. Change-Id: I1c7f1315b8ef44f651efd6a22fb5b854f65c0946 Related: SYS#5313, OS#1569
2021-06-16trxcon/scheduler: introduce and use struct sched_burst_reqVadim Yanitskiy10-162/+146
Similar to what we do in osmo-bts-trx, group everything related to an Uplink burst into a structure. Pass a pointer to this structure to the logical channel handlers. This makes the code easier to read, and facilitates sending NOPE indications to the transceiver (will be introduced in the upcoming patch). Get rid of sched_trx_handle_tx_burst(), and instead just call sched_trx_a5_burst_enc() directly from sched_frame_clck_cb(). Change-Id: Id45b27180c233fdc42ae1ef0b195554dd299a056 Related: SYS#5313, OS#1569
2021-06-16trxcon/scheduler: cosmetic: move TDMA frame number calculationVadim Yanitskiy1-7/+5
Change-Id: I79efdfa543d37889dc6749eb25aab4e1639749c6
2021-06-16trx_toolkit/transceiver.py: allow NOPE.ind on inactive timeslotsVadim Yanitskiy1-1/+2
Change-Id: I27a3c8897cb82f6c264d34702c4ec64561bb9809 Related: SYS#5313, OS#1569
2021-06-09host/layer23/ccch_scan: skip CCCH frames with wrong lengthVadim Yanitskiy1-0/+7
It's not clear why do we get frames with unexpected length, but we definitely should not crash. Just log and ignore them. Change-Id: I85392becbffdb3ba7365decfd8f3769abe3c02c7 Related: OS#5171
2021-06-02trx_toolkit: add primary/shadow indicator for TRXDv2 PDUsVadim Yanitskiy1-1/+2
Change-Id: I0a3ad4f0bda56b93e0ab8bf82b6b3758831edf60 Related: SYS#4895, OS#4941, OS#4006
2021-05-03trx_toolkit: use RxMsg/TxMsg instead of TRX2L1/L12TRXVadim Yanitskiy12-121/+117
I intentionally do not use 'Downlink' and 'Uplink' terms in this project because both MS and BTS transmit and receive on the opposite directions. A burst coming from demodulator may be a Downlink or an Uplink burst depending on the context, so we definitely need more precise terms. Back then when I started to work on TRX toolkit, I decided to use the 'TRX2L1' and 'L12TRX' for receive and transmit directions respectively. Now I find them hard to read, so let's replace them with 'Rx' and 'Tx'. Change-Id: I688f24a3c09dd7e1cc00b5530ec26c8e8cfd8f7c Related: OS#4006, SYS#4895
2021-05-03trx_toolkit/data_msg.py: remove obsolete documentationVadim Yanitskiy1-170/+3
We do have TRXC/TRXD documentation in osmo-gsm-manuals repository. These big comments are out of sync with what we have in the manuals, so let's better remove them to avoid maintaining docs in several places. Change-Id: I47786cf3039f712efadc85bc4e1c3ae89e79ff25 Related: OS#4006, SYS#4895
2021-05-03trx_toolkit/data_msg.py: update entries in enum ModulationVadim Yanitskiy1-5/+7
Change-Id: Ia96b263bbb162b6c40f2cf81616118cc297299a5 Related: OS#4006, SYS#4895
2021-05-03trx_toolkit/test_codec.py: add missing sub-test with key=0x88Vadim Yanitskiy1-0/+4
Change-Id: If8e2ebedc48fecc4c54c71e40cadb0f3273602c5
2021-05-03trx_toolkit/ctrl_if_trx.py: fix undefined variable 'trx'Vadim Yanitskiy1-1/+1
Change-Id: I5c06fa5183b4d04cbc0c68327a062b320477344c
2021-05-03trx_toolkit/fake_trx.py: use raw string notation for regexVadim Yanitskiy1-1/+1
This way there is no need to escape backslashes in regex. Change-Id: I1b2b6675851275bd5285ffc287410535b22055ae
2021-04-30trx_toolkit/gsm_shared.py: s/GSM_BURST_LEN/GMSK_BURST_LEN/gVadim Yanitskiy3-7/+7
Change-Id: I7268196eb9fd822f0e7b65899e4c83c48a20ba5b
2021-04-30trx_toolkit/trxd_proto.py: fix missing field name for codec.SpareVadim Yanitskiy1-2/+2
Change-Id: I110dbcebf86cf978f2de7275a91c48b999fade32 Fixes: I482f72fd9305c51f43a0339d03904fb693d90ac9 Related: OS#4006, SYS#4895
2021-04-30trx_toolkit/trxd_proto.py: fix encoding of TRXDv0 Tx PDUsVadim Yanitskiy1-3/+4
Change-Id: I9da59f7e7c47dd1cac833839165ba05de6b18144 Related: OS#4006, SYS#4895
2021-04-29trxcon: fix legacy length expectations for TRXDv0 Rx PDUsVadim Yanitskiy1-1/+1
158 is basically: 8 + 148 + 2, where the last two are padding bytes sent by legacy TRXDv0 transceivers. We don't need them, so do not drop PDUs without these leggacy padding bytes. Change-Id: I6c0734bc4669ccde2a93940c9cf50fdbbd67cb00
2021-04-15trx_toolkit: change coding of 'PWR' and 'SCPIR' fieldsVadim Yanitskiy1-31/+6
During an internal discussion, it was decided to keep field 'PWR' as-is and move 'SCPIR' into a separate octet. This is easier to parse, less confusing, and would save us some CPU cycles. Change-Id: I482f72fd9305c51f43a0339d03904fb693d90ac9 Related: OS#4006, SYS#4895
2021-04-12trx_toolkit: define TRXDv2 PDUs using declarative codecVadim Yanitskiy1-6/+88
Change-Id: If356d285006c0b9b57879d0499b8144eca820cab Related: OS#4006, SYS#4895
2021-04-08trx_toolkit: define TRXDv0/v1 PDUs using declarative codecVadim Yanitskiy1-0/+120
Change-Id: I739ae5da22c603fb2cf1e84d3a79fb1a6e7343b6 Related: OS#4006, SYS#4895
2021-04-08trx_toolkit: make codec.py work with EOL Python 3.5Vadim Yanitskiy1-12/+12
Our build system is based on Debian 9 and EOL Python 3.5, so we have to maintain backwards compatibility (sigh). Some type hints moved to comments, some had to be commented out completely. Hopefully, we can 'un-vandalize' the code by reverting this change once there will be no requirement to support EOL stuff. Change-Id: I7211cfbb7549b6e700aa3dd44464ff762fd51185 Related: OS#4006, SYS#4895
2021-04-08trx_toolkit: check in simple declarative codecVadim Yanitskiy2-0/+1000
Change-Id: I7ff46b278c59af3720ee7f3950ea5a8b2f1313e1 Related: OS#4006, SYS#4895
2021-04-08trx_toolkit/data_msg.py: add type hints to static methodsVadim Yanitskiy1-4/+5
Change-Id: I06fd8bc7418700de40467fd63a08da2bc2abcea2
2021-03-14trx_toolkit/udp_link.py: cosmetic: setblocking() takes boolVadim Yanitskiy1-1/+1
Change-Id: I9c4fa8cb7c237f3b9e34ba236b6507da5c668aee
2021-03-01trx_toolkit/data_msg.py: use uppercase for KNOWN_VERSIONSVadim Yanitskiy4-8/+8
Change-Id: Ie4dcc8e91115c514ace243a95a9b44a17cd976b4 Related: OS#4006, SYS#4895
2021-03-01trx_toolkit/data_msg.py: use tuple for DATAMSG.known_versionsVadim Yanitskiy1-1/+1
Change-Id: I79de5fe478297e1850d9582426888411a0189d3f Related: OS#4006, SYS#4895
2021-03-01trx_toolkit/data_msg.py: decorate abstract methods as suchVadim Yanitskiy1-6/+7
Change-Id: I27fdcfdabc2b5318ab3e958d2e5446e670fe9035 Related: OS#4006, SYS#4895
2021-03-01trx_toolkit/data_msg.py: convert comments into docstringsVadim Yanitskiy1-47/+75
Change-Id: I856b54fd1baca4ae0edd2aa59be6a76372cef667 Related: OS#4006, SYS#4895
2021-03-01trx_toolkit/data_msg.py: do not instantiate abstract class DATAMSGVadim Yanitskiy1-5/+5
Change-Id: I811f67ae030ccd93e1c6a421097cec36ca01cbf9 Related: OS#4006, SYS#4895
2021-02-19tests: Replace deprecated API log_set_print_filenamePau Espin Pedrol1-1/+2
Change-Id: I9d24365d2be528477f1c190c698a81bfc7f2d2df
2020-12-25trx_toolkit/clck_gen.py: fix: Thread.isAlive() was removedVadim Yanitskiy1-1/+1
As it turns out, in Python < 3.9 class Thread defines 'is_alive' and 'isAlive = is_alive'. In Python 3.9 the later has been removed, so fake_trx.py crashes on receipt of 'POWEROFF': File "/home/wmn/wmn/osmocom/bb/src/target/trx_toolkit/clck_gen.py", line 63, in running return self._thread.isAlive() AttributeError: 'Thread' object has no attribute 'isAlive' See https://bugs.python.org/issue35283 for more details. Change-Id: Id441d76dddb659958803d507e0fb028fb06422a7
2020-12-01firmware/layer1: invalidate hard-coded Measurement resultsVadim Yanitskiy1-2/+2
This is what the L1 sends to the network before the first SACCH block is received from the higher layers. The indicated values are of course invalid because they're hard-coded. According to 3GPP TS 44.018, table 10.5.2.20.1: 0 The measurement results are valid 1 The measurement results are not valid Change-Id: I136307baef3fa2ddd1d5cec2a7f8c9e6d4602499 Related: I7da767e146aec7cef1de71e4d735d6a02b6c5642 Related: SYS#4918
2020-12-01firmware/layer1: clarify the content of Measurement resultsVadim Yanitskiy1-3/+15
Change-Id: I3203790c529f93d0084c82136645683a26faf986 Related: I26546dcbc853166e351d00260936b1b9d584ae03
2020-11-30trxcon/scheduler: invalidate hard-coded Measurement resultsVadim Yanitskiy1-2/+2
This is what trxcon sends to the network before the first SACCH block is received from the higher layers. The indicated values are of course invalid because they're hard-coded. According to 3GPP TS 44.018, table 10.5.2.20.1: 0 The measurement results are valid 1 The measurement results are not valid Change-Id: I7da767e146aec7cef1de71e4d735d6a02b6c5642 Related: SYS#4918
2020-11-30trxcon/scheduler: clarify the content of Measurement resultsVadim Yanitskiy1-2/+15
Change-Id: I26546dcbc853166e351d00260936b1b9d584ae03
2020-11-30trxcon/scheduler: clarify Measurement results paddingVadim Yanitskiy1-2/+2
Table 10.5.2.20.0 "Measurement Results Contents" in 3GPP TS 44.018 is clear on what should be used as padding - '0**', i.e. zeroes. Change-Id: I4db6845c98aded10291134f416da98fd0f4f58e3
2020-11-25mobile: generate coredump and exit upon SIGABRT receivedPau Espin Pedrol1-2/+9
Previous code relied on abort() switching sigaction to SIG_FDL + retriggering SIGABRT in case the signal handler returns, which would then generate the coredump + terminate the process. However, if a SIGABRT is received from somewhere else (kill -SIGABRT), then the process would print the talloc report and continue running, which is not desired. Change-Id: Ied0f47378a5d348b857424adb5c874c1c093b485 Fixes: OS#4865
2020-11-25trxcon: generate coredump and exit upon SIGABRT receivedPau Espin Pedrol1-3/+13
Previous code relied on abort() switching sigaction to SIG_FDL + retriggering SIGABRT in case the signal handler returns, which would then generate the coredump + terminate the process. However, if a SIGABRT is received from somewhere else (kill -SIGABRT), then the process would print the talloc report and continue running, which is not desired. Change-Id: I6d80f3f2742d397e47f4f2970c951f2cf6d58172 Fixes: OS#4865
2020-11-25trxcon: Handle signal SIGABRTPau Espin Pedrol1-0/+1
The signal handler was coded as if it was handling SIGABRT, but the signal handler was not overwritten so it is actually used. Change-Id: I5c597f3410fc97be138db6f3976df59f393819b6
2020-11-11Use osmo_fd_*_{disable,enable}Harald Welte1-6/+6
Change-Id: If4c7f946852d153bd472e5c704f8d517d26ca22e Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
2020-11-11Use osmo_fd_*_{disable,enable}Harald Welte1-14/+14
Change-Id: I65d37821873767e61a7eca029f9b30938a299683 Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
2020-11-05trxcon/l1ctl_link: use osmo_store16be() in l1ctl_link_send()Vadim Yanitskiy1-3/+3
Change-Id: I96ca1c581d028a1f3c89c83a575fd8dbc9751962
2020-10-25osmocon: More decoding of tpu_debug (on compal/rffe_dualband)Harald Welte1-1/+61
Let's give a more human-readable decode of the TPU instructions, naming the TSPACT pin names as well as the device_id/strobe. Change-Id: Iac1ac74ac3e41cff9d3d347a167b43af58cc6e59
2020-10-25tpu: Fix TPU_DEBUG: keep local cache of instructionsHarald Welte1-35/+35
TPU_DEBUG used to read from TPU RAM, which unfortunately seems rather slow, so copying it over from there broke overall timing leading to infamous "DSP Error 24" when TPU_DEBUG is enabled. Change-Id: Idde061df8c129aa51b2e4540c8ef2e4116468c9c
2020-10-24tpu: Fix msgb-write-beyond-tailroom in TPU_DEBUGHarald Welte1-1/+1
We need to make sure to allocte sufficient space to include the 32bit frame number at the start of the TPU_DEBUG msgb. Change-Id: Ifb3ce6f91131fc361b20c3b3fe5ebc7079633ac3
2020-10-23gsm48_rr: Don't swap ber with snr in "MON:" log lineHarald Welte1-1/+1
I was quite confused why I constantly see a bit error rate reported by gsm48_rr, while at the same time the actual L1CTL_DATA_IND did all state num_biterr == 0. So the log statement was broken ... Change-Id: I09bb6c606a8437b213bb444949c78a7c8a10542c
2020-10-21mobile: Use osmo_fd_setup() in script_lua.cHarald Welte1-4/+3
Change-Id: Ib6f97b9b8f3af63b81b92071b7fdb1fd55da89a5
2020-10-19trxcon/l1ctl: fix: send confirmation for TCH mode requestVadim Yanitskiy1-2/+5
Both REQ and CNF share the same message structure, so we can cheat a bit by changing the message type and sending it back. Change-Id: I6f403ed0506b4b1872361d9976d3186bfe514b52 Related: OS#4799
2020-10-18Use osmo_fd_setup() whenever applicable.Harald Welte6-46/+22
Change-Id: If9b636c295fc6b5349a54c70662f09efa616ee63