Review at  https://gerrit.osmocom.org/7196

[sysmobts] HACK: Log L1C/NOTICE message for every RACH received

Change-Id: I68d7584c198540c01b83ea8d12e7a61792b01ee7
---
M src/osmo-bts-sysmo/femtobts.c
M src/osmo-bts-sysmo/femtobts.h
M src/osmo-bts-sysmo/l1_if.c
3 files changed, 21 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/96/7196/1

diff --git a/src/osmo-bts-sysmo/femtobts.c b/src/osmo-bts-sysmo/femtobts.c
index 480fe06..f8e71de 100644
--- a/src/osmo-bts-sysmo/femtobts.c
+++ b/src/osmo-bts-sysmo/femtobts.c
@@ -368,3 +368,15 @@
        [PDCH_MCS_8]    = 142,
        [PDCH_MCS_9]    = 154
 };
+
+const struct value_string femtobts_bursttype_names[] = {
+       { GsmL1_BurstType_Sync, "Sync" },
+       { GsmL1_BurstType_Normal, "Normal" },
+       { GsmL1_BurstType_Dummy, "Dummy" },
+       { GsmL1_BurstType_Normal8Psk, "Normal 8PSK" },
+       { GsmL1_BurstType_Access_0, "Access (TSC 0)" },
+       { GsmL1_BurstType_Access_1, "Access (TSC 1)" },
+       { GsmL1_BurstType_Access_2, "Access (TSC 2)" },
+       { GsmL1_BurstType_Freq, "Frequency Correction" },
+       { 0, NULL }
+};
diff --git a/src/osmo-bts-sysmo/femtobts.h b/src/osmo-bts-sysmo/femtobts.h
index 9163ebb..bf1bcc1 100644
--- a/src/osmo-bts-sysmo/femtobts.h
+++ b/src/osmo-bts-sysmo/femtobts.h
@@ -107,4 +107,6 @@
 
 const uint8_t pdch_msu_size[_NUM_PDCH_CS];
 
+const struct value_string femtobts_bursttype_names[GsmL1_BurstType_NUM+1];
+
 #endif /* FEMTOBTS_H */
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 60eacab..b5bb3f8 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -990,6 +990,13 @@
        int rc;
        struct ph_rach_ind_param rach_ind_param;
 
+       LOGPFN(DL1C, LOGL_NOTICE, ra_ind->u32Fn, "RACH: Type %s, %f dBm, %d 
qbits, LQ=%f, BER=%f\n",
+               get_value_string(femtobts_bursttype_names, ra_ind->burstType),
+               ra_ind->measParam.fRssi,
+               ra_ind->measParam.i16BurstTiming,
+               ra_ind->measParam.fLinkQuality,
+               ra_ind->measParam.fBer);
+
        /* FIXME: this should be deprecated/obsoleted as it bypasses rach.busy 
counting */
        if (ra_ind->measParam.fLinkQuality < btsb->min_qual_rach) {
                msgb_free(l1p_msg);

-- 
To view, visit https://gerrit.osmocom.org/7196
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68d7584c198540c01b83ea8d12e7a61792b01ee7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>

Reply via email to