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 -----
  • 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

March 2023

  • 1 participants
  • 3642 discussions
[S] Change in libosmo-abis[master]: Send raw data with e1d as it arrives from application
by laforge 05 Mar '23

05 Mar '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31500 ) Change subject: Send raw data with e1d as it arrives from application ...................................................................... Send raw data with e1d as it arrives from application The application is responsible to send raw data in sync with the raw data it receives. It also cares about sending data in advance, to prevent underruns, if required. The length of data can vary. (Now it is same procedure as with mISDN driver.) OSMO_FD_WRITE flag must be disabled, if there is no message left in the transmit queue. Change-Id: I3e3ef623a02bffe75b168dc42514455b4df1007f --- M src/input/e1d.c 1 file changed, 20 insertions(+), 4 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/input/e1d.c b/src/input/e1d.c index 4ab7c36..b638439 100644 --- a/src/input/e1d.c +++ b/src/input/e1d.c @@ -194,8 +194,10 @@ /* get the next msg for this timeslot */ msg = e1inp_tx_ts(e1i_ts, NULL); - if (!msg) + if (!msg) { + osmo_fd_write_disable(bfd); return 0; + } if (msg->len != D_BCHAN_TX_GRAN) { /* This might lead to a transmit underrun, as we call tx @@ -244,9 +246,6 @@ msg->l2h = msg->data; LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "RAW CHAN RX: %s\n", msgb_hexdump_l2(msg)); ret = e1inp_rx_ts(e1i_ts, msg, 0, 0); - /* physical layer indicates that data has been sent, - * we thus can send some more data */ - ret = handle_ts_raw_write(bfd); return ret; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31500 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I3e3ef623a02bffe75b168dc42514455b4df1007f Gerrit-Change-Number: 31500 Gerrit-PatchSet: 3 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: tnt <tnt(a)246tNt.com> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-abis[master]: e1d: Add support for HDLC type channels
by laforge 05 Mar '23

05 Mar '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31502 ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: e1d: Add support for HDLC type channels ...................................................................... e1d: Add support for HDLC type channels Change-Id: I2f4b9f7ed6430804ca511c7f5283a16bc13bc2fc --- M src/input/e1d.c 1 file changed, 71 insertions(+), 0 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/input/e1d.c b/src/input/e1d.c index db4988f..6392b4f 100644 --- a/src/input/e1d.c +++ b/src/input/e1d.c @@ -250,6 +250,62 @@ return ret; } +/* write to a hdlc channel TS */ +static int handle_ts_hdlc_write(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg; + int ret; + + /* get the next msg for this timeslot */ + msg = e1inp_tx_ts(e1i_ts, NULL); + if (!msg) { + osmo_fd_write_disable(bfd); + return 0; + } + + LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "HDLC CHAN TX: %s\n", osmo_hexdump(msg->data, msg->len)); + + ret = write(bfd->fd, msg->data, msg->len); + if (ret < msg->len) + LOGPITS(e1i_ts, DLINP, LOGL_NOTICE, "send returns %d instead of %d\n", ret, msg->len); + msgb_free(msg); + + return ret; +} + +#define TSX_ALLOC_SIZE 4096 + +/* read from a hdlc channel TS */ +static int handle_ts_hdlc_read(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg = msgb_alloc(TSX_ALLOC_SIZE, "E1D HDLC TS"); + int ret; + + if (!msg) + return -ENOMEM; + + ret = read(bfd->fd, msg->data, TSX_ALLOC_SIZE); + if (ret < 0) { + LOGPITS(e1i_ts, DLINP, LOGL_NOTICE, "read error %d %s\n", ret, strerror(errno)); + msgb_free(msg); + return ret; + } + + msgb_put(msg, ret); + + msg->l2h = msg->data; + LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "HDLC CHAN RX: %s\n", msgb_hexdump_l2(msg)); + ret = e1inp_rx_ts(e1i_ts, msg, 0, 0); + + return ret; +} + static void e1d_write_msg(struct msgb *msg, void *cbdata) { @@ -294,6 +350,12 @@ if (what & OSMO_FD_WRITE) ret = handle_ts_raw_write(bfd); break; + case E1INP_TS_TYPE_HDLC: + if (what & OSMO_FD_READ) + ret = handle_ts_hdlc_read(bfd); + if (what & OSMO_FD_WRITE) + ret = handle_ts_hdlc_write(bfd); + break; default: LOGPITS(e1i_ts, DLINP, LOGL_NOTICE, "unknown/unsupported E1 TS type %u\n", e1i_ts->type); break; -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31502 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I2f4b9f7ed6430804ca511c7f5283a16bc13bc2fc Gerrit-Change-Number: 31502 Gerrit-PatchSet: 4 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-abis[master]: Send raw data with e1d as it arrives from application
by laforge 05 Mar '23

05 Mar '23
Attention is currently required from: jolly, tnt. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31500 ) Change subject: Send raw data with e1d as it arrives from application ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31500 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I3e3ef623a02bffe75b168dc42514455b4df1007f Gerrit-Change-Number: 31500 Gerrit-PatchSet: 2 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: tnt <tnt(a)246tNt.com> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: tnt <tnt(a)246tNt.com> Gerrit-Comment-Date: Sun, 05 Mar 2023 18:06:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bsc[master]: channel_mode_from_lchan: add GSM48_CMODE_DATA_3k6
by laforge 05 Mar '23

05 Mar '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31546 ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: channel_mode_from_lchan: add GSM48_CMODE_DATA_3k6 ...................................................................... channel_mode_from_lchan: add GSM48_CMODE_DATA_3k6 Related: OS#4393 Change-Id: Id9ec34f77c96d3a209c6f78d2addf1ea0dfa228d --- M src/osmo-bsc/abis_rsl.c 1 file changed, 11 insertions(+), 0 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/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 6be3d48..cb4638b 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -460,6 +460,7 @@ case GSM48_CMODE_DATA_14k5: case GSM48_CMODE_DATA_12k0: case GSM48_CMODE_DATA_6k0: + case GSM48_CMODE_DATA_3k6: /* 3GPP TS 48.058 § 9.3.6 Channel Mode octet 6 */ if (ch_mode_rate->data_transparent) { cm->chan_rate = ch_mode_rate->data_rate.t; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31546 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Id9ec34f77c96d3a209c6f78d2addf1ea0dfa228d Gerrit-Change-Number: 31546 Gerrit-PatchSet: 5 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bsc[master]: lchan.h: remove enum lchan_csd_mode
by laforge 05 Mar '23

05 Mar '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31545 ) Change subject: lchan.h: remove enum lchan_csd_mode ...................................................................... lchan.h: remove enum lchan_csd_mode It looks like the idea was to translate the CSD rate from BSSAP to lchan_csd_mode before translating it to RSL. But instead we can just directly translate the BSSAP value to the RSL value. The previous code was not used yet (nothing wrote to csd_mode). Related: OS#4393 Depends: libosmocore I25bfd02aa1428a35492b20376a31635a442e545f Change-Id: Ice914744da3a2084e82d125848fb69404b8e8a36 --- M include/osmocom/bsc/lchan.h M src/osmo-bsc/abis_rsl.c 2 files changed, 29 insertions(+), 61 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/lchan.h b/include/osmocom/bsc/lchan.h index 4fcfa20..eef3140 100644 --- a/include/osmocom/bsc/lchan.h +++ b/include/osmocom/bsc/lchan.h @@ -8,6 +8,7 @@ #include <osmocom/gsm/gsm_utils.h> #include <osmocom/gsm/protocol/gsm_04_08.h> #include <osmocom/gsm/protocol/gsm_08_08.h> +#include <osmocom/gsm/protocol/gsm_08_58.h> #include <osmocom/gsm/gsm23003.h> #include <osmocom/bsc/meas_rep.h> @@ -44,24 +45,16 @@ enum channel_rate chan_t_to_chan_rate(enum gsm_chan_t chan_t); -enum lchan_csd_mode { - LCHAN_CSD_M_NT, - LCHAN_CSD_M_T_1200_75, - LCHAN_CSD_M_T_600, - LCHAN_CSD_M_T_1200, - LCHAN_CSD_M_T_2400, - LCHAN_CSD_M_T_9600, - LCHAN_CSD_M_T_14400, - LCHAN_CSD_M_T_29000, - LCHAN_CSD_M_T_32000, -}; - struct channel_mode_and_rate { enum gsm48_chan_mode chan_mode; enum channel_rate chan_rate; uint16_t s15_s0; /* only used for GSM48_CMODE_DATA_* */ - enum lchan_csd_mode csd_mode; + bool data_transparent; + union { + enum rsl_cmod_csd_t t; + enum rsl_cmod_csd_nt nt; + } data_rate; }; /* Channel Request reason */ diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 7eb3a43..6be3d48 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -460,54 +460,12 @@ case GSM48_CMODE_DATA_14k5: case GSM48_CMODE_DATA_12k0: case GSM48_CMODE_DATA_6k0: - switch (ch_mode_rate->csd_mode) { - case LCHAN_CSD_M_NT: - /* non-transparent CSD with RLP */ - switch (ch_mode_rate->chan_mode) { - case GSM48_CMODE_DATA_14k5: - cm->chan_rate = RSL_CMOD_SP_NT_14k5; - break; - case GSM48_CMODE_DATA_12k0: - cm->chan_rate = RSL_CMOD_SP_NT_12k0; - break; - case GSM48_CMODE_DATA_6k0: - cm->chan_rate = RSL_CMOD_SP_NT_6k0; - break; - default: - LOGP(DRSL, LOGL_ERROR, - "unsupported lchan->tch_mode %u\n", - ch_mode_rate->chan_mode); - return -EINVAL; - } - break; - /* transparent data services below */ - case LCHAN_CSD_M_T_1200_75: - cm->chan_rate = RSL_CMOD_CSD_T_1200_75; - break; - case LCHAN_CSD_M_T_600: - cm->chan_rate = RSL_CMOD_CSD_T_600; - break; - case LCHAN_CSD_M_T_1200: - cm->chan_rate = RSL_CMOD_CSD_T_1200; - break; - case LCHAN_CSD_M_T_2400: - cm->chan_rate = RSL_CMOD_CSD_T_2400; - break; - case LCHAN_CSD_M_T_9600: - cm->chan_rate = RSL_CMOD_CSD_T_9600; - break; - case LCHAN_CSD_M_T_14400: - cm->chan_rate = RSL_CMOD_CSD_T_14400; - break; - case LCHAN_CSD_M_T_29000: - cm->chan_rate = RSL_CMOD_CSD_T_29000; - break; - case LCHAN_CSD_M_T_32000: - cm->chan_rate = RSL_CMOD_CSD_T_32000; - break; - default: - LOGP(DRSL, LOGL_ERROR, "unsupported csd_mode %u\n", ch_mode_rate->csd_mode); - return -EINVAL; + /* 3GPP TS 48.058 § 9.3.6 Channel Mode octet 6 */ + if (ch_mode_rate->data_transparent) { + cm->chan_rate = ch_mode_rate->data_rate.t; + } else { + cm->chan_rate = ch_mode_rate->data_rate.nt; + cm->chan_rate |= 0x40; } break; default: -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31545 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ice914744da3a2084e82d125848fb69404b8e8a36 Gerrit-Change-Number: 31545 Gerrit-PatchSet: 5 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bsc[master]: lchan.h: remove enum lchan_csd_mode
by laforge 05 Mar '23

05 Mar '23
Attention is currently required from: osmith. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31545 ) Change subject: lchan.h: remove enum lchan_csd_mode ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31545 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ice914744da3a2084e82d125848fb69404b8e8a36 Gerrit-Change-Number: 31545 Gerrit-PatchSet: 4 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Sun, 05 Mar 2023 17:53:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: bsc: TC_assignment_csd: expect BSC to handle CSD
by laforge 05 Mar '23

05 Mar '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31557 ) Change subject: bsc: TC_assignment_csd: expect BSC to handle CSD ...................................................................... bsc: TC_assignment_csd: expect BSC to handle CSD Related: OS#4393 Change-Id: Iff19dc704af09d09d2265d8da38fc745a3936ce4 --- M bsc/BSC_Tests.ttcn M library/BSSMAP_Templates.ttcn 2 files changed, 78 insertions(+), 5 deletions(-) Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 31b733f..ebcd576 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -1837,13 +1837,37 @@ } return dt; } -testcase TC_assignment_csd() runs on test_CT { - var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + +private function f_tc_assignment_csd(charstring id) runs on MSC_ConnHdlr { + var template PDU_BSSAP exp_compl := f_gen_exp_compl(); var PDU_BSSAP ass_cmd := f_gen_ass_req(); + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeCSD); - //exp_fail.pdu.bssmap.assignmentFailure.cause.causeValue := int2bit(enum2int(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_UNAVAIL), 7); - var DchanTuple dt := f_assignment_exp(ass_cmd, exp_fail, "BSC accepted Assignment for CSD"); - f_perform_clear_test_ct(dt); + ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecCSData})); + + ass_cmd.pdu.bssmap.assignmentRequest.channelType.speechId_DataIndicator := GSM0808_DATA_RATE_TRANSP_4k8; + + f_establish_fully(ass_cmd, exp_compl); + f_perform_clear(); +} +testcase TC_assignment_csd() runs on test_CT { + if (Misc_Helpers.f_osmo_repo_is("nightly")) { /* osmo-bsc > 1.10.0 */ + var MSC_ConnHdlr vc_conn; + var TestHdlrParams pars := f_gen_test_hdlr_pars(); + pars.encr := valueof(t_EncrParams('01'O, f_rnd_octstring(8))); + + f_init(1, true); + f_sleep(1.0); + vc_conn := f_start_handler(refers(f_tc_assignment_csd), pars); + vc_conn.done; + } else { + var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail; + var PDU_BSSAP ass_cmd := f_gen_ass_req(); + ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeCSD); + //exp_fail.pdu.bssmap.assignmentFailure.cause.causeValue := int2bit(enum2int(GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_UNAVAIL), 7); + var DchanTuple dt := f_assignment_exp(ass_cmd, exp_fail, "BSC accepted Assignment for CSD"); + f_perform_clear_test_ct(dt); + } f_shutdown_helper(); } diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 1eebb02..02aad9f 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -112,6 +112,36 @@ GSM0808_CAUSE_DTM_HO_TIMER_EXPIRY ('1100010'B) } with { variant "FIELDLENGTH(7)" }; +/* 3GPP TS 48.008 3.2.2.11 Channel Type + * Transparent: Data Rate */ +const OCT1 GSM0808_DATA_RATE_TRANSP_32k0 := ('3a'O); +const OCT1 GSM0808_DATA_RATE_TRANSP_28k8 := ('39'O); +const OCT1 GSM0808_DATA_RATE_TRANSP_14k4 := ('18'O); +const OCT1 GSM0808_DATA_RATE_TRANSP_9k6 := ('10'O); +const OCT1 GSM0808_DATA_RATE_TRANSP_4k8 := ('11'O); +const OCT1 GSM0808_DATA_RATE_TRANSP_2k4 := ('12'O); +const OCT1 GSM0808_DATA_RATE_TRANSP_1k2 := ('13'O); +const OCT1 GSM0808_DATA_RATE_TRANSP_600 := ('14'O); +const OCT1 GSM0808_DATA_RATE_TRANSP_1200_75 := ('15'O); + +/* 3GPP TS 48.008 3.2.2.11 Channel Type + * Non-Transparent: Radio Interface Data Rate (preferred) */ +const OCT1 GSM0808_DATA_RATE_NON_TRANSP_12000_6000 := ('00'O); +const OCT1 GSM0808_DATA_RATE_NON_TRANSP_43k5 := ('34'O); +const OCT1 GSM0808_DATA_RATE_NON_TRANSP_29k0 := ('31'O); +const OCT1 GSM0808_DATA_RATE_NON_TRANSP_14k5 := ('14'O); +const OCT1 GSM0808_DATA_RATE_NON_TRANSP_12k0 := ('10'O); +const OCT1 GSM0808_DATA_RATE_NON_TRANSP_6k0 := ('11'O); + +/* 3GPP TS 48.008 3.2.2.11 Channel Type + * Non-Transparent: Allowed Radio Interface Data Rate (all possible allowed) */ +const OCT1 GSM0808_DATA_RATE_NON_TRANSP_ALLOWED_43k5 := ('40'O); +const OCT1 GSM0808_DATA_RATE_NON_TRANSP_ALLOWED_32k0 := ('20'O); +const OCT1 GSM0808_DATA_RATE_NON_TRANSP_ALLOWED_29k0 := ('10'O); +const OCT1 GSM0808_DATA_RATE_NON_TRANSP_ALLOWED_14k5 := ('08'O); +const OCT1 GSM0808_DATA_RATE_NON_TRANSP_ALLOWED_12k0 := ('02'O); +const OCT1 GSM0808_DATA_RATE_NON_TRANSP_ALLOWED_6k0 := ('01'O); + type enumerated BSSMAP_LcsCause { BSSMAP_LCS_CAUSE_UNSPECIFIED ('00000000'B), BSSMAP_LCS_CAUSE_SYSTEM_FAILURE ('00000001'B), @@ -603,6 +633,15 @@ codecType := FR_AMR_WB, s0_7 := '00000001'B } +template (value) BSSMAP_FIELD_CodecElement ts_CodecCSData modifies ts_CodecBase := { + codecType := CodecExtension, + tF := '0'B, /* Spare */ + pT := '0'B, /* CSDoTDM */ + pI := '1'B, /* CSDoIP */ + fI := '0'B, /* Spare */ + extendedCodecType := 'FD'O, /* CSData */ + s0_7 := '00000000'B /* R2, R3, Spare */ +} template BSSMAP_IE_SpeechCodecList ts_BSSMAP_IE_CodecList(template BSSMAP_FIELD_CodecElements elem) := { elementIdentifier := '7D'O, lengthIndicator := 0, /* overwritten */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31557 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iff19dc704af09d09d2265d8da38fc745a3936ce4 Gerrit-Change-Number: 31557 Gerrit-PatchSet: 7 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: library/RSL_Types: RSL_SpeechAlgo: support CSD
by laforge 05 Mar '23

05 Mar '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31556 ) Change subject: library/RSL_Types: RSL_SpeechAlgo: support CSD ...................................................................... library/RSL_Types: RSL_SpeechAlgo: support CSD Prepare to test CSD in BSC_Tests.ttcn. After sending a BSSAP assignment request to the BSC with channel type data, the BSC will send a channel activation via RSL to the BTS (which is emulated by the testsuite). Without CSD support in the RSL template, the testsuite is unable to decode the message, prints "Data remained at the end of the stream after successful decoding" and the test fails. Related: OS#4393 Change-Id: Ief2d95c7e9d71afb26fa74da755294226c8e158d --- M bsc/BSC_Tests.ttcn M bts/BTS_Tests.ttcn M bts/BTS_Tests_VAMOS.ttcn M library/RSL_Types.ttcn 4 files changed, 87 insertions(+), 29 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index b9182e3..31b733f 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -4342,30 +4342,30 @@ dtx_u := ?, spd_ind := RSL_SPDI_SPEECH, ch_rate_type := -, - coding_alg_rate := - + u := { speech := - } } } select (a_elem.codecType) { case (GSM_FR) { mode_ie.chan_mode.ch_rate_type := RSL_CHRT_TCH_F; - mode_ie.chan_mode.coding_alg_rate := RSL_CMOD_SP_GSM1; + mode_ie.chan_mode.u.speech := RSL_CMOD_SP_GSM1; } case (GSM_HR) { mode_ie.chan_mode.ch_rate_type := RSL_CHRT_TCH_H; - mode_ie.chan_mode.coding_alg_rate := RSL_CMOD_SP_GSM1; + mode_ie.chan_mode.u.speech := RSL_CMOD_SP_GSM1; } case (GSM_EFR) { mode_ie.chan_mode.ch_rate_type := RSL_CHRT_TCH_F; - mode_ie.chan_mode.coding_alg_rate := RSL_CMOD_SP_GSM2; + mode_ie.chan_mode.u.speech := RSL_CMOD_SP_GSM2; } case (FR_AMR) { mode_ie.chan_mode.ch_rate_type := RSL_CHRT_TCH_F; - mode_ie.chan_mode.coding_alg_rate := RSL_CMOD_SP_GSM3; + mode_ie.chan_mode.u.speech := RSL_CMOD_SP_GSM3; } case (HR_AMR) { mode_ie.chan_mode.ch_rate_type := RSL_CHRT_TCH_H; - mode_ie.chan_mode.coding_alg_rate := RSL_CMOD_SP_GSM3; + mode_ie.chan_mode.u.speech := RSL_CMOD_SP_GSM3; } } return mode_ie; diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 1859eed..e1281bb 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -871,7 +871,7 @@ ch_act.ies := ch_act.ies & { valueof(t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info := encr_info})) }; } - if (mode.coding_alg_rate == RSL_CMOD_SP_GSM3) { + if (ischosen(mode.u.speech) and mode.u.speech == RSL_CMOD_SP_GSM3) { ch_act.ies := ch_act.ies & { valueof(t_RSL_IE(RSL_IE_MR_CONFIG, RSL_IE_Body:{multirate_cfg := g_pars.mr_conf})) }; } @@ -2542,18 +2542,24 @@ var uint8_t amr_start_codec := 0; var BIT8 amr_codecs_bitmask := '00000000'B; - select (g_pars.chan_mode.coding_alg_rate) { - case (RSL_CMOD_NO_RESOURCE) { tch_mode := L1CTL_CHAN_MODE_SIGN; } - case (RSL_CMOD_SP_GSM1) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V1; } - case (RSL_CMOD_SP_GSM2) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V2; } - case (RSL_CMOD_SP_GSM3) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V3; - amr_codecs_bitmask := g_pars.mr_conf.codec_modes; - } - case else { - log("RSL channel mode := ", g_pars.chan_mode.coding_alg_rate, - " is not supported by the L1, falling back to signalling"); + if (ischosen(g_pars.chan_mode.u.sign) and g_pars.chan_mode.u.sign == RSL_CMOD_NO_RESOURCE) { tch_mode := L1CTL_CHAN_MODE_SIGN; + } else if (ischosen(g_pars.chan_mode.u.speech)) { + select (g_pars.chan_mode.u.speech) { + case (RSL_CMOD_SP_GSM1) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V1; } + case (RSL_CMOD_SP_GSM2) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V2; } + case (RSL_CMOD_SP_GSM3) { tch_mode := L1CTL_CHAN_MODE_SPEECH_V3; + amr_codecs_bitmask := g_pars.mr_conf.codec_modes; + } + case else { + log("RSL channel mode := ", g_pars.chan_mode.u.speech, + " is not supported by the L1, falling back to signalling"); + tch_mode := L1CTL_CHAN_MODE_SIGN; + } } + } else { + log("RSL channel mode is not supported by the L1, falling back to signalling"); + tch_mode := L1CTL_CHAN_MODE_SIGN; } f_L1CTL_TCH_MODE(L1CTL, diff --git a/bts/BTS_Tests_VAMOS.ttcn b/bts/BTS_Tests_VAMOS.ttcn index 2d03411..c4bd171 100644 --- a/bts/BTS_Tests_VAMOS.ttcn +++ b/bts/BTS_Tests_VAMOS.ttcn @@ -174,7 +174,7 @@ for (var integer ch := 0; ch < lengthof(test[i]); ch := ch + 1) { pars[ch] := valueof(t_Pars(test[i][ch].chan_nr, test[i][ch].chan_mode)); - if (test[i][ch].chan_mode.coding_alg_rate == RSL_CMOD_SP_GSM3) { + if (ischosen(test[i][ch].chan_mode.u.speech) and test[i][ch].chan_mode.u.speech == RSL_CMOD_SP_GSM3) { pars[ch].mr_conf := valueof(ts_RSL_MultirateCfg); } vc_conn[ch] := f_start_handler(handler, pars[ch], l1ctl := false); @@ -248,10 +248,10 @@ /* If we're in signalling mode, modify to speech */ if (g_pars.chan_mode.spd_ind == RSL_SPDI_SIGN) { g_pars.chan_mode.spd_ind := RSL_SPDI_SPEECH; - g_pars.chan_mode.coding_alg_rate := RSL_CMOD_SP_GSM1; + g_pars.chan_mode.u.speech := RSL_CMOD_SP_GSM1; } else { /* ... or vice versa */ g_pars.chan_mode.spd_ind := RSL_SPDI_SIGN; - g_pars.chan_mode.coding_alg_rate := RSL_CMOD_NO_RESOURCE; + g_pars.chan_mode.u.sign := RSL_CMOD_NO_RESOURCE; } var RSL_Message rsl := valueof(ts_RSL_MODE_MODIFY_REQ(g_chan_nr, g_pars.chan_mode)); diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn index cad8a34..fff87f2 100644 --- a/library/RSL_Types.ttcn +++ b/library/RSL_Types.ttcn @@ -386,8 +386,10 @@ RSL_CHRT_OSMO_TCH_F_VAMOS ('10001000'B), RSL_CHRT_OSMO_TCH_H_VAMOS ('10001001'B) } with { variant "FIELDLENGTH(8)" }; - type enumerated RSL_SpeechAlgo { - RSL_CMOD_NO_RESOURCE ('00000000'B), + type enumerated RSL_ChanModeOct6Signalling { + RSL_CMOD_NO_RESOURCE ('00000000'B) + } with { variant "FIELDLENGTH(8)" }; + type enumerated RSL_ChanModeOct6SpeechAlgo { RSL_CMOD_SP_GSM1 ('00000001'B), RSL_CMOD_SP_GSM2 ('00010001'B), RSL_CMOD_SP_GSM3 ('00100001'B), @@ -395,6 +397,33 @@ RSL_CMOD_SP_GSM5 ('00001001'B), RSL_CMOD_SP_GSM6 ('00001101'B) } with { variant "FIELDLENGTH(8)" }; + type enumerated RSL_ChanModeOct6DataRate { + RSL_CMOD_CSD_NTA_43k5_14k5 ('01100001'B), + RSL_CMOD_CSD_NTA_29k0_14k5 ('01100010'B), + RSL_CMOD_CSD_NTA_43k5_29k0 ('01100011'B), + RSL_CMOD_CSD_NTA_14k5_43k5 ('01101001'B), + RSL_CMOD_CSD_NTA_14k5_29k0 ('01101010'B), + RSL_CMOD_CSD_NTA_29k0_43k5 ('01101011'B), + RSL_CMOD_CSD_NT_43k5 ('01110100'B), + RSL_CMOD_CSD_NT_28k8 ('01110001'B), + RSL_CMOD_CSD_NT_14k5 ('01011000'B), + RSL_CMOD_CSD_NT_12k0 ('01010000'B), + RSL_CMOD_CSD_NT_6k0 ('01010001'B), + RSL_CMOD_CSD_T_32k0 ('00111000'B), + RSL_CMOD_CSD_T_29k0 ('00111001'B), + RSL_CMOD_CSD_T_14k4 ('00011000'B), + RSL_CMOD_CSD_T_9k6 ('00010000'B), + RSL_CMOD_CSD_T_4k8 ('00010001'B), + RSL_CMOD_CSD_T_2k4 ('00010010'B), + RSL_CMOD_CSD_T_1k2 ('00010011'B), + RSL_CMOD_CSD_T_600 ('00010100'B), + RSL_CMOD_CSD_T_1200_75 ('00010101'B) + } with { variant "FIELDLENGTH(8)" }; + type union RSL_ChanModeOct6 { + RSL_ChanModeOct6Signalling sign, + RSL_ChanModeOct6SpeechAlgo speech, + RSL_ChanModeOct6DataRate data + }; type record RSL_IE_ChannelMode { uint8_t len, BIT6 reserved, @@ -402,8 +431,13 @@ boolean dtx_u, RSL_SpeechDataInd spd_ind, RSL_ChanRateType ch_rate_type, - RSL_SpeechAlgo coding_alg_rate - } with { variant (len) "LENGTHTO(reserved,dtx_d,dtx_u,spd_ind,ch_rate_type,coding_alg_rate)" } + RSL_ChanModeOct6 u + } with { variant (len) "LENGTHTO(reserved,dtx_d,dtx_u,spd_ind,ch_rate_type,u)" + variant (u) "CROSSTAG( + sign, spd_ind = RSL_SPDI_SIGN; + speech, spd_ind = RSL_SPDI_SPEECH; + data, spd_ind = RSL_SPDI_DATA; + )"} template (value) RSL_IE_ChannelMode ts_RSL_ChanMode_SIGN(RSL_ChanRateType t := RSL_CHRT_SDCCH, boolean dtx_downlink := false) := { @@ -413,10 +447,10 @@ dtx_u := false, spd_ind := RSL_SPDI_SIGN, ch_rate_type := t, - coding_alg_rate := RSL_CMOD_NO_RESOURCE + u := { sign := RSL_CMOD_NO_RESOURCE } } - template (value) RSL_IE_ChannelMode ts_RSL_ChanMode(RSL_ChanRateType t, RSL_SpeechAlgo alg, + template (value) RSL_IE_ChannelMode ts_RSL_ChanMode(RSL_ChanRateType t, RSL_ChanModeOct6SpeechAlgo alg, boolean dtx_downlink := false) := { len := 0, /* overwritten */ reserved := '000000'B, @@ -424,17 +458,17 @@ dtx_u := false, spd_ind := RSL_SPDI_SPEECH, ch_rate_type := t, - coding_alg_rate := alg + u := { speech := alg } } template RSL_IE_ChannelMode tr_RSL_ChanMode(template RSL_ChanRateType t, - template RSL_SpeechAlgo alg) := { + template RSL_ChanModeOct6SpeechAlgo alg) := { len := ?, reserved := '000000'B, dtx_d := ?, dtx_u := ?, spd_ind := RSL_SPDI_SPEECH, ch_rate_type := t, - coding_alg_rate := alg + u := { speech := alg } } /* 9.3.4 BS Power IE */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31556 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ief2d95c7e9d71afb26fa74da755294226c8e158d Gerrit-Change-Number: 31556 Gerrit-PatchSet: 7 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> 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]: layer23: get rid of lapdm_channel_init() warning
by laforge 05 Mar '23

05 Mar '23
Attention is currently required from: pespin, msuraev. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31664 ) Change subject: layer23: get rid of lapdm_channel_init() warning ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31664 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: If3be53a9f20e0f9e7cfb9ccd04ed54a3dcde44b8 Gerrit-Change-Number: 31664 Gerrit-PatchSet: 1 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: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sun, 05 Mar 2023 17:50:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmocom-bb[master]: mobile: drop duplicated #define
by laforge 05 Mar '23

05 Mar '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31663 ) Change subject: mobile: drop duplicated #define ...................................................................... mobile: drop duplicated #define Change-Id: If5bda46dcc5b541a9d08cfd880a2a8f181426484 --- M src/host/layer23/src/mobile/gsm48_rr.c 1 file changed, 20 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index 5d5e003..7cf222f 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -99,8 +99,6 @@ * support */ -#define MIN(a, b) ((a < b) ? a : b) - /* decode "Power Command" (10.5.2.28) and (10.5.2.28a) */ static int gsm48_decode_power_cmd_acc(struct gsm48_power_cmd *pc, uint8_t *power_level, uint8_t *atc) @@ -1797,7 +1795,7 @@ return -EINVAL; } - if (!memcmp(si, s->si1_msg, MIN(msgb_l3len(msg), sizeof(s->si1_msg)))) + if (!memcmp(si, s->si1_msg, OSMO_MIN(msgb_l3len(msg), sizeof(s->si1_msg)))) return 0; gsm48_decode_sysinfo1(s, si, msgb_l3len(msg)); @@ -1826,7 +1824,7 @@ return -EINVAL; } - if (!memcmp(si, s->si2_msg, MIN(msgb_l3len(msg), sizeof(s->si2_msg)))) + if (!memcmp(si, s->si2_msg, OSMO_MIN(msgb_l3len(msg), sizeof(s->si2_msg)))) return 0; gsm48_decode_sysinfo2(s, si, msgb_l3len(msg)); @@ -1855,7 +1853,7 @@ return -EINVAL; } - if (!memcmp(si, s->si2b_msg, MIN(msgb_l3len(msg), sizeof(s->si2b_msg)))) + if (!memcmp(si, s->si2b_msg, OSMO_MIN(msgb_l3len(msg), sizeof(s->si2b_msg)))) return 0; gsm48_decode_sysinfo2bis(s, si, msgb_l3len(msg)); @@ -1884,7 +1882,7 @@ return -EINVAL; } - if (!memcmp(si, s->si2t_msg, MIN(msgb_l3len(msg), sizeof(s->si2t_msg)))) + if (!memcmp(si, s->si2t_msg, OSMO_MIN(msgb_l3len(msg), sizeof(s->si2t_msg)))) return 0; gsm48_decode_sysinfo2ter(s, si, msgb_l3len(msg)); @@ -1914,7 +1912,7 @@ return -EINVAL; } - if (!memcmp(si, s->si3_msg, MIN(msgb_l3len(msg), sizeof(s->si3_msg)))) + if (!memcmp(si, s->si3_msg, OSMO_MIN(msgb_l3len(msg), sizeof(s->si3_msg)))) return 0; gsm48_decode_sysinfo3(s, si, msgb_l3len(msg)); @@ -1949,7 +1947,7 @@ return -EINVAL; } - if (!memcmp(si, s->si4_msg, MIN(msgb_l3len(msg), sizeof(s->si4_msg)))) + if (!memcmp(si, s->si4_msg, OSMO_MIN(msgb_l3len(msg), sizeof(s->si4_msg)))) return 0; gsm48_decode_sysinfo4(s, si, msgb_l3len(msg)); @@ -1981,7 +1979,7 @@ return -EINVAL; } - if (!memcmp(si, s->si5_msg, MIN(msgb_l3len(msg), sizeof(s->si5_msg)))) + if (!memcmp(si, s->si5_msg, OSMO_MIN(msgb_l3len(msg), sizeof(s->si5_msg)))) return 0; gsm48_decode_sysinfo5(s, si, msgb_l3len(msg)); @@ -2011,7 +2009,7 @@ return -EINVAL; } - if (!memcmp(si, s->si5b_msg, MIN(msgb_l3len(msg), + if (!memcmp(si, s->si5b_msg, OSMO_MIN(msgb_l3len(msg), sizeof(s->si5b_msg)))) return 0; @@ -2042,7 +2040,7 @@ return -EINVAL; } - if (!memcmp(si, s->si5t_msg, MIN(msgb_l3len(msg), + if (!memcmp(si, s->si5t_msg, OSMO_MIN(msgb_l3len(msg), sizeof(s->si5t_msg)))) return 0; @@ -2074,7 +2072,7 @@ return -EINVAL; } - if (!memcmp(si, s->si6_msg, MIN(msgb_l3len(msg), sizeof(s->si6_msg)))) + if (!memcmp(si, s->si6_msg, OSMO_MIN(msgb_l3len(msg), sizeof(s->si6_msg)))) return 0; gsm48_decode_sysinfo6(s, si, msgb_l3len(msg)); @@ -2108,7 +2106,7 @@ return -EINVAL; } - if (!memcmp(si, s->si13_msg, MIN(msgb_l3len(msg), sizeof(s->si6_msg)))) + if (!memcmp(si, s->si13_msg, OSMO_MIN(msgb_l3len(msg), sizeof(s->si6_msg)))) return 0; gsm48_decode_sysinfo13(s, si, msgb_l3len(msg)); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31663 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: If5bda46dcc5b541a9d08cfd880a2a8f181426484 Gerrit-Change-Number: 31663 Gerrit-PatchSet: 1 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-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • ...
  • 365
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.