From 363d4d22da0e2bb03645affa32fe7443d8f8befc Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Mon, 23 Oct 2017 08:29:04 +0330 Subject: [PATCH] mobile: clean up and share example configs It is better to have a shared example config files directory, like other Osmocom projects do. Change-Id: I903f31a8afc518ac258cdaeaf76430de07f7edea --- .../examples/mobile/default.cfg | 23 ++- .../examples/mobile/multi_ms.cfg | 132 ++++++++---------- src/host/layer23/src/mobile/app_mobile.c | 2 + 3 files changed, 73 insertions(+), 84 deletions(-) rename src/host/virt_phy/example_configs/osmocom-bb-mobile.cfg => doc/examples/mobile/default.cfg (72%) rename src/host/virt_phy/example_configs/osmocom-bb-mobilex2.cfg => doc/examples/mobile/multi_ms.cfg (63%) diff --git a/src/host/virt_phy/example_configs/osmocom-bb-mobile.cfg b/doc/examples/mobile/default.cfg similarity index 72% rename from src/host/virt_phy/example_configs/osmocom-bb-mobile.cfg rename to doc/examples/mobile/default.cfg index 1aeb3f583..cc8163058 100644 --- a/src/host/virt_phy/example_configs/osmocom-bb-mobile.cfg +++ b/doc/examples/mobile/default.cfg @@ -1,5 +1,5 @@ ! -! OsmocomBB (0.0.0) configuration saved from vty +! OsmocomBB example configuration for mobile application !! ! line vty @@ -14,12 +14,12 @@ no hide-default ms 1 layer2-socket /tmp/osmocom_l2 sap-socket /tmp/osmocom_sap - sim test + sim reader network-selection-mode auto - imei 123456789012345 0 + imei 000000000000000 0 imei-fixed no emergency-imsi - sms-service-center 123123123 + no sms-service-center no call-waiting no auto-answer no force-rekey @@ -40,9 +40,9 @@ ms 1 p-gsm e-gsm r-gsm - gsm-850 + no gsm-850 dcs - pcs + no pcs class-900 4 class-850 4 class-dcs 1 @@ -54,14 +54,9 @@ ms 1 min-rxlev -106 dsc-max 90 no skip-max-per-band - exit test-sim - imsi 901700000000403 - ki comp128 12 34 56 78 90 1b cd ef 12 34 56 78 90 ab cd ef + imsi 001010000000000 + ki comp128 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 no barred-access - rplmn 262 42 0x0001 - hplmn-search everywhere - exit + rplmn 001 01 no shutdown -exit -! diff --git a/src/host/virt_phy/example_configs/osmocom-bb-mobilex2.cfg b/doc/examples/mobile/multi_ms.cfg similarity index 63% rename from src/host/virt_phy/example_configs/osmocom-bb-mobilex2.cfg rename to doc/examples/mobile/multi_ms.cfg index 0c9ada4d6..bef2406e2 100644 --- a/src/host/virt_phy/example_configs/osmocom-bb-mobilex2.cfg +++ b/doc/examples/mobile/multi_ms.cfg @@ -1,5 +1,5 @@ ! -! OsmocomBB (0.0.0) configuration saved from vty +! OsmocomBB example configuration for mobile application !! ! line vty @@ -11,15 +11,15 @@ no gps enable ! no hide-default ! -ms 1 - layer2-socket /tmp/osmocom_l2 - sap-socket /tmp/osmocom_sap - sim test +ms one + layer2-socket /tmp/osmocom_l2.one + sap-socket /tmp/osmocom_sap.one + sim reader network-selection-mode auto - imei 123456789012345 0 + imei 000000000000000 0 imei-fixed no emergency-imsi - sms-service-center 123123123 + no sms-service-center no call-waiting no auto-answer no force-rekey @@ -40,9 +40,9 @@ ms 1 p-gsm e-gsm r-gsm - gsm-850 + no gsm-850 dcs - pcs + no pcs class-900 4 class-850 4 class-dcs 1 @@ -54,67 +54,59 @@ ms 1 min-rxlev -106 dsc-max 90 no skip-max-per-band - exit test-sim - imsi 901700000000403 - ki comp128 12 34 56 78 90 1b cd ef 12 34 56 78 90 ab cd ef - barred-access - rplmn 262 42 0x0001 - hplmn-search everywhere - exit + imsi 001010000000001 + ki comp128 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + no barred-access + rplmn 001 01 no shutdown -exit -ms 2 - layer2-socket /tmp/osmocom_l2_NR2 - sap-socket /tmp/osmocom_sap_NR2 - sim test - network-selection-mode auto - imei 123456789012346 0 - imei-fixed - no emergency-imsi - sms-service-center 123123123 - no call-waiting - no auto-answer - no force-rekey - no clip - no clir - tx-power auto - no simulated-delay - no stick - location-updating - neighbour-measurement - codec full-speed prefer - codec half-speed - no abbrev - support - sms - a5/1 - a5/2 - p-gsm - e-gsm - r-gsm - gsm-850 - dcs - pcs - class-900 4 - class-850 4 - class-dcs 1 - class-pcs 1 - channel-capability sdcch+tchf+tchh - full-speech-v1 - full-speech-v2 - half-speech-v1 - min-rxlev -106 - dsc-max 90 - no skip-max-per-band - exit - test-sim - imsi 901700000000404 - ki comp128 11 34 56 78 90 1b cd ef 12 34 56 78 90 ab cd ef - barred-access - rplmn 262 42 0x0001 - hplmn-search everywhere - exit - no shutdown -exit ! +ms two + layer2-socket /tmp/osmocom_l2.two + sap-socket /tmp/osmocom_sap.two + sim reader + network-selection-mode auto + imei 000000000000000 0 + imei-fixed + no emergency-imsi + no sms-service-center + no call-waiting + no auto-answer + no force-rekey + no clip + no clir + tx-power auto + no simulated-delay + no stick + location-updating + neighbour-measurement + codec full-speed prefer + codec half-speed + no abbrev + support + sms + a5/1 + a5/2 + p-gsm + e-gsm + r-gsm + no gsm-850 + dcs + no pcs + class-900 4 + class-850 4 + class-dcs 1 + class-pcs 1 + channel-capability sdcch+tchf+tchh + full-speech-v1 + full-speech-v2 + half-speech-v1 + min-rxlev -106 + dsc-max 90 + no skip-max-per-band + test-sim + imsi 001010000000002 + ki comp128 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff + no barred-access + rplmn 001 01 + no shutdown diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index fd2c94fb2..ecf982054 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -407,6 +407,8 @@ int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), " '%s'\n", config_file); fprintf(stderr, "Please check or create config file" " using: 'touch %s'\n", config_file); + fprintf(stderr, "or use one from " + "'doc/examples/mobile/'\n"); return rc; } printf("Using configuration from %s\n", config_file);