path: root/library
AgeCommit message (Collapse)AuthorFilesLines
2020-11-06pcu: Relax some CS/MCS expectancy checksPau Espin Pedrol1-0/+4
Previous commit implemented the CS/MCS verification, and hence now some tests fail because they had too restrictive checks. In theory the verifications could be done so restrictive by configuring the PCU accordingly at the start of the test, but we are not really interested in checking the exact CS/MCS in these tests, only checking if GPRS/EGPRS is being used. Change-Id: I79b81d473b7428b57a0ec501c5bd0d88e35c81e3
2020-11-06RLCMAC_EncDec: Provide decoded (m)cs in (E)GPRS data blocksPau Espin Pedrol3-12/+27
Let's provide this information to higher layer since CS is mostly discovered by original bitstring size which is available during decoding. Call the size2mcs converter in each function to avoid having to pass it as a parameter and have it selfcontained, meaning one can simply call decode(bitstring) from TTCN3 code and be done with it. Change-Id: I80ed44e575cc0a11510832e5bbfc07173e7b75b8
2020-11-06pcu: prepare tests for new GPRS/EGPRS multiplex supportPau Espin Pedrol1-0/+26
Once GPRS/EGPRS multiplexed support is ready, it will be controlled through pcu info_ind.flags by enabling MCS or not; the "egprs only" VTY comamnd will be dropped. The usual setup would be to support both GPRS+EGPRS, so make that the default. Most tests require to be passed the _noMCS variant to work in older versions of PCU, since those versions use the "egprs only" concept which will reject egprs_ms_class=0. Same tests enabling MCS in newer osmo-pcu shouldn't be a problem. Related: OS#4544 Change-Id: Ib95aae155b0712313a30f0c5404a8cb1f28b98f5
2020-11-06pcu: Add infra to handle multitrx and multits envsPau Espin Pedrol1-10/+10
ARFCNs are allocated sequentially, so that conversion between arfcn<->trx_nr is easily done. Some helper functions are introduced to be able to submit and expect messages on a given TRX+TS, which is required for setups with several TRX and PDCH-enabled TS different than the default. These new APIs will be used in PCU_Tests.ttcn in subsequent patches. Change-Id: I28430e6d8c77d2b7dc630d186d425a5d82587b82
2020-11-01library/PCUIF_Types: add f_PCUIF_ver_INFO_PDCHMask_set()Vadim Yanitskiy1-0/+18
Change-Id: I443bc99d35994dda14cdf9c41609d528368c401f
2020-10-31library/PCUIF_Types: f_PCUIF_ver_INFO_PDCHMask_get() returns BIT8Vadim Yanitskiy1-1/+1
Change-Id: Ib8e497b596370d0b48e76e6e86c01f0c1d9c5df5
2020-10-31library/PCUIF_Types: add '_get' prefix to f_PCUIF_ver_INFO_PDCHMask()Vadim Yanitskiy1-1/+1
Change-Id: I0ce8f3fe8cfd47c61199fbbdf0d80d19e6f105e9
2020-10-31library: fix Repeated Page Info IE in PacketPagingReqVadim Yanitskiy2-5/+9
Change-Id: I39e8e3991cc248602460b7f162a0b57c2925315f Related: OS#4838
2020-10-26pcu: Introduce test TC_multitrx_multims_allocPau Espin Pedrol1-0/+9
Related: OS#1775 Change-Id: I6b20fded6b2a1896fb7ec47c7c5dcbdcbe27f771
2020-10-26pcu: Assign different ARFCN numbers to each PCU TRXPau Espin Pedrol1-4/+4
Change-Id: I78f5c1da9e040cd69071e9ce4c99ce5655f0c477
2020-10-21PCU: add IPv6 support for SNSAlexander Couzens1-2/+36
With PCUIF 10 the remote can be IPv4 or IPv6. Add all missing parts including SNS IPv6 elements, the support to omit IPv4 elements and a PCU_Tests_SNSv6.cfg configuration to run all tests with IPv6 Change-Id: I43d64caca600fff78f3fbbb3e8179f447f235d46
2020-10-20library/RSL_Types: reorder the arguments of ts_RSL_ChanMode_SIGNVadim Yanitskiy1-2/+2
This way it's consistent with ts_RSL_ChanMode, and there is no need to pass dtx_downlink := false as the first param. Change-Id: I0b87ef87f8cfff1c96b0beead29d549d5fe0b7c6
2020-10-19BTS_Tests: fix CHANnel ACTIVation message in TC_meas_res_sign_tchXPhilipp Maier1-2/+3
The testcase TC_meas_res_sign_tchX activates a traffic channel in signalling mode and checks the RSL resulting measurement reports. The CHANnel ACTIVation message sets "SDCCH" as "Channel rate and Type" value. This is invalid, the "Channel Rate and Type" sould be set to "Half / Full rate TCH Channel Lm / Bm" (while the speech or data indicator is still set to "Signalling") Change-Id: I51887b0d0379fcc1f4483d08dfdd6869e7a9f963 Related: OS#4799
2020-10-19cosmetic: library/LAPDm_Types.ttcn: Fix trailing whitespacePau Espin Pedrol1-1/+1
Change-Id: I1fa46a10ca714f63c782004c877f7df96c591fad
2020-10-19library/L1CTL_Types: use traffic forwarding mode by defaultVadim Yanitskiy1-2/+9
Calypso PHY (unlike trxcon) needs to be explicitly configured to enable forwarding of the TCH traffic. Otherwise it's handled internally by the DSP and routed to/from the built-in speaker/mic. Change-Id: I5b9ca5683627716868e85dc33f91d8ca4824cd61 Related: OS#4799
2020-10-19BTS_Tests: indicate TCH mode to the L1 in f_est_dchan()Vadim Yanitskiy1-0/+14
Otherwise the L1 (trxcon or Calypso PHY) would 'think' that we're in signalling mode, and would not send us Bad Frame Indications. Change-Id: I0ade3bd63f604c7f0665124b182a023d50030d0b Depends: I6f403ed0506b4b1872361d9976d3186bfe514b52 Related: OS#4799
2020-10-19bts-oml: Verify BTS obj becomes Enabled durig OPSTART ACKPau Espin Pedrol1-3/+5
Change-Id: Iabe2677a458e169e646eb5a105ec9897c48eecc4
2020-10-19library/L1CTL_Types: add missing template for L1CTL_TCH_MODE_REQVadim Yanitskiy1-0/+18
Change-Id: I7641c373dca7280d208f4eac85185a9899f0cb71 Related: OS#4799
2020-10-19library/L1CTL_Types: add missing 'loop_mode' to 'L1ctlTchModeReq'Vadim Yanitskiy1-1/+13
Change-Id: Ia62cfc949603780b36f76bd6a9c16815b6152fcd
2020-10-19library/L1CTL_Types: relax some params of tr_L1CTL_TRAFFIC_IND()Vadim Yanitskiy1-2/+2
A TRAFFIC.ind with 'num_biterr' > 0 or 'fire_crc' != 0 is still a valid TCH frame - Bad Frame Indication. Let's relax those parameters for tr_L1CTL_TRAFFIC_IND(). Change-Id: Ia3357e06f986ae59dd0438f9ace3042cae8d3684 Related: OS#4799
2020-10-19library/L1CTL_Types: fix definition of L1ctlDmEstReqVadim Yanitskiy1-18/+32
In osmocom-bb 'struct l1ctl_dm_est_req' is defined as follows: struct l1ctl_dm_est_req { uint8_t tsc; uint8_t h; union { struct l1ctl_h0 h0; struct l1ctl_h1 h1; }, uint8_t tch_mode; uint8_t audio_mode; } __attribute__((packed)); so the overall size of the union is size of the biggest member: sizeof(struct l1ctl_h0) is 2 sizeof(struct l1ctl_h1) is 132 Therefore we need to fix our definitions: - introduce 'record L1ctlH0' (with padding), - introduce 'union L1ctlH0H1': - move hopping indicator to L1ctl{H0,H1}, - use it as 'TAG' in 'union L1ctlH0H1'. Change-Id: I53964f794260f0676cc2771a7acbb679befb06d5 Related: OS#4799
2020-10-19library/L1CTL_Types: turn L1ctlTchMode into an enumerated typeVadim Yanitskiy1-2/+8
Change-Id: Ib547b5984078bc6c6a66addb4622a471487c7342 Related: OS#4799
2020-10-19library/L1CTL_PortType: fix indention in alt() statementsVadim Yanitskiy1-53/+53
Change-Id: Ic13c2acbe1379558884fa7d11ba0b52ef31544f3
2020-10-18library/GSM_RR_Types: declare {enc,dec}_SacchL1Header()Vadim Yanitskiy1-0/+5
Change-Id: If2acd617d8bb543851e827ec74bb93d8da5b4966 Related: SYS#4916
2020-10-16bsc: clarify RESET logging: BSSMAP vs RANAP vs BSSMAP-LENeels Hofmeyr2-10/+10
When a RESET-ACK times out, the logs currently are indistinguishable between BSSMAP and BSSMAP-LE. Add protocol naming for each RESET / RESET-ACK logging to make sure the information does not need guesswork. Example of a test failure shown in jenkins: BSC_Tests.TC_unsol_ass_compl Stacktrace Timeout waiting for RESET-ACK after sending RESET BSC_Tests.ttcn:8295 BSC_Tests control part BSC_Tests.ttcn:4274 TC_unsol_ass_compl testcase Nothing conveys that it is (presumably) the background *BSSMAP-LE* timeout halting the test 5 seconds in, and not an A-interface failure. Change-Id: I874567e68b8279bf2460b9474241f0a9fe5ff0ff
2020-10-15Correctly handle ALIVE/TEST procedure with FR/NS-over-IP without SNSDaniel Willmann1-20/+37
If IP-SNS is not used we should wait for the RESET procedure to finish before sending NS-ALIVE. For IP-SNS start NS-ALIVE in both roles (sgsn and bss) and don't handle NS-RESET. Also unified the log messages a bit (received -> Rx). Related: SYS#5002 Change-Id: Ie01fee70297255b3d9c091bc2cec75b0f915c588
2020-10-15Revert "BSSAP_LE_Emulation: configure sending vs receiving RESET"Neels Hofmeyr1-6/+2
This should not have been merged. It is an intermediate attempt to make the BSC send the BSSMAP-LE RESET, which doesn't work because the BSC is not restarted across test runs. I dropped the patch from my branch, while it remained on gerrit accidentally; then someone else merged it without noticing that it was no longer part of my lcs branch. This reverts commit b2b3704d2a0289332798ba4aeff5b8e29d297ee5. Change-Id: If191cf0ee5c239066fa41621e812efbdcca2a2b8
2020-10-13BSSAP_LE_Emulation: on register_imsi, make sure to wait for RESET ACKNeels Hofmeyr1-0/+26
Change-Id: Id0d087a90394369ef60846baa4d02289e9d0be1e
2020-10-13BSSMAP templates for LCSNeels Hofmeyr1-0/+105
Both BSSMAP-LE and BSSMAP use the LCS Cause IE with identical definition. In order to not add further dependencies from BSSMAP_Templates.ttcn to BSSAP_LE_Types.ttcn to BSSLAP_Types.ttcn, duplicate the LCS Cause enum. Change-Id: Ifee698c128a5345f6bf0301ad4dac9e083285d56
2020-10-13BSSMAP_LE template tweaksNeels Hofmeyr1-13/+34
Change-Id: I9728690e412266001b2a02b0e14d382152d5ab4e
2020-10-13BSSLAP: add some templatesNeels Hofmeyr1-0/+76
Change-Id: I6774bb6aefed67ebbfd5da8e52bb463cd6279ed4
2020-10-13BSSMAP_LE_IE_LcsCause: fix IEI value and lenNeels Hofmeyr2-4/+4
Change-Id: I8ea9d91745dc7bcbfdb69779487a1e9fc6cc7fcd
2020-10-12BSSAP_LE_Emulation: configure sending vs receiving RESETNeels Hofmeyr1-2/+6
Expecting OsmoBSC to send a RESET to the SMLC implies that the virtual SMLC stays quiet until a RESET is received. Add flag to configure RESET behavior of BSSMAP-LE. Change-Id: I49a749b037b614f922044165a4357fe20b68860b
2020-10-12fix ts_BSSMAP_LE_ResetAckNeels Hofmeyr1-1/+1
Change-Id: Ia3b3e02f0ea71546e36a7612d77e3e55f2d3810d
2020-10-11Osmoocm_Gb_Types.ttcn: Add various additional templatesHarald Welte1-0/+127
Those can help to match if messages meet certain constraints stipulated in the BSSGP specification. Change-Id: I05c768f5a9e4f0b5c1375c2603135a349c38e849
2020-10-09PCU_Tests_{NS,SNS}: Fix our expectations regarding CellID in BVC-RESETHarald Welte1-6/+8
The BVC-RESET / BVC-RESEt-ACK follow a set of rules: * Signaling BVCI=0 never has a CellId in BVC-RESET nor BVC-RESET-ACK * Any BVC-RESET or BVC-RESET ack in BSS->SGSN direction must have CellID * Any BVC-RESET or BVC-RESET ack in SGSN->BSS direction must NOT have CellID Let's adjust our test expectations accordingly. This will break tests against "latest", but the amount of work-arounds needed in this code outweighs the benefit. Change-Id: Ic8a83f5214c372faa15178dd9b54364e7d2a60cb
2020-10-09BSSGP_Emulation: Support multiple PTP-BVC within one EntityHarald Welte2-408/+860
The existing BSSGP_Emulation is built around the assumption that every instance of BSSGP_Emulation only servers one signaling-BVC and one PTP-BVC. While this is true for osmo-pcu at this point (BTS-colocated PCU), other BSS/PCU implementations differ. In general, there can always be any number of PTP BVC (one per cell) next to the signaling BVC (one per BSS). Let's represent this in BSSGP_Emulation so we can create more comprehensive tests. Change-Id: I7e30b4c4e188518a574e082962fba457b3a97ce3
2020-10-09PCU_Tests_NS: Fix our expectations regarding CellID presence/absenceHarald Welte1-3/+2
This is required by the spec, and implemented libosmocore since Change-Id Ie87820537d6d616da4fd4bbf73eab06e28fda5e1 So let's change our test expectations. Meanwhile, introduce mp_tolerate_bvc_reset_cellid for working around the bug in 'latest'. Change-Id: Icebee25b53fef623db6ae91ca0d943e70a3c86b7
2020-10-09BSSGP_Emulation: Ensure BVC-RESET for BVCO=0 has no CellId IEHarald Welte1-1/+13
This is required by the spec, and implemented libosmocore since Change-Id Ie87820537d6d616da4fd4bbf73eab06e28fda5e1 So let's change our test expectations. Meanwhile, introduce mp_tolerate_bvc_reset_cellid for working around the bug in 'latest'. Change-Id: If6245d73ed701e631b67146ace4ba028bdb4226c
2020-10-04BSSGP_Emulation: Only add CellId to BVC-RESET[-ACK] conditionallyHarald Welte1-5/+25
We always used to include the CellID IE, but 3GPP TS 48.018 is actually quite specific about when it should be present and when not. Change-Id: Iffd023f0272c9ccb087bdd225fcfb08424a46bdf
2020-10-03NS_Emulation: pass around string idenifier for components createdHarald Welte3-10/+11
We want to see useful identification for components in the log, and hence must be giving every component a name at create() time. Change-Id: I0fe650243953e4d85161684865acd0354b2e465f
2020-10-03NS_Emulation: Delay Tx of first NS-RESET until Provider tells us it's upHarald Welte1-5/+15
Change-Id: I300cfeb120540940990a834596b0a83a539df080
2020-10-03NS_Emulation: Refactor if/elseif/... clause to altsteps with guardHarald Welte1-71/+69
This makes for much more readable code, and we can even do without activating any default altsteps. Change-Id: I4c38dd55b7c27899735f5730851d36c1410d96a8
2020-10-03NS_Emulation: Introduce status events from provider -> emulationHarald Welte3-2/+40
This allows NS_Emulation to react to changes of the underlying transport layer (e.g. Frame Relay Link/DLCI up). Change-Id: If00e9c50dc664ce62b6c0cbde99d741e8173169b
2020-10-03NS_Emulation: Add [optional] support for FrameRelay transportHarald Welte2-6/+92
This adds a NS_Provider_FR which interfaces between FrameRelay_Emulation and NS_Emulation. Include support for it only if enabled at compile time to avoid pulling in a dependency on the FrameRelay stack for every user of NS_Emulation. Change-Id: I42ca811d23e383e362d2527c8ff2c916a62a5b42
2020-10-01BSSAP_LE: comment/log tweaksNeels Hofmeyr1-2/+3
Change-Id: I39ae5abc932c8cb5eb37b8c25a84621bd9ff30ca
2020-10-01fix typo BSSMAP_LE_LCS_CAUSE_UNSPEIFIEDNeels Hofmeyr1-1/+1
Change-Id: Iff154cba13febf1a2e623b6de64fb39ffb91b302
2020-10-01fix BSSAP_LE_Types FIELDORDERNeels Hofmeyr2-10/+10
Change-Id: I6f3d5b238912923431db36a1ba7b4973ae4e2e91
2020-09-27NS_Emulation: Prepare NSConfiguration for non-IP providersHarald Welte3-14/+22
NSConfiguration currently contains parameters relevant only for IP based transport. Move IP/UDP parameters into a sub-structure in anticipation of Frame Relay support. Change-Id: I6904520d8c2f546327029777d68b1907611a8cf5
2020-09-25NS_Emulation: Fix Tns-alive/Tns-test expiration detectionHarald Welte1-4/+4
Change-Id: Icb7d076f57c166b498c1b3edd84edcf13ea9739d