jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmocom-bb/+/34615?usp=email )
Change subject: ASCI: Add VTY command to display group call neighbor cells
......................................................................
ASCI: Add VTY command to display group call neighbor cells
Related: OS#5782
Change-Id: Ie84221507bdf247c1563b829d6cf0adb53ce161f
---
M src/host/layer23/include/osmocom/bb/common/sysinfo.h
M src/host/layer23/src/common/sysinfo.c
M src/host/layer23/src/mobile/vty_interface.c
3 files changed, 68 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/15/34615/1
diff --git a/src/host/layer23/include/osmocom/bb/common/sysinfo.h
b/src/host/layer23/include/osmocom/bb/common/sysinfo.h
index 594d336..a6e2e9f 100644
--- a/src/host/layer23/include/osmocom/bb/common/sysinfo.h
+++ b/src/host/layer23/include/osmocom/bb/common/sysinfo.h
@@ -185,6 +185,7 @@
int gsm48_sysinfo_dump(const struct gsm48_sysinfo *s, uint16_t arfcn,
void (*print)(void *, const char *, ...),
void *priv, uint8_t *freq_map);
+int gsm48_si10_dump(const struct gsm48_sysinfo *s, void (*print)(void *, const char *,
...), void *priv);
int gsm48_decode_lai(struct gsm48_loc_area_id *lai, uint16_t *mcc,
uint16_t *mnc, uint16_t *lac);
int gsm48_decode_chan_h0(const struct gsm48_chan_desc *cd,
diff --git a/src/host/layer23/src/common/sysinfo.c
b/src/host/layer23/src/common/sysinfo.c
index d2ed792..dfa3f45 100644
--- a/src/host/layer23/src/common/sysinfo.c
+++ b/src/host/layer23/src/common/sysinfo.c
@@ -311,6 +311,48 @@
return 0;
}
+int gsm48_si10_dump(const struct gsm48_sysinfo *s, void (*print)(void *, const char *,
...), void *priv)
+{
+ const struct si10_cell_info *c;
+ int i;
+
+ if (!s || !s->si10) {
+ print(priv, "No group channel neighbor information available.\n");
+ return 0;
+ }
+
+ if (!s->si10_cells) {
+ print(priv, "No group channel neighbors exist.\n");
+ return 0;
+ }
+
+ /* Group call neighbor cells. */
+ print(priv, "Group channel neighbor cells (current or last call):\n");
+ for (i = 0; i < s->si10_cells; i++) {
+ c = &s->si10_cell[i];
+ print(priv, " index = %d", c->index);
+ if (c->arfcn >= 0)
+ print(priv, " ARFCN = %d", c->arfcn);
+ else
+ print(priv, " ARFCN = not in SI5*");
+ print(priv, " BSIC = %d,%d", c->bsic >> 3, c->bsic & 0x7);
+ if (c->barred) {
+ print(priv, " barred");
+ continue;
+ }
+ if (c->la_different)
+ print(priv, " CRH = %d", c->cell_resel_hyst_db);
+ print(priv, " MS_TXPWR_MAX_CCCH = %d\n", c->ms_txpwr_max_cch);
+ print(priv, " RXLEV_MIN = %d", c->rxlev_acc_min_db);
+ print(priv, " CRO = %d", c->cell_resel_offset);
+ print(priv, " TEMP_OFFSET = %d", c->temp_offset);
+ print(priv, " PENALTY_TIME = %d", c->penalty_time);
+ }
+ print(priv, "\n");
+
+ return 0;
+}
+
/*
* decoding
*/
diff --git a/src/host/layer23/src/mobile/vty_interface.c
b/src/host/layer23/src/mobile/vty_interface.c
index a4b97bc..0cb6fc3 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -389,6 +389,20 @@
return CMD_SUCCESS;
}
+DEFUN(show_asci_neighbors, show_asci_neighbors_cmd, "show asci MS_NAME
neighbors",
+ ASCI_STR "Display neigbor cells of ongoing or last ASCI call")
+{
+ struct osmocom_ms *ms;
+
+ ms = l23_vty_get_ms(argv[0], vty);
+ if (!ms)
+ return CMD_WARNING;
+
+ gsm48_si10_dump(ms->cellsel.si, l23_vty_printf, vty);
+
+ return CMD_SUCCESS;
+}
+
DEFUN(monitor_network, monitor_network_cmd, "monitor network MS_NAME",
"Monitor...\nMonitor network information\nName of MS (see \"show
ms\")")
{
@@ -2484,6 +2498,7 @@
install_element_ve(&show_forb_la_cmd);
install_element_ve(&show_forb_plmn_cmd);
install_element_ve(&show_asci_calls_cmd);
+ install_element_ve(&show_asci_neighbors_cmd);
install_element_ve(&monitor_network_cmd);
install_element_ve(&no_monitor_network_cmd);
install_element(ENABLE_NODE, &off_cmd);
--
To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/34615?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ie84221507bdf247c1563b829d6cf0adb53ce161f
Gerrit-Change-Number: 34615
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-MessageType: newchange