dexter has uploaded this change for review.

View Change

bts: send IMMEDIATE ASSIGNMENT via AGCH when no IMSI is available

There may be situations where a downlink TBF has to be assigned but the
IMSI is not yet known to the PCU. In this case we should not just send
the IMMEDIATE ASSIGNMENT via the PCH anyway. Instead, the AGCH should be
used.

Related: OS#6097
Change-Id: Iae1dd5d6be9ee8813a9c0b092926e8eda63f1e8e
---
M src/bts.cpp
M src/pcu_l1_if.cpp
2 files changed, 29 insertions(+), 18 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/68/33768/1
diff --git a/src/bts.cpp b/src/bts.cpp
index 177544a..f416ea7 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1122,10 +1122,20 @@
GSM_L1_BURST_TYPE_ACCESS_0);
if (plen >= 0) {
bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_DL_TBF);
- if (the_pcu->pcu_if_version >= 0x0b)
- pcu_l1if_tx_pch_dt(bts, immediate_assignment, plen, tbf->imsi(), tbf->tlli());
- else
- pcu_l1if_tx_pch(bts, immediate_assignment, plen, tbf->imsi());
+
+ if (strlen(tbf->imsi()) < 3) {
+ /* In case the IMSI is not yet known, the IMMEDIATE ASSIGNMENT is sent on the AGCH. The reason
+ * for this is that without IMSI we can not calculate the paging group, which would be necessary
+ * for tranmission on PCH. Therefore we assume that the MS is in non-DRX mode (see also:
+ * 3gpp TS 44.060, section 5.5.1.5) and hence it is listening on all CCCH blocks, including
+ * AGCH (see also: 3gpp TS 45.002, section 6.5.3, 6.5.6, and also OS#6097). */
+ pcu_l1if_tx_agch(bts, immediate_assignment, plen);
+ } else {
+ if (the_pcu->pcu_if_version >= 0x0b)
+ pcu_l1if_tx_pch_dt(bts, immediate_assignment, plen, tbf->imsi(), tbf->tlli());
+ else
+ pcu_l1if_tx_pch(bts, immediate_assignment, plen, tbf->imsi());
+ }
}

bitvec_free(immediate_assignment);
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index f42a3d4..a256962 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -275,16 +275,6 @@
else
memset(data, '0', IMSI_DIGITS_FOR_PAGING);

- /* OS#6097: if strlen(imsi) == 0: We assume the MS is in non-DRX
- * mode (TS 44.060 5.5.1.5) and hence it is listening on all CCCH blocks
- * (TS 45.002 6.5.3, 6.5.6).
- * Hence, pgroup 000 is taken "randomly" to send it over it. This of
- * course not optimal since it can actually be sent on any CCCH blocks,
- * so we are delaying the ImmAss for no good reason. But anyway,
- * pcu_l1if_tx_pch() is deprecated and pcu_l1if_tx_pch_dt() should be
- * used instead, which doesn't suffer from this problem.
- */
-
/* block provided by upper layer comes without first byte (plen), prepend it manually: */
OSMO_ASSERT(sizeof(data) >= IMSI_DIGITS_FOR_PAGING + 1 + block->data_len);
data[IMSI_DIGITS_FOR_PAGING] = (plen << 2) | 0x01;
@@ -307,10 +297,6 @@
pch_dt.tlli = tlli;
if (imsi)
OSMO_STRLCPY_ARRAY(pch_dt.imsi, imsi);
- /* OS#6097: if strlen(pch_dt.imsi) == 0: We assume the MS is in non-DRX
- * mode (TS 44.060 5.5.1.5) and hence it is listening on all CCCH blocks
- * (TS 45.002 6.5.3, 6.5.6).
- */

pch_dt.data[0] = (plen << 2) | 0x01;
bitvec_pack(block, pch_dt.data + 1);

To view, visit change 33768. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Iae1dd5d6be9ee8813a9c0b092926e8eda63f1e8e
Gerrit-Change-Number: 33768
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier@sysmocom.de>
Gerrit-MessageType: newchange