dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/34239 )
Change subject: osmobts_sock: cosmetic, put a dot between "v" and version number
......................................................................
Patch Set 3:
(2 comments)
Patchset:
PS3:
See now:
Ibe49064d04dff0617357e3e0b00fea961b657784
and
Ic7f6246265fa31be189e4aea36dfaa89bd0eeddd
File src/osmobts_sock.c:
https://gerrit.osmocom.org/c/osmo-pcu/+/34239/comment/235a175e_bede6cee
PS2, Line 220: to OsmoBTS
> Would be more useful to change this part to `to OsmoBTS/OsmoBSC` or even remove it completely, since […]
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34239
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I7c70c4d4440fa9885e1efb80e6f2e4e821ac916f
Gerrit-Change-Number: 34239
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 01 Sep 2023 09:57:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/34275 )
Change subject: pcuif_sock: improve log output (OsmoBTS/OsmoBSC)
......................................................................
pcuif_sock: improve log output (OsmoBTS/OsmoBSC)
When printing the PCUIF protocol version, we only mention OsmoBTS, but
since OsmoPCU can also be used in co-location with OsmoBSC, we should
also mention OsmoBSC here. Let's write "OsmoBTS/OsmoBSC"
Related: OS#5927
Change-Id: Ibe49064d04dff0617357e3e0b00fea961b657784
---
M src/pcuif_sock.c
1 file changed, 15 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/75/34275/1
diff --git a/src/pcuif_sock.c b/src/pcuif_sock.c
index c77605f..f8c0ecc 100644
--- a/src/pcuif_sock.c
+++ b/src/pcuif_sock.c
@@ -217,7 +217,7 @@
int pcu_l1if_open(void)
{
int rc;
- LOGP(DL1IF, LOGL_INFO, "Opening OsmoPCU L1 interface v%u to OsmoBTS\n", PCU_IF_VERSION);
+ LOGP(DL1IF, LOGL_INFO, "Opening OsmoPCU L1 interface v%u to OsmoBTS/OsmoBSC\n", PCU_IF_VERSION);
memset(&pcu_sock_state, 0x00, sizeof(pcu_sock_state));
INIT_LLIST_HEAD(&pcu_sock_state.upqueue);
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34275
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ibe49064d04dff0617357e3e0b00fea961b657784
Gerrit-Change-Number: 34275
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/34239 )
Change subject: osmobts_sock: cosmetic, put a dot between "v" and version number
......................................................................
Abandoned
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34239
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I7c70c4d4440fa9885e1efb80e6f2e4e821ac916f
Gerrit-Change-Number: 34239
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: abandon
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/34240 )
Change subject: pcu_sock: print SAPI and msg_id when sending confirmation
......................................................................
pcu_sock: print SAPI and msg_id when sending confirmation
At the moment we do not print the SAPI, nor the msg_id when we send a
confirmation back to the PCU
Change-Id: Ibd5b4225e597b69eaabaeee437fb637943a55602
elated: OS#5927
---
M src/common/pcu_sock.c
1 file changed, 15 insertions(+), 1 deletion(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index e100464..f99c7d2 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -628,7 +628,8 @@
/* FIXME: allow multiple BTS */
bts = llist_entry(g_bts_sm->bts_list.next, struct gsm_bts, list);
- LOGP(DPCU, LOGL_DEBUG, "Sending PCH confirm\n");
+ LOGP(DPCU, LOGL_DEBUG, "Sending DATA.cnf: sapi=%s msg_id=%08x\n",
+ sapi_string[sapi], msg_id);
msg = pcu_msgb_alloc(PCU_IF_MSG_DATA_CNF_2, bts->nr);
if (!msg)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/34240
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ibd5b4225e597b69eaabaeee437fb637943a55602
Gerrit-Change-Number: 34240
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/34058 )
Change subject: pcu_l1_if: add support for PCU_IF_SAPI_AGCH_2 for PCUIF v.11
......................................................................
pcu_l1_if: add support for PCU_IF_SAPI_AGCH_2 for PCUIF v.11
When a downlink IMMEDIATE ASSIGNMENT message is sent through the PCH,
an IMSI is always required in order to be able to calculate the paging
group. However, when the downlink IMMEDIATE ASSIGNMENT has to be sent
before the MS has completed the GMM ATTACH REQUEST, the IMSI is still
unknown. In this case we may assume that the MS is still in non-DRX
mode, which means it listens on all CCCH blocks (PCH and AGCH).
This means we may send the IMMEDIATE ASSIGNMENT through the AGCH in this
situation. This will also have the advantage that the scheduling through
the AGCH will have less latency than the paging queue.
Unfortunately the SAPI PCU_IF_SAPI_AGCH only supports sending whole MAC
blocks, so it won't be possible to attach a TLLI that can be used for
confirmation. To fix this, let's add a new SAPI_PCUI_IF_AGCH_2, that
works similar as SAPI PCU_IF_SAPI_PCH_2 and use it to send the
IMMEDIATE ASSIGNMENT through the AGCH.
CAUTION: This patch breaks compatibility with current master osmo-bts
and osmo-bsc (see "Depends")
Related: OS#5927
Depends: osmo-bts.git I29858fa20ad8bd0aefe81a5c40ad77a2559a8c10
Change-Id: I9effdcec1da91a6e2e7a7c41f95d3300ad1bb292
---
M include/osmocom/pcu/pcuif_proto.h
M src/bts.cpp
M src/pcu_l1_if.cpp
M src/pcu_l1_if.h
4 files changed, 98 insertions(+), 6 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/include/osmocom/pcu/pcuif_proto.h b/include/osmocom/pcu/pcuif_proto.h
index aa22447..cd2a298 100644
--- a/include/osmocom/pcu/pcuif_proto.h
+++ b/include/osmocom/pcu/pcuif_proto.h
@@ -42,6 +42,7 @@
#define PCU_IF_SAPI_PRACH 0x06 /* packet random access channel */
#define PCU_IF_SAPI_PTCCH 0x07 /* packet TA control channel */
#define PCU_IF_SAPI_PCH_2 0x08 /* assignment on PCH (confirmed using message id) */
+#define PCU_IF_SAPI_AGCH_2 0x09 /* assignment on AGCH (confirmed using message id) */
/* flags */
#define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */
@@ -276,6 +277,18 @@
bool confirm;
} __attribute__((packed));
+/* Struct to send a (confirmed) IMMEDIATE ASSIGNMENT message via AGCH. The struct is sent as a data request
+ * (data_req) under SAPI PCU_IF_SAPI_AGCH_2. */
+struct gsm_pcu_if_agch {
+ /* message id as reference for confirmation */
+ uint32_t msg_id;
+ /* GSM mac-block (with immediate assignment message) */
+ uint8_t data[GSM_MACBLOCK_LEN];
+ /* Set to true in case the receiving end must send a confirmation
+ * when the MAC block (data) has been sent. */
+ bool confirm;
+} __attribute__((packed));
+
struct gsm_pcu_if {
/* context based information */
uint8_t msg_type; /* message type */
diff --git a/src/bts.cpp b/src/bts.cpp
index 5c483d5..0950f7a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1033,7 +1033,10 @@
rip->burst_type);
bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_UL_TBF);
if (plen >= 0) {
- pcu_l1if_tx_agch(bts, bv, plen);
+ if (the_pcu->pcu_if_version >= 0x0b)
+ pcu_l1if_tx_agch2(bts, bv, plen, false, GSM_RESERVED_TMSI);
+ else
+ pcu_l1if_tx_agch(bts, bv, plen);
rc = 0;
} else {
rc = plen;
@@ -1047,8 +1050,12 @@
bv, rip->ra, rip->rfn, rip->burst_type,
(uint8_t)osmo_tdef_get(bts->T_defs_bts, 3142, OSMO_TDEF_S, -1));
bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_REJ);
- if (plen >= 0)
- pcu_l1if_tx_agch(bts, bv, plen);
+ if (plen >= 0) {
+ if (the_pcu->pcu_if_version >= 0x0b)
+ pcu_l1if_tx_agch2(bts, bv, plen, false, GSM_RESERVED_TMSI);
+ else
+ pcu_l1if_tx_agch(bts, bv, plen);
+ }
bitvec_free(bv);
/* rc was already properly set before goto */
return rc;
@@ -1128,10 +1135,26 @@
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_pch2(bts, immediate_assignment, plen, true, tbf->imsi(), tbf->tlli());
- else
+
+ if (the_pcu->pcu_if_version >= 0x0b) {
+ if (ms_imsi_is_valid(tbf->ms())) {
+ pcu_l1if_tx_pch2(bts, immediate_assignment, plen, true, tbf->imsi(), tbf->tlli());
+ } else {
+ /* During GMM ATTACH REQUEST, the IMSI is not yet known to the PCU or SGSN. (It is
+ * requested after the GMM ATTACH REQUEST with the GMM IDENTITY REQUEST.) When the PCU
+ * has to assign a DL TBF but the IMSI is not known, then the IMMEDIATE ASSIGNMENT is
+ * sent on the AGCH. The reason for this is that without an IMSI we can not calculate
+ + the paging group, which would be necessary for transmission on PCH. Since the IMSI
+ * is usually only unknown during the GMM ATTACH REQUEST, we may assume that the MS
+ * is in non-DRX mode and hence it is listening on all CCCH blocks, including AGCH.
+ *
+ * See also: 3gpp TS 44.060, section 5.5.1.5
+ * 3gpp TS 45.002, section 6.5.3, 6.5.6 */
+ pcu_l1if_tx_agch2(bts, immediate_assignment, plen, true, 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 f92f08e..4af6953 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -251,6 +251,8 @@
void pcu_l1if_tx_agch(struct gprs_rlcmac_bts *bts, bitvec *block, int plen)
{
+ /* TODO: When PCUIF v.11 has become mainline, we will use pcu_l1if_tx_agch2() exclusively.
+ * This will make this function obsolote, so we can remove it. */
uint8_t data[GSM_MACBLOCK_LEN]; /* prefix PLEN */
/* FIXME: why does OpenBTS has no PLEN and no fill in message? */
@@ -263,10 +265,31 @@
pcu_tx_data_req(bts, 0, 0, PCU_IF_SAPI_AGCH, 0, 0, 0, data, sizeof(data));
}
+/* Send a MAC block via the access grant channel. This will (obviously) only work for MAC blocks that contain
+ * an IMMEDIATE ASSIGNMENT. In case the confirm flag is set, the receiving end is required to send a confirmation
+ * back when the IMMEDIATE ASSIGNMENT has been sent. */
+void pcu_l1if_tx_agch2(struct gprs_rlcmac_bts *bts, bitvec *block, int plen, bool confirm, uint32_t msg_id)
+{
+ struct gsm_pcu_if_agch agch = { 0 };
+
+ agch.confirm = confirm;
+ agch.msg_id = msg_id;
+ agch.data[0] = (plen << 2) | 0x01;
+ bitvec_pack(block, agch.data + 1);
+
+ if (the_pcu->gsmtap_categ_mask & (1 << PCU_GSMTAP_C_DL_AGCH))
+ gsmtap_send(the_pcu->gsmtap, 0, 0, GSMTAP_CHANNEL_AGCH, 0, 0, 0, 0, agch.data, GSM_MACBLOCK_LEN);
+
+ pcu_tx_data_req(bts, 0, 0, PCU_IF_SAPI_AGCH_2, 0, 0, 0, (uint8_t*)&agch, sizeof(agch));
+}
+
#define IMSI_DIGITS_FOR_PAGING 3
/* Send a MAC block via the paging channel. (See also comment below) */
void pcu_l1if_tx_pch(struct gprs_rlcmac_bts *bts, bitvec *block, int plen, const char *imsi)
{
+ /* TODO: When PCUIF v.11 has become mainline, we will use pcu_l1if_tx_pch2() exclusively.
+ * This will make this function obsolote, so we can remove it. */
+
uint8_t data[IMSI_DIGITS_FOR_PAGING + GSM_MACBLOCK_LEN];
/* prepend last three IMSI digits (if present) from which BTS/BSC will calculate the paging group */
@@ -561,6 +584,7 @@
switch (data_cnf->sapi) {
case PCU_IF_SAPI_PCH_2:
+ case PCU_IF_SAPI_AGCH_2:
bts_rcv_imm_ass_cnf(bts, NULL, data_cnf->msg_id);
break;
default:
diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h
index 138636d..b6da337 100644
--- a/src/pcu_l1_if.h
+++ b/src/pcu_l1_if.h
@@ -147,6 +147,7 @@
uint32_t fn, uint8_t block_nr,
uint8_t *data, size_t data_len);
void pcu_l1if_tx_agch(struct gprs_rlcmac_bts *bts, bitvec *block, int len);
+void pcu_l1if_tx_agch2(struct gprs_rlcmac_bts *bts, bitvec *block, int plen, bool confirm, uint32_t msg_id);
#endif
#ifdef __cplusplus
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34058
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I9effdcec1da91a6e2e7a7c41f95d3300ad1bb292
Gerrit-Change-Number: 34058
Gerrit-PatchSet: 5
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34270 )
Change subject: NAS_Templates: add template for NAS key set identifier
......................................................................
Patch Set 1:
(1 comment)
File library/NAS_Templates.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34270/comment/df5c2d07_4cd4…
PS1, Line 330: const BIT3 c_NAS_KEY_SET_ID_NO_KEY := '111'B;
> enum
I am not sure, but I think c_NAS_KEY_SET_ID_NO_KEY is just a reserved value to say that NO_KEY is used. The other values may be just 3 bit integers.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34270
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2df0c9d1bf4bf0073b5f7b77708b8de59f96a639
Gerrit-Change-Number: 34270
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 01 Sep 2023 08:43:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34269 )
Change subject: NAS_Templates: add template for EPS update type
......................................................................
Patch Set 1:
(1 comment)
File library/NAS_Templates.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34269/comment/8f91c35b_1636…
PS1, Line 320: const BIT3 c_EPS_UPD_TYPE_TA_UPD := '000'B;
> this should be an enum afaiu.
One could define the enum like so:
type enumerated typeOfUpdate_t {
c_EPS_UPD_TYPE_TA_UPD ('000'B),
c_EPS_UPD_TYPE_COMB_TA_LA_UPD ('001'B),
c_EPS_UPD_TYPE_COMB_TA_LA_UPD_IMSI_ATTACH ('010'B),
c_EPS_UPD_TYPE_TA_UPD_PERIODIC ('011'B)
};
But I can get this to work. When I use the type, then the compiler complains that the type is not a bitstring (!?), when I am stick using BIT3 it says there is no local or imported definition of..
Also in this file there are also other constants that are defined in the same way I did, so I am not sure if using two different ways to define/organize constants is a good idea anyway.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34269
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6ffac88cc1d3967dc8000e17a65cdba79a013cf7
Gerrit-Change-Number: 34269
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 01 Sep 2023 08:41:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment