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 2023

  • 1 participants
  • 1508 discussions
[M] Change in osmocom-bb[master]: mobile: rename voice.[ch] to tch.[ch]
by fixeria 03 Nov '23

03 Nov '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34917?usp=email ) Change subject: mobile: rename voice.[ch] to tch.[ch] ...................................................................... mobile: rename voice.[ch] to tch.[ch] Also take a chance to change the 'tch_' prefix for all functions. Change-Id: I05e1ae777add73672db61565c77c68d8ab2b08f0 Related: OS#4396 --- M src/host/layer23/include/osmocom/bb/mobile/Makefile.am A src/host/layer23/include/osmocom/bb/mobile/tch.h D src/host/layer23/include/osmocom/bb/mobile/voice.h M src/host/layer23/src/mobile/Makefile.am M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/gapk_io.c M src/host/layer23/src/mobile/gsm44068_gcc_bcc.c M src/host/layer23/src/mobile/gsm48_cc.c R src/host/layer23/src/mobile/tch.c 9 files changed, 43 insertions(+), 31 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am index 534b865..5d2eeaf 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am @@ -1,4 +1,4 @@ noinst_HEADERS = gsm322.h gsm480_ss.h gsm411_sms.h gsm48_cc.h gsm48_mm.h \ gsm48_rr.h mncc.h gsm44068_gcc_bcc.h \ - transaction.h vty.h mncc_sock.h mncc_ms.h primitives.h \ - app_mobile.h voice.h gapk_io.h + tch.h transaction.h vty.h mncc_sock.h mncc_ms.h primitives.h \ + app_mobile.h gapk_io.h diff --git a/src/host/layer23/include/osmocom/bb/mobile/tch.h b/src/host/layer23/include/osmocom/bb/mobile/tch.h new file mode 100644 index 0000000..0e81769 --- /dev/null +++ b/src/host/layer23/include/osmocom/bb/mobile/tch.h @@ -0,0 +1,9 @@ +#pragma once + +struct osmocom_ms; +struct gsm_data_frame; +struct msgb; + +int tch_init(struct osmocom_ms *ms); +int tch_send_voice_msg(struct osmocom_ms *ms, struct msgb *msg); +int tch_send_voice_frame(struct osmocom_ms *ms, const struct gsm_data_frame *frame); diff --git a/src/host/layer23/include/osmocom/bb/mobile/voice.h b/src/host/layer23/include/osmocom/bb/mobile/voice.h deleted file mode 100644 index 8c4c5b6..0000000 --- a/src/host/layer23/include/osmocom/bb/mobile/voice.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -struct osmocom_ms; -struct gsm_data_frame; -struct msgb; - -int gsm_voice_init(struct osmocom_ms *ms); -int gsm_send_voice_msg(struct osmocom_ms *ms, struct msgb *msg); -int gsm_send_voice_frame(struct osmocom_ms *ms, const struct gsm_data_frame *frame); diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 7b05f65..ed2146f 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -30,9 +30,9 @@ mnccms.c \ mncc_sock.c \ primitives.c \ + tch.c \ transaction.c \ vty_interface.c \ - voice.c \ $(NULL) bin_PROGRAMS = mobile diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index b08976c..cada8fc 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -41,7 +41,7 @@ #include <osmocom/bb/mobile/vty.h> #include <osmocom/bb/mobile/app_mobile.h> #include <osmocom/bb/mobile/mncc.h> -#include <osmocom/bb/mobile/voice.h> +#include <osmocom/bb/mobile/tch.h> #include <osmocom/bb/mobile/gapk_io.h> #include <osmocom/bb/mobile/primitives.h> @@ -256,7 +256,7 @@ gsm480_ss_init(ms); gsm411_sms_init(ms); gsm44068_gcc_init(ms); - gsm_voice_init(ms); + tch_init(ms); gsm_subscr_init(ms); gsm48_rr_init(ms); gsm48_mm_init(ms); diff --git a/src/host/layer23/src/mobile/gapk_io.c b/src/host/layer23/src/mobile/gapk_io.c index 997ed8a..966d0f4 100644 --- a/src/host/layer23/src/mobile/gapk_io.c +++ b/src/host/layer23/src/mobile/gapk_io.c @@ -36,7 +36,7 @@ #include <osmocom/bb/common/ms.h> #include <osmocom/bb/common/logging.h> -#include <osmocom/bb/mobile/voice.h> +#include <osmocom/bb/mobile/tch.h> #include <osmocom/bb/mobile/gapk_io.h> /* The RAW PCM format is common for both audio source and sink */ @@ -585,7 +585,7 @@ &gapk_io->tch_ul_fb_len); /* Push a voice frame to the lower layers */ - gsm_send_voice_msg(ms, tch_msg); + tch_send_voice_msg(ms, tch_msg); work |= 1; } diff --git a/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c b/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c index 4fe0b82..65e016d 100644 --- a/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c +++ b/src/host/layer23/src/mobile/gsm44068_gcc_bcc.c @@ -64,7 +64,7 @@ #include <osmocom/bb/mobile/mncc.h> #include <osmocom/bb/mobile/transaction.h> #include <osmocom/bb/mobile/gsm44068_gcc_bcc.h> -#include <osmocom/bb/mobile/voice.h> +#include <osmocom/bb/mobile/tch.h> #include <osmocom/bb/mobile/vty.h> #include <l1ctl_proto.h> diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c index 9691c68..4e26713 100644 --- a/src/host/layer23/src/mobile/gsm48_cc.c +++ b/src/host/layer23/src/mobile/gsm48_cc.c @@ -33,7 +33,7 @@ #include <osmocom/bb/mobile/transaction.h> #include <osmocom/bb/mobile/gsm48_cc.h> #include <osmocom/bb/mobile/gsm44068_gcc_bcc.h> -#include <osmocom/bb/mobile/voice.h> +#include <osmocom/bb/mobile/tch.h> #include <l1ctl_proto.h> static int gsm48_cc_tx_release(struct gsm_trans *trans, void *arg); @@ -1978,7 +1978,7 @@ case GSM_TCHH_FRAME: case GSM_TCH_FRAME_AMR: case GSM_BAD_FRAME: - return gsm_send_voice_frame(ms, arg); + return tch_send_voice_frame(ms, arg); case MNCC_LCHAN_MODIFY: return 0; case MNCC_FRAME_RECV: diff --git a/src/host/layer23/src/mobile/voice.c b/src/host/layer23/src/mobile/tch.c similarity index 85% rename from src/host/layer23/src/mobile/voice.c rename to src/host/layer23/src/mobile/tch.c index 699bd80..f6530fb 100644 --- a/src/host/layer23/src/mobile/voice.c +++ b/src/host/layer23/src/mobile/tch.c @@ -31,10 +31,10 @@ #include <osmocom/bb/mobile/gapk_io.h> #include <osmocom/bb/mobile/mncc.h> #include <osmocom/bb/mobile/mncc_sock.h> -#include <osmocom/bb/mobile/voice.h> +#include <osmocom/bb/mobile/tch.h> /* Forward a Downlink voice frame to the external MNCC handler */ -static int gsm_forward_mncc(struct osmocom_ms *ms, struct msgb *msg) +static int tch_forward_mncc(struct osmocom_ms *ms, struct msgb *msg) { struct gsm_data_frame *mncc; @@ -74,16 +74,16 @@ } /* Receive a Downlink voice frame from the lower layers */ -static int gsm_recv_voice(struct osmocom_ms *ms, struct msgb *msg) +static int tch_recv_voice(struct osmocom_ms *ms, struct msgb *msg) { switch (ms->settings.tch_voice.io_handler) { case TCH_VOICE_IOH_LOOPBACK: /* Remove the DL info header */ msgb_pull_to_l2(msg); /* Send voice frame back */ - return gsm_send_voice_msg(ms, msg); + return tch_send_voice_msg(ms, msg); case TCH_VOICE_IOH_MNCC_SOCK: - return gsm_forward_mncc(ms, msg); + return tch_forward_mncc(ms, msg); case TCH_VOICE_IOH_GAPK: #ifdef WITH_GAPK_IO /* Enqueue a frame to the DL TCH buffer */ @@ -103,14 +103,14 @@ } /* Send an Uplink voice frame to the lower layers */ -int gsm_send_voice_msg(struct osmocom_ms *ms, struct msgb *msg) +int tch_send_voice_msg(struct osmocom_ms *ms, struct msgb *msg) { /* Forward to RR */ return gsm48_rr_tx_traffic(ms, msg); } -/* gsm_send_voice_msg() wrapper accepting an MNCC structure */ -int gsm_send_voice_frame(struct osmocom_ms *ms, const struct gsm_data_frame *frame) +/* tch_send_voice_msg() wrapper accepting an MNCC structure */ +int tch_send_voice_frame(struct osmocom_ms *ms, const struct gsm_data_frame *frame) { struct msgb *nmsg; int len; @@ -139,13 +139,13 @@ nmsg->l2h = msgb_put(nmsg, len); memcpy(nmsg->l2h, frame->data, len); - return gsm_send_voice_msg(ms, nmsg); + return tch_send_voice_msg(ms, nmsg); } -/* Initialize voice router */ -int gsm_voice_init(struct osmocom_ms *ms) +/* Initialize the TCH router */ +int tch_init(struct osmocom_ms *ms) { - ms->l1_entity.l1_traffic_ind = gsm_recv_voice; + ms->l1_entity.l1_traffic_ind = tch_recv_voice; return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34917?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I05e1ae777add73672db61565c77c68d8ab2b08f0 Gerrit-Change-Number: 34917 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmocom-bb[master]: mobile: rename 'audio' node to 'tch-voice' node
by fixeria 03 Nov '23

03 Nov '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34911?usp=email ) Change subject: mobile: rename 'audio' node to 'tch-voice' node ...................................................................... mobile: rename 'audio' node to 'tch-voice' node Change-Id: I2cab597c5de92ecb343cad7aaaa48035ca5f8365 Related: OS#4396 --- M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/src/mobile/vty_interface.c 2 files changed, 37 insertions(+), 20 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/mobile/vty.h b/src/host/layer23/include/osmocom/bb/mobile/vty.h index 511348b..b681440 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/vty.h +++ b/src/host/layer23/include/osmocom/bb/mobile/vty.h @@ -10,7 +10,7 @@ enum ms_vty_node { SUPPORT_NODE = _LAST_L23VTY_NODE + 1, - AUDIO_NODE, + TCH_VOICE_NODE, VGCS_NODE, VBS_NODE, }; diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index e79a5a1..a91ab77 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -49,9 +49,9 @@ 1 }; -struct cmd_node audio_node = { - AUDIO_NODE, - "%s(audio)# ", +struct cmd_node tch_voice_node = { + TCH_VOICE_NODE, + "%s(tch-voice)# ", 1 }; @@ -1475,7 +1475,7 @@ vty_out(vty, " %sasci-allow-any%s", (set->asci_allow_any) ? "" : "no ", VTY_NEWLINE); - vty_out(vty, " audio%s", VTY_NEWLINE); + vty_out(vty, " tch-voice%s", VTY_NEWLINE); vty_out(vty, " io-handler %s%s", audio_io_handler_name(set->audio.io_handler), VTY_NEWLINE); if (set->audio.io_handler == AUDIO_IOH_GAPK) { @@ -2477,14 +2477,20 @@ SUP_EN_DI(vgcs, "vgcs", "Voice Group Call Service (VGCS)", 0); SUP_EN_DI(vbs, "vbs", "Voice Broadcast Service (VBS)", 0); -/* per audio config */ -DEFUN(cfg_ms_audio, cfg_ms_audio_cmd, "audio", - "Configure audio settings") +/* TCH config */ +DEFUN(cfg_ms_tch_voice, + cfg_ms_tch_voice_cmd, + "tch-voice", "Configure TCH (Traffic CHannel) params for voice calls\n") { - vty->node = AUDIO_NODE; + vty->node = TCH_VOICE_NODE; return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_ms_tch_voice, /* alias to 'tch-voice' */ + cfg_ms_audio_cmd, + "audio", "(deprecated alias for 'tch-voice')\n"); + + static int set_audio_io_handler(struct vty *vty, enum audio_io_handler val) { struct osmocom_ms *ms = (struct osmocom_ms *) vty->index; @@ -2501,7 +2507,7 @@ return CMD_SUCCESS; } -DEFUN(cfg_ms_audio_io_handler, cfg_ms_audio_io_handler_cmd, +DEFUN(cfg_ms_tch_voice_io_handler, cfg_ms_tch_voice_io_handler_cmd, "io-handler (none|gapk|l1phy|mncc-sock|loopback)", "Set TCH frame I/O handler\n" "No handler, drop TCH frames (default)\n" @@ -2531,13 +2537,13 @@ return set_audio_io_handler(vty, val); } -DEFUN(cfg_ms_audio_no_io_handler, cfg_ms_audio_no_io_handler_cmd, +DEFUN(cfg_ms_tch_voice_no_io_handler, cfg_ms_tch_voice_no_io_handler_cmd, "no io-handler", NO_STR "Disable TCH frame processing") { return set_audio_io_handler(vty, AUDIO_IOH_NONE); } -DEFUN(cfg_ms_audio_io_tch_format, cfg_ms_audio_io_tch_format_cmd, +DEFUN(cfg_ms_tch_voice_io_tch_format, cfg_ms_tch_voice_io_tch_format_cmd, "io-tch-format (rtp|ti)", "Set TCH I/O frame format used by the L1 PHY (for GAPK only)\n" "RTP format (RFC3551 for FR/EFR, RFC5993 for HR, RFC4867 for AMR)\n" @@ -2558,7 +2564,7 @@ return CMD_SUCCESS; } -DEFUN(cfg_ms_audio_alsa_out_dev, cfg_ms_audio_alsa_out_dev_cmd, +DEFUN(cfg_ms_tch_voice_alsa_out_dev, cfg_ms_tch_voice_alsa_out_dev_cmd, "alsa-output-dev (default|NAME)", "Set ALSA output (playback) device name (for GAPK only)\n" "Default system playback device (default)\n" @@ -2572,7 +2578,7 @@ return CMD_SUCCESS; } -DEFUN(cfg_ms_audio_alsa_in_dev, cfg_ms_audio_alsa_in_dev_cmd, +DEFUN(cfg_ms_tch_voice_alsa_in_dev, cfg_ms_tch_voice_alsa_in_dev_cmd, "alsa-input-dev (default|NAME)", "Set ALSA input (capture) device name (for GAPK only)\n" "Default system recording device (default)\n" @@ -2757,6 +2763,7 @@ install_element(MS_NODE, &cfg_ms_no_codec_half_cmd); install_element(MS_NODE, &cfg_ms_abbrev_cmd); install_element(MS_NODE, &cfg_ms_no_abbrev_cmd); + install_element(MS_NODE, &cfg_ms_tch_voice_cmd); install_element(MS_NODE, &cfg_ms_audio_cmd); install_element(MS_NODE, &cfg_ms_neighbour_cmd); install_element(MS_NODE, &cfg_ms_no_neighbour_cmd); @@ -2842,12 +2849,12 @@ install_element(MS_NODE, &cfg_ms_script_load_run_cmd); install_element(MS_NODE, &cfg_ms_no_script_load_run_cmd); - install_node(&audio_node, config_write_dummy); - install_element(AUDIO_NODE, &cfg_ms_audio_io_handler_cmd); - install_element(AUDIO_NODE, &cfg_ms_audio_no_io_handler_cmd); - install_element(AUDIO_NODE, &cfg_ms_audio_io_tch_format_cmd); - install_element(AUDIO_NODE, &cfg_ms_audio_alsa_out_dev_cmd); - install_element(AUDIO_NODE, &cfg_ms_audio_alsa_in_dev_cmd); + install_node(&tch_voice_node, config_write_dummy); + install_element(TCH_VOICE_NODE, &cfg_ms_tch_voice_io_handler_cmd); + install_element(TCH_VOICE_NODE, &cfg_ms_tch_voice_no_io_handler_cmd); + install_element(TCH_VOICE_NODE, &cfg_ms_tch_voice_io_tch_format_cmd); + install_element(TCH_VOICE_NODE, &cfg_ms_tch_voice_alsa_out_dev_cmd); + install_element(TCH_VOICE_NODE, &cfg_ms_tch_voice_alsa_in_dev_cmd); return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34911?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I2cab597c5de92ecb343cad7aaaa48035ca5f8365 Gerrit-Change-Number: 34911 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmocom-bb[master]: mobile: clarify TCH I/O {handler,format} naming
by fixeria 03 Nov '23

03 Nov '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34912?usp=email ) Change subject: mobile: clarify TCH I/O {handler,format} naming ...................................................................... mobile: clarify TCH I/O {handler,format} naming Before we add handling of TCH I/O for data calls, let's rename the existing voice related symbols and struct fields to have 'voice' in their names. Change-Id: If6c799d11e225ad00ca5da5ae63dca20568a0ce0 Related: OS#4396 --- M src/host/layer23/include/osmocom/bb/common/settings.h M src/host/layer23/src/common/settings.c M src/host/layer23/src/mobile/gapk_io.c M src/host/layer23/src/mobile/gsm48_rr.c M src/host/layer23/src/mobile/voice.c M src/host/layer23/src/mobile/vty_interface.c 6 files changed, 92 insertions(+), 78 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h b/src/host/layer23/include/osmocom/bb/common/settings.h index 468e8cd..458828a 100644 --- a/src/host/layer23/include/osmocom/bb/common/settings.h +++ b/src/host/layer23/include/osmocom/bb/common/settings.h @@ -26,39 +26,39 @@ MNCC_HANDLER_DUMMY, }; -/* TCH frame I/O handler */ -enum audio_io_handler { +/* TCH I/O handler for voice calls */ +enum tch_voice_io_handler { /* No handler, drop frames */ - AUDIO_IOH_NONE = 0, + TCH_VOICE_IOH_NONE = 0, /* libosmo-gapk based handler */ - AUDIO_IOH_GAPK, + TCH_VOICE_IOH_GAPK, /* L1 PHY (e.g. Calypso DSP) */ - AUDIO_IOH_L1PHY, + TCH_VOICE_IOH_L1PHY, /* External MNCC app (via MNCC socket) */ - AUDIO_IOH_MNCC_SOCK, + TCH_VOICE_IOH_MNCC_SOCK, /* Return to sender */ - AUDIO_IOH_LOOPBACK, + TCH_VOICE_IOH_LOOPBACK, }; -extern const struct value_string audio_io_handler_names[]; -static inline const char *audio_io_handler_name(enum audio_io_handler val) -{ return get_value_string(audio_io_handler_names, val); } +extern const struct value_string tch_voice_io_handler_names[]; +static inline const char *tch_voice_io_handler_name(enum tch_voice_io_handler val) +{ return get_value_string(tch_voice_io_handler_names, val); } -/* TCH frame I/O format */ -enum audio_io_format { - /* RTP format (RFC3551 for FR/EFR, RFC5993 for HR, RFC4867 for AMR) */ - AUDIO_IOF_RTP, +/* TCH I/O format for voice calls */ +enum tch_voice_io_format { + /* RFC3551 for FR/EFR, RFC5993 for HR, RFC4867 for AMR */ + TCH_VOICE_IOF_RTP, /* Texas Instruments format, used by Calypso based phones (e.g. Motorola C1xx) */ - AUDIO_IOF_TI, + TCH_VOICE_IOF_TI, }; -extern const struct value_string audio_io_format_names[]; -static inline const char *audio_io_format_name(enum audio_io_format val) -{ return get_value_string(audio_io_format_names, val); } +extern const struct value_string tch_voice_io_format_names[]; +static inline const char *tch_voice_io_format_name(enum tch_voice_io_format val) +{ return get_value_string(tch_voice_io_format_names, val); } -struct audio_settings { - enum audio_io_handler io_handler; - enum audio_io_format io_format; +struct tch_voice_settings { + enum tch_voice_io_handler io_handler; + enum tch_voice_io_format io_format; char alsa_output_dev[128]; char alsa_input_dev[128]; }; @@ -121,8 +121,8 @@ /* MNCC handler */ enum mncc_handler_t mncc_handler; - /* Audio settings */ - struct audio_settings audio; + /* TCH settings */ + struct tch_voice_settings tch_voice; /* IMEI */ char imei[GSM23003_IMEI_NUM_DIGITS + 1]; diff --git a/src/host/layer23/src/common/settings.c b/src/host/layer23/src/common/settings.c index 5bae325..8768349 100644 --- a/src/host/layer23/src/common/settings.c +++ b/src/host/layer23/src/common/settings.c @@ -48,10 +48,10 @@ 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; - OSMO_STRLCPY_ARRAY(set->audio.alsa_output_dev, alsa_dev_default); - OSMO_STRLCPY_ARRAY(set->audio.alsa_input_dev, alsa_dev_default); + /* TCH voice: drop frames by default */ + set->tch_voice.io_handler = TCH_VOICE_IOH_NONE; + OSMO_STRLCPY_ARRAY(set->tch_voice.alsa_output_dev, alsa_dev_default); + OSMO_STRLCPY_ARRAY(set->tch_voice.alsa_input_dev, alsa_dev_default); /* Built-in MNCC handler */ set->mncc_handler = MNCC_HANDLER_INTERNAL; @@ -226,18 +226,18 @@ return 0; } -const struct value_string audio_io_handler_names[] = { - { AUDIO_IOH_NONE, "none" }, - { AUDIO_IOH_GAPK, "gapk" }, - { AUDIO_IOH_L1PHY, "l1phy" }, - { AUDIO_IOH_MNCC_SOCK, "mncc-sock" }, - { AUDIO_IOH_LOOPBACK, "loopback" }, +const struct value_string tch_voice_io_handler_names[] = { + { TCH_VOICE_IOH_NONE, "none" }, + { TCH_VOICE_IOH_GAPK, "gapk" }, + { TCH_VOICE_IOH_L1PHY, "l1phy" }, + { TCH_VOICE_IOH_MNCC_SOCK, "mncc-sock" }, + { TCH_VOICE_IOH_LOOPBACK, "loopback" }, { 0, NULL } }; -const struct value_string audio_io_format_names[] = { - { AUDIO_IOF_RTP, "rtp" }, - { AUDIO_IOF_TI, "ti" }, +const struct value_string tch_voice_io_format_names[] = { + { TCH_VOICE_IOF_RTP, "rtp" }, + { TCH_VOICE_IOF_TI, "ti" }, { 0, NULL } }; diff --git a/src/host/layer23/src/mobile/gapk_io.c b/src/host/layer23/src/mobile/gapk_io.c index a2a4e84..997ed8a 100644 --- a/src/host/layer23/src/mobile/gapk_io.c +++ b/src/host/layer23/src/mobile/gapk_io.c @@ -409,16 +409,16 @@ return -ENOTSUP; } - switch (set->audio.io_format) { - case AUDIO_IOF_RTP: + switch (set->tch_voice.io_format) { + case TCH_VOICE_IOF_RTP: phy_fmt = phy_fmt_pick_rtp(codec); break; - case AUDIO_IOF_TI: + case TCH_VOICE_IOF_TI: phy_fmt = phy_fmt_pick_ti(codec); break; default: LOGP(DGAPK, LOGL_ERROR, "Unhandled I/O format %s\n", - audio_io_format_name(set->audio.io_format)); + tch_voice_io_format_name(set->tch_voice.io_format)); return -ENOTSUP; } @@ -447,8 +447,8 @@ osmo_gapk_set_talloc_ctx(gapk_io); /* Prepare both source and sink chains */ - rc |= prepare_audio_source(gapk_io, set->audio.alsa_input_dev); - rc |= prepare_audio_sink(gapk_io, set->audio.alsa_output_dev); + rc |= prepare_audio_source(gapk_io, set->tch_voice.alsa_input_dev); + rc |= prepare_audio_sink(gapk_io, set->tch_voice.alsa_output_dev); /* Fall back to ms instance */ osmo_gapk_set_talloc_ctx(ms); diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index a9dfec7..00e51a8 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -4428,7 +4428,7 @@ #ifdef WITH_GAPK_IO /* Poke GAPK audio back-end, if it is chosen */ - if (ms->settings.audio.io_handler == AUDIO_IOH_GAPK) { + if (ms->settings.tch_voice.io_handler == TCH_VOICE_IOH_GAPK) { int rc = gapk_io_init_ms_chan(ms, ch_type, mode); if (rc) return rc; @@ -4983,7 +4983,7 @@ #ifdef WITH_GAPK_IO /* Poke GAPK audio back-end, if it is chosen */ - if (ms->settings.audio.io_handler == AUDIO_IOH_GAPK) + if (ms->settings.tch_voice.io_handler == TCH_VOICE_IOH_GAPK) gapk_io_init_ms_chan(ms, ch_type, cda->mode); #endif @@ -7022,16 +7022,16 @@ rr->tch_loop_mode = L1CTL_TCH_LOOP_OPEN; /* Configure audio handling in the L1PHY */ - switch (ms->settings.audio.io_handler) { - case AUDIO_IOH_L1PHY: + switch (ms->settings.tch_voice.io_handler) { + case TCH_VOICE_IOH_L1PHY: rr->audio_mode = AUDIO_RX_SPEAKER | AUDIO_TX_MICROPHONE; break; - case AUDIO_IOH_MNCC_SOCK: - case AUDIO_IOH_LOOPBACK: - case AUDIO_IOH_GAPK: + case TCH_VOICE_IOH_MNCC_SOCK: + case TCH_VOICE_IOH_LOOPBACK: + case TCH_VOICE_IOH_GAPK: rr->audio_mode = AUDIO_RX_TRAFFIC_IND | AUDIO_TX_TRAFFIC_REQ; break; - case AUDIO_IOH_NONE: + case TCH_VOICE_IOH_NONE: rr->audio_mode = 0x00; } @@ -7150,7 +7150,7 @@ struct gsm48_rrlayer *rr = &ms->rrlayer; uint8_t ch_type, ch_subch, ch_ts; - if (ms->settings.audio.io_handler != AUDIO_IOH_NONE) + if (ms->settings.tch_voice.io_handler != TCH_VOICE_IOH_NONE) return 0; LOGP(DRR, LOGL_INFO, "setting audio mode to %d\n", mode); diff --git a/src/host/layer23/src/mobile/voice.c b/src/host/layer23/src/mobile/voice.c index acc0dce..9b3ffdc 100644 --- a/src/host/layer23/src/mobile/voice.c +++ b/src/host/layer23/src/mobile/voice.c @@ -76,15 +76,15 @@ /* Receive a Downlink voice frame from the lower layers */ static int gsm_recv_voice(struct osmocom_ms *ms, struct msgb *msg) { - switch (ms->settings.audio.io_handler) { - case AUDIO_IOH_LOOPBACK: + switch (ms->settings.tch_voice.io_handler) { + case TCH_VOICE_IOH_LOOPBACK: /* Remove the DL info header */ msgb_pull_to_l2(msg); /* Send voice frame back */ return gsm_send_voice_msg(ms, msg); - case AUDIO_IOH_MNCC_SOCK: + case TCH_VOICE_IOH_MNCC_SOCK: return gsm_forward_mncc(ms, msg); - case AUDIO_IOH_GAPK: + case TCH_VOICE_IOH_GAPK: #ifdef WITH_GAPK_IO /* Enqueue a frame to the DL TCH buffer */ if (ms->gapk_io != NULL) @@ -93,8 +93,8 @@ msgb_free(msg); break; #endif - case AUDIO_IOH_L1PHY: - case AUDIO_IOH_NONE: + case TCH_VOICE_IOH_L1PHY: + case TCH_VOICE_IOH_NONE: /* Drop voice frame */ msgb_free(msg); } diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index a91ab77..d6bac5a 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1477,14 +1477,14 @@ vty_out(vty, " tch-voice%s", VTY_NEWLINE); vty_out(vty, " io-handler %s%s", - audio_io_handler_name(set->audio.io_handler), VTY_NEWLINE); - if (set->audio.io_handler == AUDIO_IOH_GAPK) { + tch_voice_io_handler_name(set->tch_voice.io_handler), VTY_NEWLINE); + if (set->tch_voice.io_handler == TCH_VOICE_IOH_GAPK) { vty_out(vty, " io-tch-format %s%s", - audio_io_format_name(set->audio.io_format), VTY_NEWLINE); + tch_voice_io_format_name(set->tch_voice.io_format), VTY_NEWLINE); vty_out(vty, " alsa-output-dev %s%s", - set->audio.alsa_output_dev, VTY_NEWLINE); + &set->tch_voice.alsa_output_dev[0], VTY_NEWLINE); vty_out(vty, " alsa-input-dev %s%s", - set->audio.alsa_input_dev, VTY_NEWLINE); + &set->tch_voice.alsa_input_dev[0], VTY_NEWLINE); } if (ms->lua_script) @@ -2491,15 +2491,15 @@ "audio", "(deprecated alias for 'tch-voice')\n"); -static int set_audio_io_handler(struct vty *vty, enum audio_io_handler val) +static int set_tch_voice_io_handler(struct vty *vty, enum tch_voice_io_handler val) { struct osmocom_ms *ms = (struct osmocom_ms *) vty->index; struct gsm_settings *set = &ms->settings; /* Don't restart on unchanged value */ - if (val == set->audio.io_handler) + if (val == set->tch_voice.io_handler) return CMD_SUCCESS; - set->audio.io_handler = val; + set->tch_voice.io_handler = val; /* Restart required */ vty_restart_if_started(vty, ms); @@ -2509,7 +2509,7 @@ DEFUN(cfg_ms_tch_voice_io_handler, cfg_ms_tch_voice_io_handler_cmd, "io-handler (none|gapk|l1phy|mncc-sock|loopback)", - "Set TCH frame I/O handler\n" + "Set TCH frame I/O handler for voice calls\n" "No handler, drop TCH frames (default)\n" "libosmo-gapk based I/O handler (requires ALSA)\n" "L1 PHY (e.g. Calypso DSP in Motorola C1xx phones)\n" @@ -2517,30 +2517,30 @@ "Return TCH frame payload back to sender\n") { struct osmocom_ms *ms = (struct osmocom_ms *) vty->index; - int val = get_string_value(audio_io_handler_names, argv[0]); + int val = get_string_value(tch_voice_io_handler_names, argv[0]); - if (val == AUDIO_IOH_MNCC_SOCK) { + if (val == TCH_VOICE_IOH_MNCC_SOCK) { if (ms->settings.mncc_handler != MNCC_HANDLER_INTERNAL) { - vty_out(vty, "Audio I/O handler 'mncc-sock' can only be used " + vty_out(vty, "TCH voice I/O handler 'mncc-sock' can only be used " "with MNCC handler 'external'%s", VTY_NEWLINE); return CMD_WARNING; } } #ifndef WITH_GAPK_IO - if (val == AUDIO_IOH_GAPK) { + if (val == TCH_VOICE_IOH_GAPK) { vty_out(vty, "GAPK I/O is not compiled in (--with-gapk-io)%s", VTY_NEWLINE); return CMD_WARNING; } #endif - return set_audio_io_handler(vty, val); + return set_tch_voice_io_handler(vty, val); } DEFUN(cfg_ms_tch_voice_no_io_handler, cfg_ms_tch_voice_no_io_handler_cmd, - "no io-handler", NO_STR "Disable TCH frame processing") + "no io-handler", NO_STR "Disable TCH frame handling for voice calls\n") { - return set_audio_io_handler(vty, AUDIO_IOH_NONE); + return set_tch_voice_io_handler(vty, TCH_VOICE_IOH_NONE); } DEFUN(cfg_ms_tch_voice_io_tch_format, cfg_ms_tch_voice_io_tch_format_cmd, @@ -2549,17 +2549,17 @@ "RTP format (RFC3551 for FR/EFR, RFC5993 for HR, RFC4867 for AMR)\n" "Texas Instruments format, used by Calypso based phones (e.g. Motorola C1xx)\n") { - int val = get_string_value(audio_io_format_names, argv[0]); + int val = get_string_value(tch_voice_io_format_names, argv[0]); struct osmocom_ms *ms = (struct osmocom_ms *) vty->index; struct gsm_settings *set = &ms->settings; - if (set->audio.io_handler != AUDIO_IOH_GAPK) { + if (set->tch_voice.io_handler != TCH_VOICE_IOH_GAPK) { vty_out(vty, "This parameter is only valid for GAPK%s", VTY_NEWLINE); return CMD_WARNING; } OSMO_ASSERT(val >= 0); - set->audio.io_format = val; + set->tch_voice.io_format = val; return CMD_SUCCESS; } @@ -2573,7 +2573,7 @@ struct osmocom_ms *ms = vty->index; struct gsm_settings *set = &ms->settings; - OSMO_STRLCPY_ARRAY(set->audio.alsa_output_dev, argv[0]); + OSMO_STRLCPY_ARRAY(set->tch_voice.alsa_output_dev, argv[0]); return CMD_SUCCESS; } @@ -2587,7 +2587,7 @@ struct osmocom_ms *ms = vty->index; struct gsm_settings *set = &ms->settings; - OSMO_STRLCPY_ARRAY(set->audio.alsa_input_dev, argv[0]); + OSMO_STRLCPY_ARRAY(set->tch_voice.alsa_input_dev, argv[0]); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34912?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: If6c799d11e225ad00ca5da5ae63dca20568a0ce0 Gerrit-Change-Number: 34912 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[L] Change in osmocom-bb[master]: mobile: add support for Circuit Switched Data calls
by fixeria 03 Nov '23

03 Nov '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34762?usp=email ) Change subject: mobile: add support for Circuit Switched Data calls ...................................................................... mobile: add support for Circuit Switched Data calls This patch implements the signalling part for mobile originating and mobile terminating CSD calls. The user plane interface is to be implemented in follow-up patches. Change-Id: I1995fa0a7a68d9b980852b664d472d4633777ac6 Related: OS#4396 --- M src/host/layer23/include/osmocom/bb/common/settings.h M src/host/layer23/include/osmocom/bb/common/support.h M src/host/layer23/include/osmocom/bb/mobile/mncc_ms.h M src/host/layer23/src/common/settings.c M src/host/layer23/src/common/support.c M src/host/layer23/src/mobile/gsm48_rr.c M src/host/layer23/src/mobile/mnccms.c M src/host/layer23/src/mobile/vty_interface.c 8 files changed, 530 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h b/src/host/layer23/include/osmocom/bb/common/settings.h index 3b9473f..468e8cd 100644 --- a/src/host/layer23/include/osmocom/bb/common/settings.h +++ b/src/host/layer23/include/osmocom/bb/common/settings.h @@ -1,6 +1,8 @@ #ifndef _settings_h #define _settings_h +#include <stdbool.h> + #include <osmocom/core/utils.h> #include <osmocom/core/linuxlist.h> #include <osmocom/gsm/protocol/gsm_23_003.h> @@ -82,6 +84,35 @@ } locigprs; }; +enum data_call_type { + DATA_CALL_TYPE_ISDN, + DATA_CALL_TYPE_ANALOG, +}; + +enum data_call_rate { + DATA_CALL_RATE_V110_300, + DATA_CALL_RATE_V110_1200, + DATA_CALL_RATE_V110_2400, + DATA_CALL_RATE_V110_4800, + DATA_CALL_RATE_V110_9600, + DATA_CALL_RATE_V110_14400, +}; + +/* Connection Element (transparency) */ +enum data_call_ce { + DATA_CALL_CE_TRANSP, + DATA_CALL_CE_TRANSP_PREF, + DATA_CALL_CE_NON_TRANSP, + DATA_CALL_CE_NON_TRANSP_PREF, +}; + +/* Data (CSD) call parameters */ +struct data_call_params { + enum data_call_type type; + enum data_call_rate rate; + enum data_call_ce ce; +}; + struct gsm_settings { char layer2_socket_path[128]; char sap_socket_path[128]; @@ -161,6 +192,14 @@ uint8_t ch_cap; /* channel capability */ int8_t min_rxlev_dbm; /* min dBm to access */ + /* CSD modes */ + bool csd_tch_f144; + bool csd_tch_f96; + bool csd_tch_f48; + bool csd_tch_h48; + bool csd_tch_f24; + bool csd_tch_h24; + /* support for ASCI */ bool vgcs; /* support of VGCS */ bool vbs; /* support of VBS */ @@ -192,6 +231,11 @@ /* ASCI settings */ bool uplink_release_local; bool asci_allow_any; + + /* call parameters */ + struct { + struct data_call_params data; + } call_params; }; struct gsm_settings_abbrev { diff --git a/src/host/layer23/include/osmocom/bb/common/support.h b/src/host/layer23/include/osmocom/bb/common/support.h index 2fae57e..b0c71f5 100644 --- a/src/host/layer23/include/osmocom/bb/common/support.h +++ b/src/host/layer23/include/osmocom/bb/common/support.h @@ -91,6 +91,14 @@ uint8_t half_v1; uint8_t half_v3; + /* CSD modes */ + uint8_t csd_tch_f144; + uint8_t csd_tch_f96; + uint8_t csd_tch_f48; + uint8_t csd_tch_h48; + uint8_t csd_tch_f24; + uint8_t csd_tch_h24; + /* EDGE / UMTS / CDMA */ uint8_t edge_ms_sup; uint8_t edge_psk_sup; diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc_ms.h b/src/host/layer23/include/osmocom/bb/mobile/mncc_ms.h index 4006688..05c539b 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/mncc_ms.h +++ b/src/host/layer23/include/osmocom/bb/mobile/mncc_ms.h @@ -7,12 +7,20 @@ struct osmocom_ms; +enum gsm_call_type { + GSM_CALL_T_UNKNOWN = 0, + GSM_CALL_T_VOICE, + GSM_CALL_T_DATA, /* UDI or 3.1 kHz audio */ + GSM_CALL_T_DATA_FAX, +}; + struct gsm_call { struct llist_head entry; struct osmocom_ms *ms; uint32_t callref; + enum gsm_call_type type; bool init; /* call initiated, no response yet */ bool hold; /* call on hold */ @@ -24,7 +32,8 @@ char dtmf[32]; /* dtmf sequence */ }; -int mncc_call(struct osmocom_ms *ms, const char *number); +int mncc_call(struct osmocom_ms *ms, const char *number, + enum gsm_call_type call_type); int mncc_hangup(struct osmocom_ms *ms); int mncc_answer(struct osmocom_ms *ms); int mncc_hold(struct osmocom_ms *ms); diff --git a/src/host/layer23/src/common/settings.c b/src/host/layer23/src/common/settings.c index e79a6a1..5bae325 100644 --- a/src/host/layer23/src/common/settings.c +++ b/src/host/layer23/src/common/settings.c @@ -100,6 +100,14 @@ set->ch_cap = sup->ch_cap; set->min_rxlev_dbm = sup->min_rxlev_dbm; set->dsc_max = sup->dsc_max; + + set->csd_tch_f144 = sup->csd_tch_f144; + set->csd_tch_f96 = sup->csd_tch_f96; + set->csd_tch_f48 = sup->csd_tch_f48; + set->csd_tch_h48 = sup->csd_tch_h48; + set->csd_tch_f24 = sup->csd_tch_f24; + set->csd_tch_h24 = sup->csd_tch_h24; + set->vgcs = sup->vgcs; set->vbs = sup->vbs; @@ -118,6 +126,12 @@ set->uplink_release_local = true; + set->call_params.data = (struct data_call_params) { + .type = DATA_CALL_TYPE_ISDN, + .rate = DATA_CALL_RATE_V110_9600, + .ce = DATA_CALL_CE_TRANSP, + }; + return 0; } diff --git a/src/host/layer23/src/common/support.c b/src/host/layer23/src/common/support.c index 2f93016..ed51465 100644 --- a/src/host/layer23/src/common/support.c +++ b/src/host/layer23/src/common/support.c @@ -97,6 +97,14 @@ sup->full_v3 = 0; sup->half_v1 = 1; sup->half_v3 = 0; + + /* CSD modes */ + sup->csd_tch_f144 = 1; + sup->csd_tch_f96 = 1; + sup->csd_tch_f48 = 1; + sup->csd_tch_h48 = 1; + sup->csd_tch_f24 = 1; + sup->csd_tch_h24 = 1; } /* (3.2.1) maximum channels to scan within each band */ @@ -173,6 +181,14 @@ print(priv, " Full-Rate V3 : %s\n", SUP_SET(full_v3)); print(priv, " Half-Rate V1 : %s\n", SUP_SET(half_v1)); print(priv, " Half-Rate V3 : %s\n", SUP_SET(half_v3)); + + print(priv, " CSD TCH/F14.4: %s\n", SUP_SET(csd_tch_f144)); + print(priv, " CSD TCH/F9.6 : %s\n", SUP_SET(csd_tch_f96)); + print(priv, " CSD TCH/F4.8 : %s\n", SUP_SET(csd_tch_f48)); + print(priv, " CSD TCH/H4.8 : %s\n", SUP_SET(csd_tch_h48)); + print(priv, " CSD TCH/F2.4 : %s\n", SUP_SET(csd_tch_f24)); + print(priv, " CSD TCH/H2.4 : %s\n", SUP_SET(csd_tch_h24)); + print(priv, " Min RXLEV : %d\n", set->min_rxlev_dbm); } diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index b898090..a9dfec7 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -374,6 +374,56 @@ LOGP(DRR, LOGL_INFO, "Mode: half-rate speech V3\n"); } break; + case GSM48_CMODE_DATA_14k5: + if (ch_type != RSL_CHAN_Bm_ACCHs) { + LOGP(DRR, LOGL_ERROR, "TCH/F is expected for mode %s\n", + gsm48_chan_mode_name(mode)); + return GSM48_RR_CAUSE_CHAN_MODE_UNACCT; + } else if (!set->csd_tch_f144) { + LOGP(DRR, LOGL_ERROR, "Not supporting TCH/F14.4 data (%s)\n", + gsm48_chan_mode_name(mode)); + return GSM48_RR_CAUSE_CHAN_MODE_UNACCT; + } + LOGP(DRR, LOGL_INFO, "Mode: TCH/F14.4 data (%s)\n", + gsm48_chan_mode_name(mode)); + break; + case GSM48_CMODE_DATA_12k0: + if (ch_type != RSL_CHAN_Bm_ACCHs) { + LOGP(DRR, LOGL_ERROR, "TCH/F is expected for mode %s\n", + gsm48_chan_mode_name(mode)); + return GSM48_RR_CAUSE_CHAN_MODE_UNACCT; + } else if (!set->csd_tch_f96) { + LOGP(DRR, LOGL_ERROR, "Not supporting TCH/F9.6 data (%s)\n", + gsm48_chan_mode_name(mode)); + return GSM48_RR_CAUSE_CHAN_MODE_UNACCT; + } + LOGP(DRR, LOGL_INFO, "Mode: TCH/F9.6 data (%s)\n", + gsm48_chan_mode_name(mode)); + break; + case GSM48_CMODE_DATA_6k0: + if ((ch_type == RSL_CHAN_Bm_ACCHs && !set->csd_tch_f48) + || (ch_type == RSL_CHAN_Lm_ACCHs && !set->csd_tch_h48)) { + LOGP(DRR, LOGL_ERROR, "Not supporting TCH/%c4.8 data (%s)\n", + ch_type == RSL_CHAN_Bm_ACCHs ? 'F' : 'H', + gsm48_chan_mode_name(mode)); + return GSM48_RR_CAUSE_CHAN_MODE_UNACCT; + } + LOGP(DRR, LOGL_INFO, "Mode: TCH/%c4.8 data (%s)\n", + ch_type == RSL_CHAN_Bm_ACCHs ? 'F' : 'H', + gsm48_chan_mode_name(mode)); + break; + case GSM48_CMODE_DATA_3k6: + if ((ch_type == RSL_CHAN_Bm_ACCHs && !set->csd_tch_f24) + || (ch_type == RSL_CHAN_Lm_ACCHs && !set->csd_tch_h24)) { + LOGP(DRR, LOGL_ERROR, "Not supporting TCH/%c2.4 data (%s)\n", + ch_type == RSL_CHAN_Bm_ACCHs ? 'F' : 'H', + gsm48_chan_mode_name(mode)); + return GSM48_RR_CAUSE_CHAN_MODE_UNACCT; + } + LOGP(DRR, LOGL_INFO, "Mode: TCH/%c2.4 data (%s)\n", + ch_type == RSL_CHAN_Bm_ACCHs ? 'F' : 'H', + gsm48_chan_mode_name(mode)); + break; default: LOGP(DRR, LOGL_ERROR, "Mode 0x%02x not supported!\n", mode); return GSM48_RR_CAUSE_CHAN_MODE_UNACCT; diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c index d23fbb7..8427191 100644 --- a/src/host/layer23/src/mobile/mnccms.c +++ b/src/host/layer23/src/mobile/mnccms.c @@ -35,6 +35,13 @@ static uint32_t new_callref = 1; static LLIST_HEAD(call_list); +static const char * const gsm_call_type_str[] = { + [GSM_CALL_T_UNKNOWN] = "unknown", + [GSM_CALL_T_VOICE] = "voice", + [GSM_CALL_T_DATA] = "data", + [GSM_CALL_T_DATA_FAX] = "fax", +}; + static int dtmf_statemachine(struct gsm_call *call, const struct gsm_mncc *mncc); static void timeout_dtmf(void *arg); @@ -134,9 +141,9 @@ return speech_ver; } -static void mncc_set_bearer(struct gsm_mncc *mncc, - const struct gsm_settings *set, - int8_t speech_ver) +static void mncc_set_bcap_speech(struct gsm_mncc *mncc, + const struct gsm_settings *set, + int speech_ver) { int i = 0; @@ -192,6 +199,116 @@ mncc->bearer_cap.mode = GSM48_BCAP_TMOD_CIRCUIT; } +static void mncc_set_bcap_data(struct gsm_mncc *mncc, + const struct gsm_settings *set, + enum gsm_call_type call_type) +{ + const struct data_call_params *cp = &set->call_params.data; + struct gsm_mncc_bearer_cap *bcap = &mncc->bearer_cap; + + mncc->fields |= MNCC_F_BEARER_CAP; + + *bcap = (struct gsm_mncc_bearer_cap) { + /* .transfer is set below */ + .mode = GSM48_BCAP_TMOD_CIRCUIT, + .coding = GSM48_BCAP_CODING_GSM_STD, + /* .radio is set below */ + .data = { + /* TODO: make these fields configurable via *set */ + .rate_adaption = GSM48_BCAP_RA_V110_X30, + .sig_access = GSM48_BCAP_SA_I440_I450, + .async = 1, + /* .transp is set below */ + .nr_data_bits = 8, + .parity = GSM48_BCAP_PAR_NONE, + .nr_stop_bits = 1, + /* .user_rate is set below */ + /* .interm_rate is set below */ + }, + }; + + /* Radio channel requirement (octet 3) */ + if (set->ch_cap == GSM_CAP_SDCCH_TCHF_TCHH) { + if (set->half_prefer) + bcap->radio = GSM48_BCAP_RRQ_DUAL_HR; + else + bcap->radio = GSM48_BCAP_RRQ_DUAL_FR; + LOGP(DMNCC, LOGL_INFO, " support TCH/H also\n"); + } else { + bcap->radio = GSM48_BCAP_RRQ_FR_ONLY; + LOGP(DMNCC, LOGL_INFO, " support TCH/F only\n"); + } + + /* Information transfer capability (octet 3) */ + switch (call_type) { + case GSM_CALL_T_DATA: + if (cp->type == DATA_CALL_TYPE_ISDN) + bcap->transfer = GSM_MNCC_BCAP_UNR_DIG; + else /* == DATA_CALL_TYPE_ANALOG */ + bcap->transfer = GSM_MNCC_BCAP_AUDIO; + break; + case GSM_CALL_T_DATA_FAX: + bcap->transfer = GSM_MNCC_BCAP_FAX_G3; + break; + case GSM_CALL_T_VOICE: + default: /* shall not happen */ + OSMO_ASSERT(0); + } + + /* User rate (octet 6a) */ + switch (cp->rate) { + case DATA_CALL_RATE_V110_300: + bcap->data.user_rate = GSM48_BCAP_UR_300; + bcap->data.interm_rate = GSM48_BCAP_IR_8k; + break; + case DATA_CALL_RATE_V110_1200: + bcap->data.user_rate = GSM48_BCAP_UR_1200; + bcap->data.interm_rate = GSM48_BCAP_IR_8k; + break; + case DATA_CALL_RATE_V110_2400: + bcap->data.user_rate = GSM48_BCAP_UR_2400; + bcap->data.interm_rate = GSM48_BCAP_IR_8k; + break; + case DATA_CALL_RATE_V110_4800: + bcap->data.user_rate = GSM48_BCAP_UR_4800; + bcap->data.interm_rate = GSM48_BCAP_IR_8k; + break; + case DATA_CALL_RATE_V110_9600: + bcap->data.user_rate = GSM48_BCAP_UR_9600; + bcap->data.interm_rate = GSM48_BCAP_IR_16k; + break; + case DATA_CALL_RATE_V110_14400: /* TODO: the bcap encoder does not support 14400 bps */ + LOGP(DMNCC, LOGL_INFO, " support for 14400 bps is incomplete\n"); + bcap->data.user_rate = GSM48_BCAP_UR_9600; + bcap->data.interm_rate = GSM48_BCAP_IR_16k; + break; + } + + /* Connection element (octet 6c) */ + switch (cp->ce) { + case DATA_CALL_CE_TRANSP: + bcap->data.transp = GSM48_BCAP_TR_TRANSP; + break; + case DATA_CALL_CE_TRANSP_PREF: + bcap->data.transp = GSM48_BCAP_TR_TR_PREF; + break; + case DATA_CALL_CE_NON_TRANSP: + bcap->data.transp = GSM48_BCAP_TR_RLP; + break; + case DATA_CALL_CE_NON_TRANSP_PREF: + bcap->data.transp = GSM48_BCAP_TR_RLP_PREF; + break; + } + + /* FAX calls are special (see 3GPP TS 24.008, Annex D.3) */ + if (call_type == GSM_CALL_T_DATA_FAX) { + bcap->data.rate_adaption = GSM48_BCAP_RA_NONE; + bcap->data.async = 0; /* shall be sync */ + bcap->data.transp = GSM48_BCAP_TR_TRANSP; + bcap->data.modem_type = GSM48_BCAP_MT_NONE; + } +} + /* Check the given Bearer Capability, select first supported speech codec version. * The choice between half-rate and full-rate is made based on current settings. * Return a selected codec or -1 if no speech codec was selected. */ @@ -249,6 +366,59 @@ return speech_ver; } +/* Check the given Bearer Capability for a data call (CSD). + * Return 0 if the bearer is accepted, otherwise return -1. */ +static int mncc_handle_bcap_data(const struct gsm_mncc_bearer_cap *bcap, + const struct gsm_settings *set) +{ + if (bcap->data.rate_adaption != GSM48_BCAP_RA_V110_X30) { + LOGP(DMNCC, LOGL_ERROR, + "%s(): Rate adaption (octet 5) 0x%02x is not supported\n", + __func__, bcap->data.rate_adaption); + return -ENOTSUP; + } + if (bcap->data.sig_access != GSM48_BCAP_SA_I440_I450) { + LOGP(DMNCC, LOGL_ERROR, + "%s(): Signalling access protocol (octet 5) 0x%02x is not supported\n", + __func__, bcap->data.sig_access); + return -ENOTSUP; + } + +#define BCAP_RATE(interm_rate, user_rate) \ + ((interm_rate << 8) | (user_rate << 0)) + + switch (BCAP_RATE(bcap->data.interm_rate, bcap->data.user_rate)) { + case BCAP_RATE(GSM48_BCAP_IR_8k, GSM48_BCAP_UR_300): + case BCAP_RATE(GSM48_BCAP_IR_8k, GSM48_BCAP_UR_1200): + case BCAP_RATE(GSM48_BCAP_IR_8k, GSM48_BCAP_UR_2400): + if (bcap->data.transp != GSM48_BCAP_TR_TRANSP) { + LOGP(DMNCC, LOGL_ERROR, + "%s(): wrong user-rate 0x%02x for a non-transparent call\n", + __func__, bcap->data.user_rate); + return -EINVAL; + } + /* fall-through */ + case BCAP_RATE(GSM48_BCAP_IR_8k, GSM48_BCAP_UR_4800): + case BCAP_RATE(GSM48_BCAP_IR_16k, GSM48_BCAP_UR_9600): + if (bcap->data.transp != GSM48_BCAP_TR_TRANSP) { + LOGP(DMNCC, LOGL_ERROR, + "%s(): only transparent calls are supported so far\n", + __func__); + return -ENOTSUP; + } + break; + default: + LOGP(DMNCC, LOGL_ERROR, + "%s(): User rate 0x%02x (octets 6a) is not supported (IR=0x%02x)\n", + __func__, bcap->data.user_rate, bcap->data.interm_rate); + return -ENOTSUP; + } + +#undef BCAP_RATE + + return 0; +} + static int mncc_handle_bcap(struct gsm_mncc *mncc_out, /* CC Call Confirmed */ const struct gsm_mncc *mncc_in, /* CC Setup */ const struct gsm_settings *set) @@ -262,7 +432,7 @@ /* if the Bearer Capability 1 IE is not present */ if (~mncc_in->fields & MNCC_F_BEARER_CAP) { /* ... include our own Bearer Capability, assuming a speech call */ - mncc_set_bearer(mncc_out, set, -1); + mncc_set_bcap_speech(mncc_out, set, -1); return 0; } @@ -289,12 +459,15 @@ * or if given codec is unimplemented */ if (speech_ver < 0) - mncc_set_bearer(mncc_out, set, -1); + mncc_set_bcap_speech(mncc_out, set, -1); else if (bcap->speech_ver[1] >= 0 || speech_ver != 0) - mncc_set_bearer(mncc_out, set, speech_ver); + mncc_set_bcap_speech(mncc_out, set, speech_ver); break; } case GSM48_BCAP_ITCAP_UNR_DIG_INF: + case GSM48_BCAP_ITCAP_3k1_AUDIO: + case GSM48_BCAP_ITCAP_FAX_G3: + return mncc_handle_bcap_data(bcap, set); default: LOGP(DMNCC, LOGL_ERROR, "%s(): Information transfer capability 0x%02x is not supported\n", @@ -402,6 +575,7 @@ return -ENOMEM; call->ms = ms; call->callref = data->callref; + call->type = GSM_CALL_T_UNKNOWN; llist_add_tail(&call->entry, &call_list); } @@ -530,6 +704,21 @@ cause = GSM48_CC_CAUSE_INCOMPAT_DEST; goto release; } + switch (mncc.bearer_cap.transfer) { + case GSM48_BCAP_ITCAP_SPEECH: + call->type = GSM_CALL_T_VOICE; + break; + case GSM48_BCAP_ITCAP_UNR_DIG_INF: + case GSM48_BCAP_ITCAP_3k1_AUDIO: + call->type = GSM_CALL_T_DATA; + break; + case GSM48_BCAP_ITCAP_FAX_G3: + call->type = GSM_CALL_T_DATA_FAX; + break; + default: + call->type = GSM_CALL_T_UNKNOWN; + break; + } /* CC capabilities (optional) */ if (ms->settings.cc_dtmf) { mncc.fields |= MNCC_F_CCCAP; @@ -596,7 +785,8 @@ return 0; } -int mncc_call(struct osmocom_ms *ms, const char *number) +int mncc_call(struct osmocom_ms *ms, const char *number, + enum gsm_call_type call_type) { struct gsm_call *call; struct gsm_mncc setup; @@ -616,6 +806,7 @@ return -ENOMEM; call->ms = ms; call->callref = new_callref++; + call->type = call_type; call->init = true; llist_add_tail(&call->entry, &call_list); @@ -627,7 +818,8 @@ /* emergency */ setup.emergency = 1; } else { - LOGP(DMNCC, LOGL_INFO, "Make call to %s\n", number); + LOGP(DMNCC, LOGL_INFO, "Make %s call to %s\n", + gsm_call_type_str[call_type], number); /* called number */ setup.fields |= MNCC_F_CALLED; if (number[0] == '+') { @@ -640,7 +832,10 @@ OSMO_STRLCPY_ARRAY(setup.called.number, number); /* bearer capability (mandatory) */ - mncc_set_bearer(&setup, &ms->settings, -1); + if (call_type == GSM_CALL_T_VOICE) + mncc_set_bcap_speech(&setup, &ms->settings, -1); + else + mncc_set_bcap_data(&setup, &ms->settings, call_type); /* CLIR */ if (ms->settings.clir) diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index aaf01bd..e79a5a1 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -494,14 +494,18 @@ "Name of MS (see \"show ms\")\n" DEFUN(call_num, call_num_cmd, - CALL_CMD " NUMBER", + CALL_CMD " NUMBER [(voice|data|fax)]", CALL_CMD_DESC "Phone number to call " - "(Use digits '0123456789*#abc', and '+' to dial international)\n") + "(Use digits '0123456789*#abc', and '+' to dial international)\n" + "Initiate a regular voice call (default)\n" + "Initiate a data call (UDI or 3.1 kHz audio)\n" + "Initiate a data call (Facsimile group 3)\n") { struct osmocom_ms *ms; struct gsm_settings *set; struct gsm_settings_abbrev *abbrev; + enum gsm_call_type call_type; const char *number; ms = l23_vty_get_ms(argv[0], vty); @@ -527,7 +531,17 @@ if (vty_check_number(vty, number)) return CMD_WARNING; - mncc_call(ms, number); + + if (argc < 3 || !strcmp(argv[2], "voice")) + call_type = GSM_CALL_T_VOICE; /* implicit default */ + else if (!strcmp(argv[2], "data")) + call_type = GSM_CALL_T_DATA; + else if (!strcmp(argv[2], "fax")) + call_type = GSM_CALL_T_DATA_FAX; + else + return CMD_WARNING; + + mncc_call(ms, number, call_type); return CMD_SUCCESS; } @@ -557,7 +571,7 @@ number = argv[1]; if (!strcmp(number, "emergency")) - mncc_call(ms, number); + mncc_call(ms, number, GSM_CALL_T_VOICE); else if (!strcmp(number, "answer")) mncc_answer(ms); else if (!strcmp(number, "hangup")) @@ -612,6 +626,130 @@ return CMD_SUCCESS; } +#define CALL_PARAMS_CMD \ + CALL_CMD " params" +#define CALL_PARAMS_CMD_DESC \ + CALL_CMD_DESC \ + "Call related parameters\n" + +#define CALL_PARAMS_DATA_CMD \ + CALL_PARAMS_CMD " data" +#define CALL_PARAMS_DATA_CMD_DESC \ + CALL_PARAMS_CMD_DESC \ + "Parameters for data calls\n" + +DEFUN(call_params_data_type, + call_params_data_type_cmd, + CALL_PARAMS_DATA_CMD " type (isdn|analog-modem)", + CALL_PARAMS_DATA_CMD_DESC + "Data call type (does not apply to FAX calls)\n" + "ISDN (Unrestricted Digital Information)\n" + "Analog modem (3.1 kHz audio, ex PLMN)\n") +{ + struct osmocom_ms *ms; + struct gsm_settings *set; + struct data_call_params *cp; + + ms = l23_vty_get_ms(argv[0], vty); + if (!ms) + return CMD_WARNING; + set = &ms->settings; + cp = &set->call_params.data; + + if (!strcmp(argv[1], "isdn")) + cp->type = DATA_CALL_TYPE_ISDN; + else if (!strcmp(argv[1], "analog-modem")) + cp->type = DATA_CALL_TYPE_ANALOG; + else /* should not happen */ + return CMD_WARNING; + + return CMD_SUCCESS; +} + +DEFUN(call_params_data_rate, + call_params_data_rate_cmd, + CALL_PARAMS_DATA_CMD " rate (65|66|68|70|71|75)", + CALL_PARAMS_DATA_CMD_DESC + "Data rate (values like in AT+CBST)\n" + "300 bps (V.110)\n" + "1200 bps (V.110)\n" + "2400 bps (V.110 or X.31 flag stuffing)\n" + "4800 bps (V.110 or X.31 flag stuffing)\n" + "9600 bps (V.110 or X.31 flag stuffing)\n" + "14400 bps (V.110 or X.31 flag stuffing)\n") +{ + struct osmocom_ms *ms; + struct gsm_settings *set; + struct data_call_params *cp; + + ms = l23_vty_get_ms(argv[0], vty); + if (!ms) + return CMD_WARNING; + set = &ms->settings; + cp = &set->call_params.data; + + switch (atoi(argv[1])) { + case 65: + cp->rate = DATA_CALL_RATE_V110_300; + break; + case 66: + cp->rate = DATA_CALL_RATE_V110_1200; + break; + case 68: + cp->rate = DATA_CALL_RATE_V110_2400; + break; + case 70: + cp->rate = DATA_CALL_RATE_V110_4800; + break; + case 71: + cp->rate = DATA_CALL_RATE_V110_9600; + break; + case 75: + cp->rate = DATA_CALL_RATE_V110_14400; + break; + default: /* should not happen */ + return CMD_WARNING; + } + + return CMD_SUCCESS; +} + +DEFUN(call_params_data_ce, + call_params_data_ce_cmd, + CALL_PARAMS_DATA_CMD " ce (transparent|non-transparent) [prefer]", + CALL_PARAMS_DATA_CMD_DESC + "Connection element (does not apply to FAX calls)\n" + "Transparent connection\n" + "Non-transparent connection (RLP)\n" + "Prefer the selected mode, but also accept other(s)\n") +{ + struct osmocom_ms *ms; + struct gsm_settings *set; + struct data_call_params *cp; + + ms = l23_vty_get_ms(argv[0], vty); + if (!ms) + return CMD_WARNING; + set = &ms->settings; + cp = &set->call_params.data; + + if (!strcmp(argv[1], "transparent")) { + if (argc > 2) + cp->ce = DATA_CALL_CE_TRANSP_PREF; + else + cp->ce = DATA_CALL_CE_TRANSP; + } else if (!strcmp(argv[1], "non-transparent")) { + if (argc > 2) + cp->ce = DATA_CALL_CE_NON_TRANSP_PREF; + else + cp->ce = DATA_CALL_CE_NON_TRANSP; + } else { /* should not happen */ + return CMD_WARNING; + } + + return CMD_SUCCESS; +} + DEFUN(sms, sms_cmd, "sms MS_NAME NUMBER .LINE", "Send an SMS\nName of MS (see \"show ms\")\nPhone number to send SMS " "(Use digits '0123456789*#abc', and '+' to dial international)\n" @@ -1311,6 +1449,12 @@ SUP_WRITE(full_v3, "full-speech-v3"); SUP_WRITE(half_v1, "half-speech-v1"); SUP_WRITE(half_v3, "half-speech-v3"); + SUP_WRITE(csd_tch_f144, "full-data-14400"); + SUP_WRITE(csd_tch_f96, "full-data-9600"); + SUP_WRITE(csd_tch_f48, "full-data-4800"); + SUP_WRITE(csd_tch_h48, "half-data-4800"); + SUP_WRITE(csd_tch_f24, "full-data-2400"); + SUP_WRITE(csd_tch_h24, "half-data-2400"); if (!l23_vty_hide_default || sup->min_rxlev_dbm != set->min_rxlev_dbm) vty_out(vty, " min-rxlev %d%s", set->min_rxlev_dbm, VTY_NEWLINE); @@ -2273,6 +2417,13 @@ SUP_EN_DI(half_v1, "half-speech-v1", "Half rate speech V1", 0); SUP_EN_DI(half_v3, "half-speech-v3", "Half rate speech V3 (AMR)", 0); +SUP_EN_DI(csd_tch_f144, "full-data-14400", "CSD TCH/F14.4", 0); +SUP_EN_DI(csd_tch_f96, "full-data-9600", "CSD TCH/F9.6", 0); +SUP_EN_DI(csd_tch_f48, "full-data-4800", "CSD TCH/F4.8", 0); +SUP_EN_DI(csd_tch_h48, "half-data-4800", "CSD TCH/H4.8", 0); +SUP_EN_DI(csd_tch_f24, "full-data-2400", "CSD TCH/F2.4", 0); +SUP_EN_DI(csd_tch_h24, "half-data-2400", "CSD TCH/H2.4", 0); + DEFUN(cfg_ms_sup_min_rxlev, cfg_ms_sup_min_rxlev_cmd, "min-rxlev <-110--47>", "Set the minimum receive level to select a cell\n" "Minimum receive level from -110 dBm to -47 dBm") @@ -2541,6 +2692,9 @@ install_element(ENABLE_NODE, &call_cmd); install_element(ENABLE_NODE, &call_retr_cmd); install_element(ENABLE_NODE, &call_dtmf_cmd); + install_element(ENABLE_NODE, &call_params_data_type_cmd); + install_element(ENABLE_NODE, &call_params_data_rate_cmd); + install_element(ENABLE_NODE, &call_params_data_ce_cmd); install_element(ENABLE_NODE, &sms_cmd); install_element(ENABLE_NODE, &service_cmd); install_element(ENABLE_NODE, &vgcs_enter_cmd); @@ -2665,6 +2819,18 @@ install_element(SUPPORT_NODE, &cfg_ms_sup_di_half_v1_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_en_half_v3_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_di_half_v3_cmd); + install_element(SUPPORT_NODE, &cfg_ms_sup_en_csd_tch_f144_cmd); + install_element(SUPPORT_NODE, &cfg_ms_sup_di_csd_tch_f144_cmd); + install_element(SUPPORT_NODE, &cfg_ms_sup_en_csd_tch_f96_cmd); + install_element(SUPPORT_NODE, &cfg_ms_sup_di_csd_tch_f96_cmd); + install_element(SUPPORT_NODE, &cfg_ms_sup_en_csd_tch_f48_cmd); + install_element(SUPPORT_NODE, &cfg_ms_sup_di_csd_tch_f48_cmd); + install_element(SUPPORT_NODE, &cfg_ms_sup_en_csd_tch_h48_cmd); + install_element(SUPPORT_NODE, &cfg_ms_sup_di_csd_tch_h48_cmd); + install_element(SUPPORT_NODE, &cfg_ms_sup_en_csd_tch_f24_cmd); + install_element(SUPPORT_NODE, &cfg_ms_sup_di_csd_tch_f24_cmd); + install_element(SUPPORT_NODE, &cfg_ms_sup_en_csd_tch_h24_cmd); + install_element(SUPPORT_NODE, &cfg_ms_sup_di_csd_tch_h24_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_min_rxlev_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_dsc_max_cmd); install_element(SUPPORT_NODE, &cfg_ms_sup_skip_max_per_band_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34762?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I1995fa0a7a68d9b980852b664d472d4633777ac6 Gerrit-Change-Number: 34762 Gerrit-PatchSet: 7 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmocore[master]: gsmtap_util: Use Osmo IO instead of Osmo write queues
by daniel 03 Nov '23

03 Nov '23
Attention is currently required from: arehbein, laforge, pespin. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34743?usp=email ) Change subject: gsmtap_util: Use Osmo IO instead of Osmo write queues ...................................................................... Patch Set 8: (1 comment) File src/core/gsmtap_util.c: https://gerrit.osmocom.org/c/libosmocore/+/34743/comment/b190b3cc_c6fef766 PS5, Line 478: osmo_iofd_setup(gti, gti->sink_fd, "gsmtap_inst.out", OSMO_IO_FD_MODE_READ_WRITE, &gsmtap_sink_ops, NULL); > This would have also happened if the old code used write_queues, maybe that's the reason they didn't […] Test to reproduce your issue (even with the old wqueue code) and proposed fix here: https://gerrit.osmocom.org/c/libosmocore/+/34967 https://gerrit.osmocom.org/c/libosmocore/+/34966 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34743?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iadbbef74e3add7001d84dd6b68f51eac293e44d0 Gerrit-Change-Number: 34743 Gerrit-PatchSet: 8 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 03 Nov 2023 20:27:17 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up
by daniel 03 Nov '23

03 Nov '23
Attention is currently required from: daniel. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: tests: Test gsmtap logging if write queue fills up ...................................................................... tests: Test gsmtap logging if write queue fills up Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468 --- M tests/Makefile.am A tests/logging/logging_test_gsmtap.c A tests/logging/logging_test_gsmtap.err M tests/testsuite.at 4 files changed, 417 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/67/34967/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468 Gerrit-Change-Number: 34967 Gerrit-PatchSet: 2 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up
by Jenkins Builder 03 Nov '23

03 Nov '23
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email ) Change subject: tests: Test gsmtap logging if write queue fills up ...................................................................... Patch Set 1: (3 comments) File tests/logging/logging_test_gsmtap.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-12292): https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/e654eaaf_92b1cc35 PS1, Line 57: for (int i = 0; i < 200; i++) { braces {} are not necessary for single statement blocks Robot Comment from checkpatch (run ID jenkins-gerrit-lint-12292): https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/7f9350c7_afc521ec PS1, Line 58: DEBUGP(DLGLOBAL, "Repeating message (i = %i)\n", i); Use %d instead of %i Robot Comment from checkpatch (run ID jenkins-gerrit-lint-12292): https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/f3c2cda0_9a241246 PS1, Line 61: for (int i = 0; i < 200; i++) { braces {} are not necessary for single statement blocks -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468 Gerrit-Change-Number: 34967 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Fri, 03 Nov 2023 20:23:34 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: logging_gsmtap: Temporarily disable logging when sending the logs
by daniel 03 Nov '23

03 Nov '23
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email ) Change subject: logging_gsmtap: Temporarily disable logging when sending the logs ...................................................................... logging_gsmtap: Temporarily disable logging when sending the logs This avoids an infinite recursion when sending a gsmtap log message causes a log message. Temporarily set target->loglevel higher than LOGL_FATAL, which effectively disables logging for that target. Other targets like stderr will still log this message so there is still an indication that something went wrong. Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e Related: OS#6213 --- M src/core/logging_gsmtap.c 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/34966/1 diff --git a/src/core/logging_gsmtap.c b/src/core/logging_gsmtap.c index dfd059b..1b979ec 100644 --- a/src/core/logging_gsmtap.c +++ b/src/core/logging_gsmtap.c @@ -114,7 +114,11 @@ } msgb_put(msg, rc); + /* Ensure that any error when sending the log message don't cause infinite recursion */ + level = target->loglevel; + target->loglevel = LOGL_FATAL + 1; rc = gsmtap_sendmsg(target->tgt_gsmtap.gsmtap_inst, msg); + target->loglevel = level; if (rc) msgb_free(msg); } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e Gerrit-Change-Number: 34966 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up
by daniel 03 Nov '23

03 Nov '23
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email ) Change subject: tests: Test gsmtap logging if write queue fills up ...................................................................... tests: Test gsmtap logging if write queue fills up Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468 --- M tests/Makefile.am A tests/logging/logging_test_gsmtap.c A tests/logging/logging_test_gsmtap.err M tests/testsuite.at 4 files changed, 419 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/67/34967/1 diff --git a/tests/Makefile.am b/tests/Makefile.am index 5f4914e..8c8e370 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -15,6 +15,7 @@ gsm0808/gsm0808_test gsm0408/gsm0408_test \ gprs/gprs_test kasumi/kasumi_test gea/gea_test \ logging/logging_test codec/codec_test \ + logging/logging_test_gsmtap \ loggingrb/loggingrb_test strrb/strrb_test \ comp128/comp128_test \ bitvec/bitvec_test msgb/msgb_test bits/bitcomp_test \ diff --git a/tests/logging/logging_test_gsmtap.c b/tests/logging/logging_test_gsmtap.c new file mode 100644 index 0000000..f84cdce --- /dev/null +++ b/tests/logging/logging_test_gsmtap.c @@ -0,0 +1,66 @@ +/* simple test for the debug interface */ +/* + * (C) 2008, 2009 by Holger Hans Peter Freyther <zecke(a)selfish.org> + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include <osmocom/core/select.h> +#include <osmocom/core/logging.h> +#include <osmocom/core/utils.h> + +#include <stdlib.h> + +static const struct log_info_cat default_categories[] = {}; + +const struct log_info log_info = { + .cat = default_categories, + .num_cat = ARRAY_SIZE(default_categories), +}; + +extern struct log_info *osmo_log_info; + +int main(int argc, char **argv) +{ + struct log_target *stderr_target; + struct log_target *gsmtap_target; + + log_init(&log_info, NULL); + stderr_target = log_target_create_stderr(); + log_add_target(stderr_target); + log_set_all_filter(stderr_target, 1); + log_set_print_filename2(stderr_target, LOG_FILENAME_NONE); + log_set_print_category_hex(stderr_target, 0); + log_set_print_category(stderr_target, 1); + log_set_use_color(stderr_target, 0); + log_parse_category_mask(stderr_target, "DLGLOBAL,1"); + + gsmtap_target = log_target_create_gsmtap("127.0.0.2", 4729, "gsmtap", 1, 1); + log_add_target(gsmtap_target); + log_set_all_filter(gsmtap_target, 1); + log_parse_category_mask(gsmtap_target, "DLGLOBAL,1"); + + log_target_file_switch_to_stream(stderr_target); + + log_set_category_filter(stderr_target, DLGLOBAL, 1, LOGL_DEBUG); + + for (int i = 0; i < 200; i++) { + DEBUGP(DLGLOBAL, "Repeating message (i = %i)\n", i); + } + + for (int i = 0; i < 200; i++) { + osmo_select_main(1); + } + + return 0; +} diff --git a/tests/logging/logging_test_gsmtap.err b/tests/logging/logging_test_gsmtap.err new file mode 100644 index 0000000..dcba5cf --- /dev/null +++ b/tests/logging/logging_test_gsmtap.err @@ -0,0 +1,336 @@ +DLGLOBAL Repeating message (i = 0) +DLGLOBAL Repeating message (i = 1) +DLGLOBAL Repeating message (i = 2) +DLGLOBAL Repeating message (i = 3) +DLGLOBAL Repeating message (i = 4) +DLGLOBAL Repeating message (i = 5) +DLGLOBAL Repeating message (i = 6) +DLGLOBAL Repeating message (i = 7) +DLGLOBAL Repeating message (i = 8) +DLGLOBAL Repeating message (i = 9) +DLGLOBAL Repeating message (i = 10) +DLGLOBAL Repeating message (i = 11) +DLGLOBAL Repeating message (i = 12) +DLGLOBAL Repeating message (i = 13) +DLGLOBAL Repeating message (i = 14) +DLGLOBAL Repeating message (i = 15) +DLGLOBAL Repeating message (i = 16) +DLGLOBAL Repeating message (i = 17) +DLGLOBAL Repeating message (i = 18) +DLGLOBAL Repeating message (i = 19) +DLGLOBAL Repeating message (i = 20) +DLGLOBAL Repeating message (i = 21) +DLGLOBAL Repeating message (i = 22) +DLGLOBAL Repeating message (i = 23) +DLGLOBAL Repeating message (i = 24) +DLGLOBAL Repeating message (i = 25) +DLGLOBAL Repeating message (i = 26) +DLGLOBAL Repeating message (i = 27) +DLGLOBAL Repeating message (i = 28) +DLGLOBAL Repeating message (i = 29) +DLGLOBAL Repeating message (i = 30) +DLGLOBAL Repeating message (i = 31) +DLGLOBAL Repeating message (i = 32) +DLGLOBAL Repeating message (i = 33) +DLGLOBAL Repeating message (i = 34) +DLGLOBAL Repeating message (i = 35) +DLGLOBAL Repeating message (i = 36) +DLGLOBAL Repeating message (i = 37) +DLGLOBAL Repeating message (i = 38) +DLGLOBAL Repeating message (i = 39) +DLGLOBAL Repeating message (i = 40) +DLGLOBAL Repeating message (i = 41) +DLGLOBAL Repeating message (i = 42) +DLGLOBAL Repeating message (i = 43) +DLGLOBAL Repeating message (i = 44) +DLGLOBAL Repeating message (i = 45) +DLGLOBAL Repeating message (i = 46) +DLGLOBAL Repeating message (i = 47) +DLGLOBAL Repeating message (i = 48) +DLGLOBAL Repeating message (i = 49) +DLGLOBAL Repeating message (i = 50) +DLGLOBAL Repeating message (i = 51) +DLGLOBAL Repeating message (i = 52) +DLGLOBAL Repeating message (i = 53) +DLGLOBAL Repeating message (i = 54) +DLGLOBAL Repeating message (i = 55) +DLGLOBAL Repeating message (i = 56) +DLGLOBAL Repeating message (i = 57) +DLGLOBAL Repeating message (i = 58) +DLGLOBAL Repeating message (i = 59) +DLGLOBAL Repeating message (i = 60) +DLGLOBAL Repeating message (i = 61) +DLGLOBAL Repeating message (i = 62) +DLGLOBAL Repeating message (i = 63) +DLGLOBAL Repeating message (i = 64) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 65) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 66) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 67) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 68) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 69) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 70) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 71) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 72) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 73) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 74) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 75) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 76) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 77) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 78) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 79) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 80) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 81) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 82) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 83) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 84) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 85) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 86) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 87) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 88) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 89) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 90) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 91) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 92) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 93) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 94) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 95) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 96) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 97) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 98) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 99) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 100) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 101) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 102) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 103) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 104) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 105) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 106) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 107) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 108) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 109) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 110) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 111) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 112) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 113) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 114) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 115) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 116) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 117) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 118) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 119) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 120) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 121) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 122) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 123) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 124) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 125) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 126) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 127) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 128) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 129) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 130) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 131) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 132) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 133) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 134) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 135) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 136) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 137) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 138) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 139) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 140) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 141) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 142) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 143) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 144) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 145) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 146) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 147) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 148) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 149) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 150) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 151) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 152) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 153) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 154) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 155) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 156) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 157) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 158) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 159) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 160) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 161) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 162) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 163) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 164) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 165) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 166) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 167) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 168) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 169) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 170) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 171) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 172) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 173) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 174) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 175) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 176) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 177) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 178) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 179) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 180) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 181) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 182) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 183) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 184) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 185) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 186) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 187) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 188) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 189) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 190) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 191) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 192) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 193) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 194) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 195) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 196) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 197) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 198) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb +DLGLOBAL Repeating message (i = 199) +DLGLOBAL wqueue(0x611000000328) is full. Rejecting msgb diff --git a/tests/testsuite.at b/tests/testsuite.at index 3366995..20e9d03 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -201,6 +201,13 @@ AT_CHECK([$abs_top_builddir/tests/logging/logging_test wqueue], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([logging_gsmtap]) +AT_KEYWORDS([logging_gsmtap]) +cat $abs_srcdir/logging/logging_test_gsmtap.ok > expout +cat $abs_srcdir/logging/logging_test_gsmtap.err > experr +AT_CHECK([$abs_top_builddir/tests/logging/logging_test_gsmtap], [0], [expout], [experr]) +AT_CLEANUP + AT_SETUP([codec]) AT_KEYWORDS([codec]) cat $abs_srcdir/codec/codec_test.ok > expout -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468 Gerrit-Change-Number: 34967 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-trx[master]: ms: init blade with fpga control
by Hoernchen 03 Nov '23

03 Nov '23
Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/34965?usp=email ) Change subject: ms: init blade with fpga control ...................................................................... ms: init blade with fpga control Blade 1 defaults to fpga tuning, but the blade 2 code defaults to host, which does 8000 register reads and writes. The only way to speed this up is to set the env var, which reduces opening the blade device from 10 to 1 seconds. Change-Id: I32fe31f1e11f4ceb3c864ec8739d177e780d0a7e --- M Transceiver52M/ms/bladerf_specific.h 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/65/34965/1 diff --git a/Transceiver52M/ms/bladerf_specific.h b/Transceiver52M/ms/bladerf_specific.h index e32d77c..e9245d4 100644 --- a/Transceiver52M/ms/bladerf_specific.h +++ b/Transceiver52M/ms/bladerf_specific.h @@ -254,6 +254,8 @@ bladerf_log_set_verbosity(BLADERF_LOG_LEVEL_DEBUG); bladerf_set_usb_reset_on_open(true); + + setenv("BLADERF_DEFAULT_TUNING_MODE","fpga",1); // ensure blade 2 does not spend 10 seconds initializing host control blade_check(bladerf_open, &dev, ""); if (!dev) { std::cerr << "open failed, device missing?" << std::endl; -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34965?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I32fe31f1e11f4ceb3c864ec8739d177e780d0a7e Gerrit-Change-Number: 34965 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • ...
  • 151
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.