diff options
author | Andreas.Eversberg <jolly@eversberg.eu> | 2010-11-13 18:45:09 +0000 |
---|---|---|
committer | Andreas.Eversberg <jolly@eversberg.eu> | 2010-11-13 18:45:09 +0000 |
commit | 6f2b172780195e0af780ecd0a4fff0fac9b8438b (patch) | |
tree | 44423a4d31fa2767e26c988a258a960e7e51e5a1 /src/host/layer23/src/mobile/settings.c | |
parent | 4df881932c30c2d3deb88c53a55a21fd342068d8 (diff) |
[layer23] Added support for multiple MS instances
To create another instance: 'ms <name> create'
To remove an instance: 'no ms <name>'
If no instance exists, 'ms 1' is created automatically on startup.
Each instance can be enabled / disabled by using 'shutdown' or
'no shutdown'. Multiple instances may share the same layer2 socket (same
phone hardware), but in this case only one instance can be enabled at the
same time. This makes it much easier to select different settings without
modifying them.
A 'shutdown' initiates the IMSI detach procedure before shutdown is
completed. A 'shutdown force' will immidiately shutdown.
There is no need to restart the software anymore, if fundamental settings
are changed. In this case, a 'shutdown' followed by a 'no shutdown' will
do the job.
If you already have an old osmocom.cfg, you need to "no shutdown" it.
Everything else behaves as before.
Diffstat (limited to 'src/host/layer23/src/mobile/settings.c')
-rw-r--r-- | src/host/layer23/src/mobile/settings.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/host/layer23/src/mobile/settings.c b/src/host/layer23/src/mobile/settings.c index 6294ec65..89672a25 100644 --- a/src/host/layer23/src/mobile/settings.c +++ b/src/host/layer23/src/mobile/settings.c @@ -28,16 +28,26 @@ #include <osmocom/bb/common/osmocom_data.h> #include <osmocom/bb/common/networks.h> +static char *layer2_socket_path = "/tmp/osmocom_l2"; +static char *sap_socket_path = "/tmp/osmocom_sap"; + int gsm_settings_init(struct osmocom_ms *ms) { struct gsm_settings *set = &ms->settings; struct gsm_support *sup = &ms->support; + strcpy(set->layer2_socket_path, layer2_socket_path); + strcpy(set->sap_socket_path, sap_socket_path); + /* IMEI */ sprintf(set->imei, "000000000000000"); sprintf(set->imeisv, "0000000000000000"); - /* test sim */ + /* SIM type */ +#warning TODO: Enable after SIM reader is available in master branch. +// set->sim_type = SIM_TYPE_READER; + + /* test SIM */ strcpy(set->test_imsi, "001010000000000"); set->test_rplmn_mcc = set->test_rplmn_mnc = 1; |