From 5a3dd6eb1acb9365ffef534be54a5e7644c1f6c9 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 1 Jun 2018 23:20:03 +0800 Subject: mobile: Make time spent in c7 configurable When no cell was found during the PLMN search the camp on any cell state will be entered. LUs are prevented in this state and it will be left after the start_any_timer has timedout. Even if camping on the home network the state will not be left before the expiry of the timer. For systematic tests this is producing a too high upper bound. Make it configurable so we can succeed with a UL more quickly. Change-Id: I25bc985cd4360d5e37d05a7b16b39eefb75ce20f --- src/host/layer23/src/mobile/vty_interface.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/host/layer23/src/mobile/vty_interface.c') diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 37093ce9..f8ecb28c 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1528,6 +1528,10 @@ static void config_write_ms(struct vty *vty, struct osmocom_ms *ms) vty_out(vty, " hplmn-search %s%s", (set->test_always) ? "everywhere" : "foreign-country", VTY_NEWLINE); + if (!hide_default || set->any_timeout != MOB_C7_DEFLT_ANY_TIMEOUT) + vty_out(vty, " c7-any-timeout %d%s", + set->any_timeout, VTY_NEWLINE); + /* no shutdown must be written to config, because shutdown is default */ vty_out(vty, " %sshutdown%s", (ms->shutdown != MS_SHUTDOWN_NONE) ? "" : "no ", VTY_NEWLINE); @@ -2170,6 +2174,19 @@ DEFUN(cfg_ms_no_neighbour, cfg_ms_no_neighbour_cmd, "no neighbour-measurement", return CMD_SUCCESS; } +DEFUN(cfg_ms_any_timeout, cfg_ms_any_timeout_cmd, "c7-any-timeout <0-255>", + "Seconds to wait in C7 before doing a PLMN search") +{ + struct osmocom_ms *ms = vty->index; + struct gsm_settings *set = &ms->settings; + + set->any_timeout = atoi(argv[0]); + + vty_restart_if_started(vty, ms); + + return CMD_SUCCESS; +} + static int config_write_dummy(struct vty *vty) { return CMD_SUCCESS; @@ -2891,6 +2908,7 @@ int ms_vty_init(void) install_element(MS_NODE, &cfg_ms_testsim_cmd); install_element(MS_NODE, &cfg_ms_neighbour_cmd); install_element(MS_NODE, &cfg_ms_no_neighbour_cmd); + install_element(MS_NODE, &cfg_ms_any_timeout_cmd); install_element(MS_NODE, &cfg_ms_support_cmd); install_node(&support_node, config_write_dummy); install_element(SUPPORT_NODE, &cfg_ms_sup_dtmf_cmd); -- cgit v1.2.3