Change in ...osmo-pcu[master]: Log AGCH and PCH blocks using GSMTAP

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Fri Oct 4 15:55:52 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-pcu/+/15633 )

Change subject: Log AGCH and PCH blocks using GSMTAP
......................................................................

Log AGCH and PCH blocks using GSMTAP

Change-Id: I4d62f98801af1b0a290d3dd35bd213ccf3151035
---
M src/bts.h
M src/pcu_l1_if.cpp
M src/pcu_vty.c
3 files changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/bts.h b/src/bts.h
index 4ffe433..c2cc316 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -58,6 +58,8 @@
 	PCU_GSMTAP_C_DL_DATA_GPRS	= 3,	/* downlink GPRS data blocks */
 	PCU_GSMTAP_C_DL_DATA_EGPRS	= 4,	/* downlink EGPRS data blocks */
 	PCU_GSMTAP_C_DL_PTCCH		= 5,	/* downlink PTCCH blocks */
+	PCU_GSMTAP_C_DL_AGCH		= 6,	/* downlink AGCH blocks */
+	PCU_GSMTAP_C_DL_PCH		= 7,	/* downlink PCH blocks */
 
 	PCU_GSMTAP_C_UL_UNKNOWN		= 15,	/* unknown or undecodable uplink blocks */
 	PCU_GSMTAP_C_UL_DUMMY		= 16,	/* uplink dummy blocks */
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 8901ce6..ac04663 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -207,16 +207,22 @@
 
 void pcu_l1if_tx_agch(bitvec * block, int plen)
 {
+	struct gprs_rlcmac_bts *bts = bts_main_data();
 	uint8_t data[23]; /* prefix PLEN */
 	
 	/* FIXME: why does OpenBTS has no PLEN and no fill in message? */
 	bitvec_pack(block, data + 1);
 	data[0] = (plen << 2) | 0x01;
+
+	if (bts->gsmtap_categ_mask & (1 << PCU_GSMTAP_C_DL_AGCH))
+		gsmtap_send(bts->gsmtap, 0, 0, GSMTAP_CHANNEL_AGCH, 0, 0, 0, 0, data, 23);
+
 	pcu_tx_data_req(0, 0, PCU_IF_SAPI_AGCH, 0, 0, 0, data, 23);
 }
 
 void pcu_l1if_tx_pch(bitvec * block, int plen, const char *imsi)
 {
+	struct gprs_rlcmac_bts *bts = bts_main_data();
 	uint8_t data[3+1+23]; /* prefix PLEN */
 
 	/* paging group */
@@ -230,6 +236,10 @@
 	OSMO_ASSERT(block->data_len <= sizeof(data) - (3+1));
 	bitvec_pack(block, data + 3+1);
 	data[3] = (plen << 2) | 0x01;
+
+	if (bts->gsmtap_categ_mask & (1 << PCU_GSMTAP_C_DL_PCH))
+		gsmtap_send(bts->gsmtap, 0, 0, GSMTAP_CHANNEL_PCH, 0, 0, 0, 0, data + 4, 23);
+
 	pcu_tx_data_req(0, 0, PCU_IF_SAPI_PCH, 0, 0, 0, data, 23+3);
 }
 
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index a131dd2..23a42e7 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -28,6 +28,8 @@
 	{ PCU_GSMTAP_C_DL_DATA_GPRS,	"dl-data-gprs" },
 	{ PCU_GSMTAP_C_DL_DATA_EGPRS,	"dl-data-egprs" },
 	{ PCU_GSMTAP_C_DL_PTCCH,	"dl-ptcch" },
+	{ PCU_GSMTAP_C_DL_AGCH,		"dl-agch" },
+	{ PCU_GSMTAP_C_DL_PCH,		"dl-pch" },
 
 	{ PCU_GSMTAP_C_UL_UNKNOWN,	"ul-unknown" },
 	{ PCU_GSMTAP_C_UL_DUMMY,	"ul-dummy" },
@@ -46,6 +48,8 @@
 	{ PCU_GSMTAP_C_DL_DATA_GPRS,	"Downlink Data Blocks (GPRS)" },
 	{ PCU_GSMTAP_C_DL_DATA_EGPRS,	"Downlink Data Blocks (EGPRS)" },
 	{ PCU_GSMTAP_C_DL_PTCCH,	"Downlink PTCCH Blocks" },
+	{ PCU_GSMTAP_C_DL_AGCH,		"Downlink AGCH Blocks" },
+	{ PCU_GSMTAP_C_DL_PCH,		"Downlink PCH Blocks" },
 
 	{ PCU_GSMTAP_C_UL_UNKNOWN,	"Unknown / Unparseable / Erroneous Downlink Blocks" },
 	{ PCU_GSMTAP_C_UL_DUMMY,	"Uplink Dummy Blocks" },

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/15633
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I4d62f98801af1b0a290d3dd35bd213ccf3151035
Gerrit-Change-Number: 15633
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191004/77ab4263/attachment.htm>


More information about the gerrit-log mailing list