lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

November 2022

  • 2 participants
  • 2503 discussions
Change in osmocom-bb[master]: mobile: gsm48_rr_set_mode(): print name of channel mode
by fixeria 26 Nov '22

26 Nov '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30328 ) Change subject: mobile: gsm48_rr_set_mode(): print name of channel mode ...................................................................... mobile: gsm48_rr_set_mode(): print name of channel mode Change-Id: I615e89bdd7e1cc01b3258fefa26f7ab5705ae8cc Related: OS#5599 --- M src/host/layer23/src/mobile/gsm48_rr.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/28/30328/1 diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index f54c945..6092835 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -3435,8 +3435,8 @@ return -ENOTSUP; /* setting (new) timing advance */ - LOGP(DRR, LOGL_INFO, "setting TCH mode to %d, audio mode to %d\n", - mode, rr->audio_mode); + LOGP(DRR, LOGL_INFO, "setting TCH mode to %s, audio mode to %d\n", + get_value_string(gsm48_chan_mode_names, mode), rr->audio_mode); l1ctl_tx_tch_mode_req(ms, mode, rr->audio_mode, rr->tch_loop_mode); return 0; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30328 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I615e89bdd7e1cc01b3258fefa26f7ab5705ae8cc Gerrit-Change-Number: 30328 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: fixeria <axilirator(a)gmail.com> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: mobile: add MNCC handler selection to settings
by fixeria 26 Nov '22

26 Nov '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30326 ) Change subject: mobile: add MNCC handler selection to settings ...................................................................... mobile: add MNCC handler selection to settings Since the mobile application is potentionally able to maintain multiple MS instances, it's better to have a possibility to choose an MNCC (Call Control) handler per each MS separately. This change removes the command-line option '-m', which was used for enabling the extarnal MNCC. Now it's possible configure the MNCC handler for each MS via the VTY interface and settings. The following MNCC-handlers are available: - internal - built-in MNCC-handler (default); - external - external MNCC-handler via UNIX-socket (e.g. LCR); - dummy - dummy handler without CC support. Change-Id: I2df91c7a79ba5c39bc6ceae900ef649129dd0346 Related: OS#3400 --- M doc/examples/mobile/default.cfg M doc/examples/mobile/multi_ms.cfg M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/include/osmocom/bb/mobile/settings.h M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/main.c M src/host/layer23/src/mobile/mnccms.c M src/host/layer23/src/mobile/settings.c M src/host/layer23/src/mobile/vty_interface.c 9 files changed, 112 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/26/30326/1 diff --git a/doc/examples/mobile/default.cfg b/doc/examples/mobile/default.cfg index d78bef5..e24e07f 100644 --- a/doc/examples/mobile/default.cfg +++ b/doc/examples/mobile/default.cfg @@ -15,6 +15,7 @@ layer2-socket /tmp/osmocom_l2 sap-socket /tmp/osmocom_sap mncc-socket /tmp/ms_mncc_1 + mncc-handler internal sim reader network-selection-mode auto imei 000000000000000 0 diff --git a/doc/examples/mobile/multi_ms.cfg b/doc/examples/mobile/multi_ms.cfg index 4ccdb10..86a9840 100644 --- a/doc/examples/mobile/multi_ms.cfg +++ b/doc/examples/mobile/multi_ms.cfg @@ -15,6 +15,7 @@ layer2-socket /tmp/osmocom_l2.one sap-socket /tmp/osmocom_sap.one mncc-socket /tmp/ms_mncc_one + mncc-handler internal sim reader network-selection-mode auto imei 000000000000000 0 @@ -68,6 +69,7 @@ layer2-socket /tmp/osmocom_l2.two sap-socket /tmp/osmocom_sap.two mncc-socket /tmp/ms_mncc_two + mncc-handler internal sim reader network-selection-mode auto imei 000000000000000 0 diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 191f4ba..7a3669d 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -8,8 +8,7 @@ struct osmocom_ms; struct vty; -int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), - const char *config_file); +int l23_app_init(const char *config_file); int l23_app_exit(void); int l23_app_work(int *quit); int mobile_delete(struct osmocom_ms *ms, int force); diff --git a/src/host/layer23/include/osmocom/bb/mobile/settings.h b/src/host/layer23/include/osmocom/bb/mobile/settings.h index 6f4f59c..d5620ff 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/settings.h +++ b/src/host/layer23/include/osmocom/bb/mobile/settings.h @@ -3,6 +3,16 @@ #define MOB_C7_DEFLT_ANY_TIMEOUT 30 +/* CC (Call Control) message handling entity */ +enum mncc_handler_t { + /* Built-in mobile's MNCC */ + MNCC_HANDLER_INTERNAL, + /* External MNCC application via UNIX-socket */ + MNCC_HANDLER_EXTERNAL, + /* No call support */ + MNCC_HANDLER_DUMMY, +}; + /* TCH frame I/O handler */ enum audio_io_handler { /* No handler, drop frames */ @@ -24,6 +34,9 @@ char sap_socket_path[128]; char mncc_socket_path[128]; + /* MNCC handler */ + enum mncc_handler_t mncc_handler; + /* Audio settings */ struct audio_settings audio; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 5016582..dd67e70 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -51,9 +51,9 @@ extern struct llist_head ms_list; extern int vty_reading; -int mncc_recv_mobile(struct osmocom_ms *ms, int msg_type, void *arg); +int mncc_recv_internal(struct osmocom_ms *ms, int msg_type, void *arg); +int mncc_recv_external(struct osmocom_ms *ms, int msg_type, void *arg); int mncc_recv_dummy(struct osmocom_ms *ms, int msg_type, void *arg); -int (*mncc_recv_app)(struct osmocom_ms *ms, int, void *); static int quit; /* handle ms instance */ @@ -237,6 +237,24 @@ "default IMEI.\n***\n"); } + switch (ms->settings.mncc_handler) { + case MNCC_HANDLER_INTERNAL: + LOGP(DMOB, LOGL_INFO, "Using the built-in MNCC-handler for MS '%s'\n", ms->name); + ms->mncc_entity.mncc_recv = &mncc_recv_internal; + break; + case MNCC_HANDLER_EXTERNAL: + LOGP(DMOB, LOGL_INFO, "Using external MNCC-handler (socket '%s') for MS '%s'\n", + ms->settings.mncc_socket_path, ms->name); + ms->mncc_entity.mncc_recv = &mncc_recv_external; + ms->mncc_entity.sock_state = mncc_sock_init(ms, ms->settings.mncc_socket_path); + break; + case MNCC_HANDLER_DUMMY: + default: + LOGP(DMOB, LOGL_INFO, "Using dummy MNCC-handler (no call support) " + "for MS '%s'\n", ms->name); + ms->mncc_entity.mncc_recv = &mncc_recv_dummy; + } + l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); LOGP(DMOB, LOGL_NOTICE, "Mobile '%s' initialized, please start phone now!\n", ms->name); return 0; @@ -319,15 +337,6 @@ mobile_set_shutdown(ms, MS_SHUTDOWN_COMPL); - if (mncc_recv_app) { - ms->mncc_entity.mncc_recv = mncc_recv_app; - ms->mncc_entity.sock_state = mncc_sock_init(ms, ms->settings.mncc_socket_path); - } else if (ms->settings.ch_cap == GSM_CAP_SDCCH) - ms->mncc_entity.mncc_recv = mncc_recv_dummy; - else - ms->mncc_entity.mncc_recv = mncc_recv_mobile; - - return ms; } @@ -338,7 +347,7 @@ ms->deleting = true; - if (mncc_recv_app) { + if (ms->settings.mncc_handler == MNCC_HANDLER_EXTERNAL) { mncc_sock_exit(ms->mncc_entity.sock_state); ms->mncc_entity.sock_state = NULL; } @@ -432,14 +441,11 @@ }; /* global init */ -int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *), - const char *config_file) +int l23_app_init(const char *config_file) { struct telnet_connection dummy_conn; int rc = 0; - mncc_recv_app = mncc_recv; - osmo_gps_init(); vty_info.tall_ctx = l23_ctx; diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 9533553..926358e 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -48,11 +48,8 @@ static const char *custom_cfg_file = NULL; struct gsmtap_inst *gsmtap_inst = NULL; char *config_dir = NULL; -int use_mncc_sock = 0; int daemonize = 0; -int mncc_recv_socket(struct osmocom_ms *ms, int msg_type, void *arg); - int mobile_delete(struct osmocom_ms *ms, int force); int mobile_signal_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data); @@ -85,8 +82,6 @@ debug_default); printf(" -D --daemonize Run as daemon\n"); printf(" -c --config-file filename The config file to use.\n"); - printf(" -m --mncc-sock Disable built-in MNCC handler and " - "offer socket\n"); } static int handle_options(int argc, char **argv) @@ -99,8 +94,8 @@ {"debug", 1, 0, 'd'}, {"daemonize", 0, 0, 'D'}, {"config-file", 1, 0, 'c'}, - {"mncc-sock", 0, 0, 'm'}, /* DEPRECATED options, to be removed */ + {"mncc-sock", 0, 0, 'm'}, {"vty-ip", 1, 0, 'u'}, {"vty-port", 1, 0, 'v'}, {0, 0, 0, 0}, @@ -129,10 +124,12 @@ case 'D': daemonize = 1; break; - case 'm': - use_mncc_sock = 1; - break; /* DEPRECATED options, to be removed */ + case 'm': + fprintf(stderr, "Option 'm' is deprecated! " + "Please use the configuration file " + "in order to change the MNCC handler.\n"); + return -EINVAL; case 'u': case 'v': fprintf(stderr, "Both 'u' and 'v' options are " @@ -253,10 +250,7 @@ config_dir = talloc_strdup(l23_ctx, config_file); config_dir = dirname(config_dir); - if (use_mncc_sock) - rc = l23_app_init(mncc_recv_socket, config_file); - else - rc = l23_app_init(NULL, config_file); + rc = l23_app_init(config_file); if (rc) exit(rc); diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c index 3fec11e..5accd5e 100644 --- a/src/host/layer23/src/mobile/mnccms.c +++ b/src/host/layer23/src/mobile/mnccms.c @@ -216,7 +216,7 @@ /* * MNCCms call application via socket */ -int mncc_recv_socket(struct osmocom_ms *ms, int msg_type, void *arg) +int mncc_recv_external(struct osmocom_ms *ms, int msg_type, void *arg) { struct mncc_sock_state *state = ms->mncc_entity.sock_state; struct gsm_mncc *mncc = arg; @@ -253,7 +253,7 @@ * MNCCms basic call application */ -int mncc_recv_mobile(struct osmocom_ms *ms, int msg_type, void *arg) +int mncc_recv_internal(struct osmocom_ms *ms, int msg_type, void *arg) { struct gsm_settings *set = &ms->settings; struct gsm_mncc *data = arg; diff --git a/src/host/layer23/src/mobile/settings.c b/src/host/layer23/src/mobile/settings.c index 769fad6..3444d66 100644 --- a/src/host/layer23/src/mobile/settings.c +++ b/src/host/layer23/src/mobile/settings.c @@ -45,6 +45,9 @@ /* Audio settings: drop TCH frames by default */ set->audio.io_handler = AUDIO_IOH_NONE; + /* Built-in MNCC handler */ + set->mncc_handler = MNCC_HANDLER_INTERNAL; + /* network search */ set->plmn_mode = PLMN_MODE_AUTO; diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 7c757a6..9c3e429 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1325,6 +1325,16 @@ VTY_NEWLINE); vty_out(vty, " sap-socket %s%s", set->sap_socket_path, VTY_NEWLINE); vty_out(vty, " mncc-socket %s%s", set->mncc_socket_path, VTY_NEWLINE); + switch (set->mncc_handler) { + case MNCC_HANDLER_INTERNAL: + vty_out(vty, " mncc-handler internal%s", VTY_NEWLINE); + break; + case MNCC_HANDLER_EXTERNAL: + vty_out(vty, " mncc-handler external%s", VTY_NEWLINE); + break; + case MNCC_HANDLER_DUMMY: + vty_out(vty, " mncc-handler dummy%s", VTY_NEWLINE); + } switch(set->sim_type) { case GSM_SIM_TYPE_NONE: vty_out(vty, " sim none%s", VTY_NEWLINE); @@ -1605,8 +1615,8 @@ return CMD_SUCCESS; } -DEFUN(cfg_ms_mncc, cfg_ms_mncc_cmd, "mncc-socket PATH", - "Define socket path for the MNCC interface\n" +DEFUN(cfg_ms_mncc_sock, cfg_ms_mncc_sock_cmd, "mncc-socket PATH", + "Define socket path for MNCC interface\n" "UNIX socket path (default '/tmp/ms_mncc_' + MS_NAME)") { struct osmocom_ms *ms = vty->index; @@ -1618,6 +1628,52 @@ return CMD_SUCCESS; } +DEFUN(cfg_ms_mncc_handler, cfg_ms_mncc_handler_cmd, + "mncc-handler (internal|external|dummy)", + "Set MNCC (Call Control) handler\n" + "Built-in MNCC handler (default)\n" + "External MNCC application via UNIX-socket (e.g. LCR)\n" + "Dummy MNCC handler (no Call Control)\n") +{ + struct osmocom_ms *ms = vty->index; + struct gsm_settings *set = &ms->settings; + + switch (argv[0][0]) { + case 'i': + if (set->ch_cap == GSM_CAP_SDCCH) { /* SDCCH only */ + vty_out(vty, "TCH support is disabled, " + "check 'channel-capability' param%s", VTY_NEWLINE); + return CMD_WARNING; + } + set->mncc_handler = MNCC_HANDLER_INTERNAL; + break; + case 'e': + set->mncc_handler = MNCC_HANDLER_EXTERNAL; + break; + case 'd': + set->mncc_handler = MNCC_HANDLER_DUMMY; + break; + default: + /* Shall not happen */ + OSMO_ASSERT(0); + } + + vty_restart_if_started(vty, ms); + return CMD_SUCCESS; +} + +DEFUN(cfg_ms_no_mncc_handler, cfg_ms_no_mncc_handler_cmd, + "no mncc-handler", NO_STR "Disable Call Control") +{ + struct osmocom_ms *ms = vty->index; + struct gsm_settings *set = &ms->settings; + + set->mncc_handler = MNCC_HANDLER_DUMMY; + + vty_restart_if_started(vty, ms); + return CMD_SUCCESS; +} + DEFUN(cfg_ms_sim, cfg_ms_sim_cmd, "sim (none|reader|test|sap)", "Set SIM card to attach when powering on\nAttach no SIM\n" "Attach SIM from reader\nAttach build in test SIM\n" @@ -2947,7 +3003,9 @@ install_element(MS_NODE, &cfg_ms_show_this_cmd); install_element(MS_NODE, &cfg_ms_layer2_cmd); install_element(MS_NODE, &cfg_ms_sap_cmd); - install_element(MS_NODE, &cfg_ms_mncc_cmd); + install_element(MS_NODE, &cfg_ms_mncc_sock_cmd); + install_element(MS_NODE, &cfg_ms_mncc_handler_cmd); + install_element(MS_NODE, &cfg_ms_no_mncc_handler_cmd); install_element(MS_NODE, &cfg_ms_sim_cmd); install_element(MS_NODE, &cfg_ms_mode_cmd); install_element(MS_NODE, &cfg_ms_imei_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30326 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I2df91c7a79ba5c39bc6ceae900ef649129dd0346 Gerrit-Change-Number: 30326 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: mobile: add MNCC socket path to settings
by fixeria 26 Nov '22

26 Nov '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30325 ) Change subject: mobile: add MNCC socket path to settings ...................................................................... mobile: add MNCC socket path to settings Previously the MNCC socket path was generated automatically, using concatenation of the '/tmp/ms_mncc_' prefix and MS name. Let's allow the user to specify this manually, keeping the same naming generation method for default value. Change-Id: I643356ac579bc5e765f668265ec803b22a73739c Related: OS#3400 --- M doc/examples/mobile/default.cfg M doc/examples/mobile/multi_ms.cfg M src/host/layer23/include/osmocom/bb/mobile/settings.h M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/settings.c M src/host/layer23/src/mobile/vty_interface.c 6 files changed, 33 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/25/30325/1 diff --git a/doc/examples/mobile/default.cfg b/doc/examples/mobile/default.cfg index f14e900..d78bef5 100644 --- a/doc/examples/mobile/default.cfg +++ b/doc/examples/mobile/default.cfg @@ -14,6 +14,7 @@ ms 1 layer2-socket /tmp/osmocom_l2 sap-socket /tmp/osmocom_sap + mncc-socket /tmp/ms_mncc_1 sim reader network-selection-mode auto imei 000000000000000 0 diff --git a/doc/examples/mobile/multi_ms.cfg b/doc/examples/mobile/multi_ms.cfg index c72817f..4ccdb10 100644 --- a/doc/examples/mobile/multi_ms.cfg +++ b/doc/examples/mobile/multi_ms.cfg @@ -14,6 +14,7 @@ ms one layer2-socket /tmp/osmocom_l2.one sap-socket /tmp/osmocom_sap.one + mncc-socket /tmp/ms_mncc_one sim reader network-selection-mode auto imei 000000000000000 0 @@ -66,6 +67,7 @@ ms two layer2-socket /tmp/osmocom_l2.two sap-socket /tmp/osmocom_sap.two + mncc-socket /tmp/ms_mncc_two sim reader network-selection-mode auto imei 000000000000000 0 diff --git a/src/host/layer23/include/osmocom/bb/mobile/settings.h b/src/host/layer23/include/osmocom/bb/mobile/settings.h index 57f23ee..6f4f59c 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/settings.h +++ b/src/host/layer23/include/osmocom/bb/mobile/settings.h @@ -22,6 +22,7 @@ struct gsm_settings { char layer2_socket_path[128]; char sap_socket_path[128]; + char mncc_socket_path[128]; /* Audio settings */ struct audio_settings audio; diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 7b28bb4..5016582 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -269,6 +269,14 @@ *other_name = tmp->name; return -2; } + if (!strcmp(ms->settings.mncc_socket_path, + tmp->settings.mncc_socket_path)) { + LOGP(DMOB, LOGL_ERROR, "Cannot start MS '%s', because MS '%s' " + "is using the same mncc-socket.\nPlease shutdown " + "MS '%s' first.\n", ms->name, tmp->name, tmp->name); + *other_name = tmp->name; + return -3; + } } rc = mobile_init(ms); @@ -291,7 +299,6 @@ struct osmocom_ms *mobile_new(char *name) { static struct osmocom_ms *ms; - char *mncc_name; ms = talloc_zero(l23_ctx, struct osmocom_ms); if (!ms) { @@ -313,12 +320,8 @@ mobile_set_shutdown(ms, MS_SHUTDOWN_COMPL); if (mncc_recv_app) { - mncc_name = talloc_asprintf(ms, "/tmp/ms_mncc_%s", ms->name); - ms->mncc_entity.mncc_recv = mncc_recv_app; - ms->mncc_entity.sock_state = mncc_sock_init(ms, mncc_name); - - talloc_free(mncc_name); + ms->mncc_entity.sock_state = mncc_sock_init(ms, ms->settings.mncc_socket_path); } else if (ms->settings.ch_cap == GSM_CAP_SDCCH) ms->mncc_entity.mncc_recv = mncc_recv_dummy; else diff --git a/src/host/layer23/src/mobile/settings.c b/src/host/layer23/src/mobile/settings.c index 23da620..769fad6 100644 --- a/src/host/layer23/src/mobile/settings.c +++ b/src/host/layer23/src/mobile/settings.c @@ -28,6 +28,7 @@ static char *layer2_socket_path = "/tmp/osmocom_l2"; static char *sap_socket_path = "/tmp/osmocom_sap"; +static char *mncc_socket_path = "/tmp/ms_mncc"; int gsm_settings_init(struct osmocom_ms *ms) { @@ -37,6 +38,10 @@ strcpy(set->layer2_socket_path, layer2_socket_path); strcpy(set->sap_socket_path, sap_socket_path); + /* Compose MNCC socket path using MS name */ + snprintf(set->mncc_socket_path, sizeof(set->mncc_socket_path) - 1, + "%s_%s", mncc_socket_path, ms->name); + /* Audio settings: drop TCH frames by default */ set->audio.io_handler = AUDIO_IOH_NONE; diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index d6f6cd1..7c757a6 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1324,6 +1324,7 @@ vty_out(vty, " layer2-socket %s%s", set->layer2_socket_path, VTY_NEWLINE); vty_out(vty, " sap-socket %s%s", set->sap_socket_path, VTY_NEWLINE); + vty_out(vty, " mncc-socket %s%s", set->mncc_socket_path, VTY_NEWLINE); switch(set->sim_type) { case GSM_SIM_TYPE_NONE: vty_out(vty, " sim none%s", VTY_NEWLINE); @@ -1604,6 +1605,19 @@ return CMD_SUCCESS; } +DEFUN(cfg_ms_mncc, cfg_ms_mncc_cmd, "mncc-socket PATH", + "Define socket path for the MNCC interface\n" + "UNIX socket path (default '/tmp/ms_mncc_' + MS_NAME)") +{ + struct osmocom_ms *ms = vty->index; + struct gsm_settings *set = &ms->settings; + + OSMO_STRLCPY_ARRAY(set->mncc_socket_path, argv[0]); + + vty_restart(vty, ms); + return CMD_SUCCESS; +} + DEFUN(cfg_ms_sim, cfg_ms_sim_cmd, "sim (none|reader|test|sap)", "Set SIM card to attach when powering on\nAttach no SIM\n" "Attach SIM from reader\nAttach build in test SIM\n" @@ -2933,6 +2947,7 @@ install_element(MS_NODE, &cfg_ms_show_this_cmd); install_element(MS_NODE, &cfg_ms_layer2_cmd); install_element(MS_NODE, &cfg_ms_sap_cmd); + install_element(MS_NODE, &cfg_ms_mncc_cmd); install_element(MS_NODE, &cfg_ms_sim_cmd); install_element(MS_NODE, &cfg_ms_mode_cmd); install_element(MS_NODE, &cfg_ms_imei_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30325 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I643356ac579bc5e765f668265ec803b22a73739c Gerrit-Change-Number: 30325 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: layer23: l1ctl_tx_traffic_req(): cosmetic: drop dead code
by fixeria 26 Nov '22

26 Nov '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30324 ) Change subject: layer23: l1ctl_tx_traffic_req(): cosmetic: drop dead code ...................................................................... layer23: l1ctl_tx_traffic_req(): cosmetic: drop dead code Change-Id: I941899ab27282a495f965ae9a0f41076dceef953 Related: OS#5599 --- M src/host/layer23/src/common/l1ctl.c 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/24/30324/1 diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c index d520403..ae7be6e 100644 --- a/src/host/layer23/src/common/l1ctl.c +++ b/src/host/layer23/src/common/l1ctl.c @@ -910,8 +910,6 @@ DEBUGP(DL1C, "TRAFFIC REQ len=%zu (%s)\n", frame_len, osmo_hexdump(frame, frame_len)); -// printf("TX %s\n", osmo_hexdump(frame, frame_len)); - /* prepend uplink info header */ l1i_ul = (struct l1ctl_info_ul *) msgb_push(msg, sizeof(*l1i_ul)); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30324 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I941899ab27282a495f965ae9a0f41076dceef953 Gerrit-Change-Number: 30324 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: fixeria <axilirator(a)gmail.com> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: fsms: use configurable timers instead of T23042
by fixeria 26 Nov '22

26 Nov '22
Attention is currently required from: osmith, neels. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30307 ) Change subject: fsms: use configurable timers instead of T23042 ...................................................................... Patch Set 1: (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-bsc/+/30307/comment/3eb9efb6_9f3fe535 PS1, Line 9: It looks like T23042 was a placeholder for timers to be filled in later, > i can confirm that it actually 100% was nothing but a placeholder, "obvious" when familiar with use […] T23042 may also look like a spec. reference - 3GPP TS 23.042 "Compression algorithm for text messaging services". IIRC, there even exist timer numbers matching the spec. number (was it SMSCB related?). -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Id0d4d0788f609f3272fc81c80a754383dde25c16 Gerrit-Change-Number: 30307 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Sat, 26 Nov 2022 16:12:11 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: implement Ready-to-Receive PHYIF API
by fixeria 26 Nov '22

26 Nov '22
Attention is currently required from: msuraev. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30262 ) Change subject: trxcon: implement Ready-to-Receive PHYIF API ...................................................................... Patch Set 2: (3 comments) File src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h: https://gerrit.osmocom.org/c/osmocom-bb/+/30262/comment/d6baeffc_2e355422 PS2, Line 166: #define L1SCHED_PROBE_F_ACTIVE (1 << 0) > That looks odd. […] I see nothing odd here. This is the usual way of defining bit-flags. If we ever need more flags, it would be more convenient to write (1 << N) rather than 1, 2, 4, 8, etc. File src/host/trxcon/include/osmocom/bb/trxcon/phyif.h: https://gerrit.osmocom.org/c/osmocom-bb/+/30262/comment/dae2a8d5_3e29bd94 PS2, Line 85: #define TRXCON_PHYIF_RTR_F_ACTIVE (1 << 0) > Same here. See my answer near the L1SCHED_PROBE_F_ACTIVE. File src/host/trxcon/src/sched_trx.c: https://gerrit.osmocom.org/c/osmocom-bb/+/30262/comment/dbc50b46_4ed388ca PS2, Line 829: return -ENODEV; > Would be better to use different error code to distinguish between different errors. This is not really necessary though. Most of the times we check if the value is 0 and don't care why exactly some function failed. If I ever needed distinct self-explanatory error causes, I would rather go for my own enumerated type rather than using constants from errno.h. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30262 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9a71b8a59733f4dd908b760c5e23ea3d624afb1a Gerrit-Change-Number: 30262 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: msuraev <msuraev(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sat, 26 Nov 2022 15:56:20 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: msuraev <msuraev(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: trxcon: trxcon_fsm: shorten DCCH related event names
by fixeria 26 Nov '22

26 Nov '22
Attention is currently required from: msuraev. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30316 ) Change subject: trxcon: trxcon_fsm: shorten DCCH related event names ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > It's cold outside. Names are shrinking... Yesh, -30 in Novosibirsk at the moment :P -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30316 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie388e251677da63306e9e53d98cbcc7c34777980 Gerrit-Change-Number: 30316 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sat, 26 Nov 2022 15:43:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: msuraev <msuraev(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: LAPD: move tx_hist code into static functions
by msuraev 26 Nov '22

26 Nov '22
msuraev has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30244 ) Change subject: LAPD: move tx_hist code into static functions ...................................................................... LAPD: move tx_hist code into static functions Related: OS#4074 Change-Id: Ibf3b08c8d874416796b94ba3a672a02d614313b1 --- M src/gsm/lapd_core.c 1 file changed, 22 insertions(+), 20 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve msuraev: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index 9a4f56b..7441285 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -1738,6 +1738,20 @@ return dl->send_ph_data_req(&nctx, msg); } +static void msg_to_tx_hist(struct lapd_history *tx_hist, const struct msgb *msg, int length, int more) +{ + tx_hist->msg = lapd_msgb_alloc(msg->len, "HIST"); + tx_hist->more = more; + msgb_put(tx_hist->msg, msg->len); + if (length) + memcpy(tx_hist->msg->data, msg->l3h, msg->len); +} + +static void msg_to_tx_hist0(struct lapd_datalink *dl, const struct msgb *msg) +{ + return msg_to_tx_hist(&dl->tx_hist[0], msg, msg->len, 0); +} + /* request link establishment */ static int lapd_est_req(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx) { @@ -1776,11 +1790,8 @@ nctx.more = 0; /* Transmit-buffer carries exactly one segment */ - dl->tx_hist[0].msg = lapd_msgb_alloc(msg->len, "HIST"); - msgb_put(dl->tx_hist[0].msg, msg->len); - if (msg->len) - memcpy(dl->tx_hist[0].msg->data, msg->l3h, msg->len); - dl->tx_hist[0].more = 0; + msg_to_tx_hist0(dl, msg); + /* set Vs to 0, because it is used as index when resending SABM */ dl->v_send = 0; @@ -1913,11 +1924,8 @@ memcpy(msg->l3h, dl->send_buffer->l3h + dl->send_out, length); /* store in tx_hist */ - dl->tx_hist[h].msg = lapd_msgb_alloc(msg->len, "HIST"); - msgb_put(dl->tx_hist[h].msg, msg->len); - if (length) - memcpy(dl->tx_hist[h].msg->data, msg->l3h, msg->len); - dl->tx_hist[h].more = nctx.more; + msg_to_tx_hist(&dl->tx_hist[h], msg, length, nctx.more); + /* Add length to track how much is already in the tx buffer */ dl->send_out += length; } else { @@ -2038,11 +2046,8 @@ nctx.length = 0; nctx.more = 0; - dl->tx_hist[0].msg = lapd_msgb_alloc(msg->len, "HIST"); - msgb_put(dl->tx_hist[0].msg, msg->len); - if (msg->len) - memcpy(dl->tx_hist[0].msg->data, msg->l3h, msg->len); - dl->tx_hist[0].more = 0; + msg_to_tx_hist0(dl, msg); + /* set Vs to 0, because it is used as index when resending SABM */ dl->v_send = 0; @@ -2102,11 +2107,8 @@ nctx.length = 0; nctx.more = 0; - dl->tx_hist[0].msg = lapd_msgb_alloc(msg->len, "HIST"); - msgb_put(dl->tx_hist[0].msg, msg->len); - if (msg->len) - memcpy(dl->tx_hist[0].msg->data, msg->l3h, msg->len); - dl->tx_hist[0].more = 0; + msg_to_tx_hist0(dl, msg); + /* set Vs to 0, because it is used as index when resending DISC */ dl->v_send = 0; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibf3b08c8d874416796b94ba3a672a02d614313b1 Gerrit-Change-Number: 30244 Gerrit-PatchSet: 9 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmocore[master]: LAPD: move tx_hist code into static functions
by msuraev 26 Nov '22

26 Nov '22
Attention is currently required from: pespin, fixeria. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30244 ) Change subject: LAPD: move tx_hist code into static functions ...................................................................... Patch Set 8: Code-Review+2 (1 comment) File src/gsm/lapd_core.c: https://gerrit.osmocom.org/c/libosmocore/+/30244/comment/d898905a_7847deb7 PS8, Line 1742: { > more should probably unsigned. The usual story with code review: if I make further changes while restructuring code - somebody will comment that it's unrelated change, if I don't - somebody will comment that further changes would improve things. To resolve this conundrum let's merge as is and defer improvements to follow-up patches. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibf3b08c8d874416796b94ba3a672a02d614313b1 Gerrit-Change-Number: 30244 Gerrit-PatchSet: 8 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 26 Nov 2022 13:59:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: osmo-ns-dummy: add rate counters
by msuraev 26 Nov '22

26 Nov '22
Attention is currently required from: pespin. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30301 ) Change subject: osmo-ns-dummy: add rate counters ...................................................................... Patch Set 3: (1 comment) File utils/osmo-ns-dummy.c: https://gerrit.osmocom.org/c/libosmocore/+/30301/comment/b6e1a4b5_37392e36 PS3, Line 56: static const struct rate_ctr_desc dummy_ctr_desc[] = { > This looks totally unrelated to the program you are modifying. […] That's a program solely used as unit test helper. Adding code useful for tests is as relevant as it gets. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30301 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ibd8b17aa3ba9ceb527c6231310f01d736fb542a7 Gerrit-Change-Number: 30301 Gerrit-PatchSet: 3 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 26 Nov 2022 13:55:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • ...
  • 251
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.