summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile/sysinfo.c
diff options
context:
space:
mode:
authorAndreas.Eversberg <jolly@eversberg.eu>2010-09-26 10:35:46 +0000
committerAndreas.Eversberg <jolly@eversberg.eu>2010-09-26 10:35:46 +0000
commit4ed601ae4e48e8d480c3e0f5e82160434e6a32c8 (patch)
treef3ec61df2af05361485c3e8377793a145f351558 /src/host/layer23/src/mobile/sysinfo.c
parent4c11da77906c6a7ca08b739b02c7475ec07d4577 (diff)
[layer23] Adding application generated measurement report
The cell provides SYSTEM INFORMATION 5* and 6. These are used to create a list of neighbor cells to monitor. Because there is no neighbor cell monitoring supported by layer1, the list has no valid results yet. Currently the average RX level of received frames are used to generate a new report every second. The report is transmitted to layer1 and used there whenever a measurement report has to be transmitted. The timing advance and the current transmit power (as requested by network), is included with every report.
Diffstat (limited to 'src/host/layer23/src/mobile/sysinfo.c')
-rw-r--r--src/host/layer23/src/mobile/sysinfo.c40
1 files changed, 29 insertions, 11 deletions
diff --git a/src/host/layer23/src/mobile/sysinfo.c b/src/host/layer23/src/mobile/sysinfo.c
index cdfaafb1..2a125626 100644
--- a/src/host/layer23/src/mobile/sysinfo.c
+++ b/src/host/layer23/src/mobile/sysinfo.c
@@ -85,13 +85,14 @@ int gsm48_sysinfo_dump(struct gsm48_sysinfo *s, uint16_t arfcn,
for (i = 0; i < 1024; i++) {
if ((s->freq[i].mask & FREQ_TYPE_NCELL)) {
if (!k) {
- sprintf(buffer, "SI2 (neigh.): ");
+ sprintf(buffer, "SI2 (neigh.) BA=%d: ",
+ s->nb_ba_ind_si2);
j = strlen(buffer);
}
- if (j >= 75) {
+ if (j >= 70) {
buffer[j - 1] = '\0';
print(priv, "%s\n", buffer);
- sprintf(buffer, " ");
+ sprintf(buffer, " ");
j = strlen(buffer);
}
sprintf(buffer + j, "%d,", i);
@@ -107,13 +108,14 @@ int gsm48_sysinfo_dump(struct gsm48_sysinfo *s, uint16_t arfcn,
for (i = 0; i < 1024; i++) {
if ((s->freq[i].mask & FREQ_TYPE_REP)) {
if (!k) {
- sprintf(buffer, "SI5 (report): ");
+ sprintf(buffer, "SI5 (report) BA=%d: ",
+ s->nb_ba_ind_si5);
j = strlen(buffer);
}
- if (j >= 75) {
+ if (j >= 70) {
buffer[j - 1] = '\0';
print(priv, "%s\n", buffer);
- sprintf(buffer, " ");
+ sprintf(buffer, " ");
j = strlen(buffer);
}
sprintf(buffer + j, "%d,", i);
@@ -138,8 +140,8 @@ int gsm48_sysinfo_dump(struct gsm48_sysinfo *s, uint16_t arfcn,
for (j = 0; j < 64; j++) {
if ((s->freq[i+j].mask & FREQ_TYPE_SERV))
buffer[j + 5] = 'S';
- else if ((s->freq[i+j].mask & (FREQ_TYPE_NCELL
- & FREQ_TYPE_REP)))
+ else if ((s->freq[i+j].mask & FREQ_TYPE_NCELL)
+ && (s->freq[i+j].mask & FREQ_TYPE_REP))
buffer[j + 5] = 'b';
else if ((s->freq[i+j].mask & FREQ_TYPE_NCELL))
buffer[j + 5] = 'n';
@@ -156,9 +158,11 @@ int gsm48_sysinfo_dump(struct gsm48_sysinfo *s, uint16_t arfcn,
/* serving cell */
print(priv, "Serving Cell:\n");
- print(priv, " MCC = %s MNC = %s LAC = 0x%04x Cell ID = 0x%04x "
- "(%s, %s)\n", gsm_print_mcc(s->mcc), gsm_print_mnc(s->mnc),
- s->lac, s->cell_id, gsm_get_mcc(s->mcc),
+ print(priv, " BSIC = %d,%d MCC = %s MNC = %s LAC = 0x%04x Cell ID "
+ "= 0x%04x\n", s->bsic >> 3, s->bsic & 0x7,
+ gsm_print_mcc(s->mcc), gsm_print_mnc(s->mnc), s->lac,
+ s->cell_id);
+ print(priv, " Country = %s Network Name = %s\n", gsm_get_mcc(s->mcc),
gsm_get_mnc(s->mcc, s->mnc));
print(priv, " MAX_RETRANS = %d TX_INTEGER = %d re-establish = %s\n",
s->max_retrans, s->tx_integer,
@@ -174,6 +178,20 @@ int gsm48_sysinfo_dump(struct gsm48_sysinfo *s, uint16_t arfcn,
print(priv, " CBQ = %d CRO = %d TEMP_OFFSET = %d "
"PENALTY_TIME = %d\n", s->sp_cbq, s->sp_cro, s->sp_to,
s->sp_pt);
+ if (s->nb_ncc_permitted_si2) {
+ print(priv, "NCC Permitted BCCH =");
+ for (i = 0; i < 8; i++)
+ if ((s->nb_ncc_permitted_si2 & (1 << i)))
+ print(priv, " %d", i);
+ print(priv, "\n");
+ }
+ if (s->nb_ncc_permitted_si6) {
+ print(priv, "NCC Permitted SACCH/TCH =");
+ for (i = 0; i < 8; i++)
+ if ((s->nb_ncc_permitted_si6 & (1 << i)))
+ print(priv, " %d", i);
+ print(priv, "\n");
+ }
print(priv, "\n");
/* neighbor cell */