diff --git a/net/config_2g3g b/net/config_2g3g index bc0ced3..2149c39 100644 --- a/net/config_2g3g +++ b/net/config_2g3g @@ -142,6 +142,13 @@ BSCNAT_CN_IP="127.0.0.3" BSCNAT_RAN_PC="${MSC_PC}" BSCNAT_RAN_IP="127.0.0.4" +# Set to 1 to have osmo-dev run mobile and virtphy from osmocom-bb +MS_RUN_IN_OSMO_DEV=0 +MS_SUBSCR_ID="1337" +MS_IMSI="001010000000000" +MS_KI="00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00" +MS_MSISDN="555" + # PBX_SERVER: # "kamailio" -- launch kamailio # "freeswitch" -- launch freeswitch diff --git a/net/templates/hlr_db_add_ms.sql b/net/templates/hlr_db_add_ms.sql new file mode 100644 index 0000000..54fda4b --- /dev/null +++ b/net/templates/hlr_db_add_ms.sql @@ -0,0 +1,10 @@ +/* Use this file to add the subscriber for MS_RUN_IN_OSMO_DEV=1 to your hlr.db: + * sqlite3 -batch hlr.db < hlr_db_add_ms.sql + */ + +INSERT INTO subscriber (id, imsi, msisdn) +VALUES (${MS_SUBSCR_ID}, "${MS_IMSI}", "${MS_MSISDN}"); + +INSERT INTO auc_2g (subscriber_id, algo_id_2g, ki) +VALUES (${MS_SUBSCR_ID}, 1 /* OSMO_AUTH_ALG_COMP128v1 */, + REPLACE("${MS_KI}", " ", "")); diff --git a/net/templates/mobile.cfg b/net/templates/mobile.cfg new file mode 100644 index 0000000..a9fcb3f --- /dev/null +++ b/net/templates/mobile.cfg @@ -0,0 +1,62 @@ +${include(common_template_warning)} +line vty + no login + +no gps enable + +no hide-default + +ms 1 + layer2-socket /tmp/osmocom_l2 + sap-socket /tmp/osmocom_sap + sim test + network-selection-mode auto + imei 000000000000000 0 + imei-fixed + no emergency-imsi + no sms-service-center + no call-waiting + 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 + 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 + min-rxlev -106 + dsc-max 90 + no skip-max-per-band + test-sim + imsi ${MS_IMSI} + ki comp128 ${MS_KI} + no barred-access + rplmn ${MCC} ${MNC} + audio + io-handler loopback + no shutdown + +${foreach(LOG_OUTPUT)} +log ${LOG_OUTPUTn_TYPE} +${include(common_logging)} +${foreach_end} diff --git a/net/templates/run.sh b/net/templates/run.sh index cda7fc0..e1cf226 100755 --- a/net/templates/run.sh +++ b/net/templates/run.sh @@ -183,6 +183,8 @@ stp4ran="osmo-stp -c osmo-stp-ran.cfg" bsc="LD_LIBRARY_PATH=/usr/local/lib gdb -ex run --args osmo-bsc" bscnat="osmo-bsc-nat" bts="osmo-bts-virtual" +virtphy="virtphy" +ms="mobile -c mobile.cfg" if [ "x${MSC_MNCC}" != "xinternal" ]; then sipcon="osmo-sip-connector -c osmo-sip-connector.cfg" @@ -258,6 +260,10 @@ if [ "${BTSn_RUN_IN_OSMO_DEV}" = 1 ]; then fi ${foreach_end} +if [ "${MS_RUN_IN_OSMO_DEV}" = 1 ]; then + term "$virtphy" VIRTPHY + term "$ms" MS +fi if [ "x${MSC_MNCC}" != "xinternal" ]; then term "$sipcon" SIPCON