int gsm322_is_forbidden_la(struct osmocom_ms *ms, uint16_t mcc, uint16_t mnc,
uint16_t lac);
int gsm322_dump_sorted_plmn(struct osmocom_ms *ms);
-int gsm322_dump_cs_list(struct osmocom_ms *ms);
+int gsm322_dump_cs_list(struct osmocom_ms *ms, uint8_t flag);
int gsm322_dump_sim_plmn(struct osmocom_ms *ms);
int gsm322_dump_forbidden_plmn(struct osmocom_ms *ms);
int gsm322_dump_forbidden_la(struct osmocom_ms *ms);
#warning HACK to stay on one channel
+static int already = 0;
int l1ctl_tx_ccch_req_(struct osmocom_ms *ms, uint16_t arfcn)
{
- static int already = 0;
if (!already) {
already = 1;
cs->scan_state = weight;
if (!weight)
- gsm322_dump_cs_list(ms);
+ gsm322_dump_cs_list(ms, GSM322_CS_FLAG_SYSINFO);
/* special negative case for HPLMN search */
if (cs->state == GSM322_HPLMN_SEARCH && !weight) {
|| (s->si2bis && s->si2ter && s->nb_ext_ind_si2
&& s->nb_ext_ind_si2bis))) {
if (cs->selected) {
- LOGP(DCS, LOGL_INFO, "Selected sysinfo is updated.\n");
+ LOGP(DCS, LOGL_INFO, "Sysinfo of selected cell is "
+ "updated.\n");
memcpy(&cs->sel_si, s, sizeof(cs->sel_si));
+ gsm48_sysinfo_dump(ms, s);
}
}
|| (s->si2bis && s->nb_ext_ind_si2 && !s->nb_ext_ind_si2bis)
|| (s->si2bis && s->si2ter && s->nb_ext_ind_si2
&& s->nb_ext_ind_si2bis))) {
+ LOGP(DCS, LOGL_INFO, "Received relevant sysinfo.\n");
/* stop timer */
stop_cs_timer(cs);
}
#warning testing
-cs->list[10].rxlev_db = -50;
-cs->list[10].flags |= GSM322_CS_FLAG_POWER;
-cs->list[10].flags |= GSM322_CS_FLAG_SIGNAL;
+if (already) s = -1;
+#if 0
+cs->list[ms->test_arfcn].rxlev_db = -50;
+cs->list[ms->test_arfcn].flags |= GSM322_CS_FLAG_POWER;
+cs->list[ms->test_arfcn].flags |= GSM322_CS_FLAG_SIGNAL;
s = -1;
+#endif
+
/* if there is no more frequency, we can tune to that cell */
if (s < 0) {
int found = 0;
return 0;
}
-int gsm322_dump_cs_list(struct osmocom_ms *ms)
+int gsm322_dump_cs_list(struct osmocom_ms *ms, uint8_t flags)
{
struct gsm322_cellsel *cs = &ms->cellsel;
int i, j;
"-------+-------+-------+-------+-----------------------+"
"-------+-------\n");
for (i = 0; i <= 1023; i++) {
- if (!(cs->list[i].flags & GSM322_CS_FLAG_SIGNAL))
+ if (!(cs->list[i].flags & flags))
continue;
printf("%4d |", cs->list[i].rxlev_db);
if ((cs->list[i].flags & GSM322_CS_FLAG_SYSINFO)) {