diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2018-06-01 23:20:03 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2018-06-01 23:32:23 +0800 |
commit | 5a3dd6eb1acb9365ffef534be54a5e7644c1f6c9 (patch) | |
tree | 361d247507cd12eef54614023c554ef07b0c27b0 /src/host/layer23/src | |
parent | 9533aa70025e41fef785cacdc7e51701fb40d8fb (diff) |
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
Diffstat (limited to 'src/host/layer23/src')
-rw-r--r-- | src/host/layer23/src/mobile/settings.c | 2 | ||||
-rw-r--r-- | src/host/layer23/src/mobile/subscriber.c | 2 | ||||
-rw-r--r-- | src/host/layer23/src/mobile/vty_interface.c | 18 |
3 files changed, 21 insertions, 1 deletions
diff --git a/src/host/layer23/src/mobile/settings.c b/src/host/layer23/src/mobile/settings.c index 6d50c6b3..f1c0cfcd 100644 --- a/src/host/layer23/src/mobile/settings.c +++ b/src/host/layer23/src/mobile/settings.c @@ -90,6 +90,8 @@ int gsm_settings_init(struct osmocom_ms *ms) /* software features */ set->cc_dtmf = 1; + set->any_timeout = MOB_C7_DEFLT_ANY_TIMEOUT; + INIT_LLIST_HEAD(&set->abbrev); return 0; diff --git a/src/host/layer23/src/mobile/subscriber.c b/src/host/layer23/src/mobile/subscriber.c index d332a077..6a30148b 100644 --- a/src/host/layer23/src/mobile/subscriber.c +++ b/src/host/layer23/src/mobile/subscriber.c @@ -99,7 +99,7 @@ int gsm_subscr_init(struct osmocom_ms *ms) subscr->key_seq = 7; /* any cell selection timer timeout */ - subscr->any_timeout = 30; + subscr->any_timeout = ms->settings.any_timeout; /* init lists */ INIT_LLIST_HEAD(&subscr->plmn_list); 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); |