diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2022-02-03 02:24:52 +0600 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-02-03 03:43:11 +0600 |
commit | 3cc05e1480035835bda1de3479c77d2389b23af3 (patch) | |
tree | a85e6bc9b24b400c5e381ee4d47f935a0de86c0f | |
parent | 18605ebcbd3d6ffc086e4d87ca781edab15e81ad (diff) |
layer23/ccch_scan: handle SI Type 1 in dump_bcch()
Change-Id: I7a27d96070872a1b89809aab1a0d75608ef18d74
-rw-r--r-- | src/host/layer23/src/misc/app_ccch_scan.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/host/layer23/src/misc/app_ccch_scan.c b/src/host/layer23/src/misc/app_ccch_scan.c index 96deb98c..3091a4b0 100644 --- a/src/host/layer23/src/misc/app_ccch_scan.c +++ b/src/host/layer23/src/misc/app_ccch_scan.c @@ -165,6 +165,7 @@ static void dump_bcch(struct osmocom_ms *ms, uint8_t tc, const uint8_t *data) struct gsm48_system_information_type_header *si_hdr; si_hdr = (struct gsm48_system_information_type_header *) data; uint8_t si_type = si_hdr->system_information; + struct gsm48_system_information_type_1 *si1; LOGP(DRR, LOGL_INFO, "BCCH message (type=0x%02x): %s\n", si_type, gsm48_rr_msg_name(si_type)); @@ -174,6 +175,18 @@ static void dump_bcch(struct osmocom_ms *ms, uint8_t tc, const uint8_t *data) /* GSM 05.02 ยง6.3.1.3 Mapping of BCCH data */ switch (si_type) { + case GSM48_MT_RR_SYSINFO_1: + if (app_state.has_si1) + break; + + si1 = (struct gsm48_system_information_type_1 *) data; + gsm48_decode_freq_list(app_state.cell_arfcns, + si1->cell_channel_description, + sizeof(si1->cell_channel_description), + 0xff, 0x01); + app_state.has_si1 = 1; + LOGP(DRR, LOGL_ERROR, "SI1 received.\n"); + break; case GSM48_MT_RR_SYSINFO_3: handle_si3(ms, (struct gsm48_system_information_type_3 *) data); @@ -738,6 +751,7 @@ void layer3_app_reset(void) app_state.dch_state = DCH_NONE; app_state.dch_badcnt = 0; app_state.dch_ciph = 0; + app_state.has_si1 = 0; if (app_state.fh) fclose(app_state.fh); |