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

July 2023

  • 1 participants
  • 3051 discussions
[M] Change in osmo-bts[master]: ASCI: Add Notification/FACCH support
by jolly 19 Jul '23

19 Jul '23
Attention is currently required from: fixeria, pespin, dexter. jolly has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/33448 ) Change subject: ASCI: Add Notification/FACCH support ...................................................................... Patch Set 6: (3 comments) File include/osmo-bts/notification.h: https://gerrit.osmocom.org/c/osmo-bts/+/33448/comment/fc4a1947_2ff8fc2b PS5, Line 60: int facch_gen_msg(struct gsm_bts *bts, uint8_t *out_buf, const uint8_t *group_call_ref, const uint8_t *chan_desc, > As far as I understand this is an ASCI related function. […] Done File src/common/rsl.c: https://gerrit.osmocom.org/c/osmo-bts/+/33448/comment/f36a6db5_af29deaa PS5, Line 814: broadcast_facch > Maybe it would be good to add a comment to clarify this? Done https://gerrit.osmocom.org/c/osmo-bts/+/33448/comment/d28634e5_81a8f0c3 PS5, Line 814: static int broadcast_facch(struct gsm_bts *bts, const uint8_t *group_call_ref, const uint8_t *chan_desc, > maybe rename this asci_broadcast_facch, so that it is more clear that this function is asci related? […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33448 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I3ed14fa54a907891e492a7ada8e745a2c56cd46d Gerrit-Change-Number: 33448 Gerrit-PatchSet: 6 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 19 Jul 2023 12:59:12 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: ASCI: Add Notification CHannel (NCH) support
by jolly 19 Jul '23

19 Jul '23
Attention is currently required from: jolly, pespin, dexter. Hello osmith, Jenkins Builder, laforge, pespin, dexter, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/33297 to look at the new patch set (#7). Change subject: ASCI: Add Notification CHannel (NCH) support ...................................................................... ASCI: Add Notification CHannel (NCH) support The location of the NCH is defined by the rest octet of System Information 1. If NCH is defined, the given CCCH blocks are used for NCH instead of AGCH/PCH. The current list of VGCS/VBS call notifications is transmitted on the NCH. If there is no notification, an empty notification is transmitted on the NCH. The Notification List Number (NLN) is used to indicated new notificaitons. Only the last notification (or empty notification) indicates NLN. This way the MS can determine after two equal NLN that the complete list has been recevied. Change-Id: I82fdaba3faaced76267a99ae14a5458a1b41fdaa Related: OS#5781 --- M include/osmo-bts/bts.h M include/osmo-bts/notification.h M src/common/bts.c M src/common/l1sap.c M src/common/notification.c M tests/agch/agch_test.c 6 files changed, 129 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/97/33297/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33297 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I82fdaba3faaced76267a99ae14a5458a1b41fdaa Gerrit-Change-Number: 33297 Gerrit-PatchSet: 7 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in osmo-bts[master]: ASCI: Retrieve NCH position from System Information 1
by jolly 19 Jul '23

19 Jul '23
Attention is currently required from: osmith, jolly, fixeria, pespin. Hello osmith, Jenkins Builder, laforge, fixeria, pespin, dexter, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/33296 to look at the new patch set (#7). Change subject: ASCI: Retrieve NCH position from System Information 1 ...................................................................... ASCI: Retrieve NCH position from System Information 1 When BCCH INFO is received via RSL message, the rest octet of the System Information 1 message is parsed to get the position of the NCH. The position is stored in the gsm_bts structure. If the position is not present int the rest octet, the stored value is set to negative. Change-Id: I799a27179d478d4ff577d8bc47ae524834851e85 Related: OS#5781 --- M include/osmo-bts/bts.h M include/osmo-bts/bts_trx.h M src/common/rsl.c M src/common/sysinfo.c 4 files changed, 41 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/96/33296/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33296 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I799a27179d478d4ff577d8bc47ae524834851e85 Gerrit-Change-Number: 33296 Gerrit-PatchSet: 7 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[L] Change in osmo-bts[master]: ASCI: VGCS/VBS RACH -> RSL TALKER/LISTENER DETECT
by jolly 19 Jul '23

19 Jul '23
Attention is currently required from: jolly, pespin. Hello osmith, Jenkins Builder, fixeria, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/33292 to look at the new patch set (#7). Change subject: ASCI: VGCS/VBS RACH -> RSL TALKER/LISTENER DETECT ...................................................................... ASCI: VGCS/VBS RACH -> RSL TALKER/LISTENER DETECT Random access is allowed on VGCS / VBS channels to access the uplink or to detect listeners. Uplink Access from a listener is only reported once after activating the channel. Uplink Access from a talker is reported each time the uplink becomes occupied. RSL TALKER/LISTENER DETECT messages are sent to the bsc. The VGCS UPLINK GRANT message is sent by the BTS itself. Timer T3115 is used to repeat the message up to NY2 times until one valid frame is received from the MS (CM service request). The UPLINK BUSY / UPLINK FREE message must be sent by the BSC. The uplink is released by UPLINK RELEASE message from the MS or from the BSC. Afterwards the UPLINK FREE message causes the MS to leave the uplink without any acknowlege. An RSL REL-REQ must be used to terminate the link locally. (Without layer 2 DISC procedure.) Change-Id: I1bd07ab6802341b09a06e89df356665ffaf6d2bf Related: OS#4851 --- M include/osmo-bts/Makefile.am A include/osmo-bts/asci.h M include/osmo-bts/bts.h M include/osmo-bts/l1sap.h M include/osmo-bts/lchan.h M include/osmo-bts/rsl.h M src/common/Makefile.am A src/common/asci.c M src/common/bts.c M src/common/l1sap.c M src/common/lchan.c M src/common/oml.c M src/common/rsl.c M src/osmo-bts-sysmo/oml.c 14 files changed, 371 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/92/33292/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33292 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1bd07ab6802341b09a06e89df356665ffaf6d2bf Gerrit-Change-Number: 33292 Gerrit-PatchSet: 7 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in osmo-bts[master]: ASCI: Enable UPLINK ACCESS on various BTS models
by jolly 19 Jul '23

19 Jul '23
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/33833 ) Change subject: ASCI: Enable UPLINK ACCESS on various BTS models ...................................................................... ASCI: Enable UPLINK ACCESS on various BTS models UPLINK ACCESS (RACH on TCH) was enabled for osmo-bts-sysmo only. Now it is also enabled for: * osmo-bts-lc15 * osmo-bts-oc2g * osmo-bts-trx * osmo-bts-virtual Change-Id: Iae0db6bfcf6629c114436a79648e832c82835abe --- M src/osmo-bts-lc15/oml.c M src/osmo-bts-oc2g/oml.c M src/osmo-bts-trx/l1_if.c M src/osmo-bts-virtual/l1_if.c 4 files changed, 24 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/33/33833/1 diff --git a/src/osmo-bts-lc15/oml.c b/src/osmo-bts-lc15/oml.c index f6abc1b..892afd5 100644 --- a/src/osmo-bts-lc15/oml.c +++ b/src/osmo-bts-lc15/oml.c @@ -1164,7 +1164,7 @@ /* For handover, always start the main channel immediately. lchan->want_dl_sacch_active indicates whether dl * SACCH should be activated. Also, for HO, start the RACH SAPI. */ - if (lchan->ho.active == HANDOVER_ENABLED) + if (lchan->ho.active == HANDOVER_ENABLED || rsl_chan_rt_is_asci(lchan->rsl_chan_rt)) enqueue_sapi_act_cmd(lchan, GsmL1_Sapi_Rach, GsmL1_Dir_RxUplink); for (i = 0; i < s4l->num_sapis; i++) { diff --git a/src/osmo-bts-oc2g/oml.c b/src/osmo-bts-oc2g/oml.c index efa41aa..7117dfe 100644 --- a/src/osmo-bts-oc2g/oml.c +++ b/src/osmo-bts-oc2g/oml.c @@ -1179,7 +1179,7 @@ /* For handover, always start the main channel immediately. lchan->want_dl_sacch_active indicates whether dl * SACCH should be activated. Also, for HO, start the RACH SAPI. */ - if (lchan->ho.active == HANDOVER_ENABLED) + if (lchan->ho.active == HANDOVER_ENABLED || rsl_chan_rt_is_asci(lchan->rsl_chan_rt)) enqueue_sapi_act_cmd(lchan, GsmL1_Sapi_Rach, GsmL1_Dir_RxUplink); for (i = 0; i < s4l->num_sapis; i++) { diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index 60f9232..a1329a8 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -45,6 +45,7 @@ #include <osmo-bts/scheduler.h> #include <osmo-bts/pcu_if.h> #include <osmo-bts/nm_common_fsm.h> +#include <osmo-bts/handover.h> #include "l1_if.h" #include "trx_if.h" @@ -452,7 +453,8 @@ lchan->tch.amr_mr.mode[2].mode, lchan->tch.amr_mr.mode[3].mode, amr_get_initial_mode(lchan), - (lchan->ho.active == 1)); + (lchan->ho.active == HANDOVER_ENABLED) || + rsl_chan_rt_is_asci(lchan->rsl_chan_rt)); /* set lchan active */ lchan_set_state(lchan, LCHAN_S_ACTIVE); /* set initial ciphering */ diff --git a/src/osmo-bts-virtual/l1_if.c b/src/osmo-bts-virtual/l1_if.c index 6410d9d..2408557 100644 --- a/src/osmo-bts-virtual/l1_if.c +++ b/src/osmo-bts-virtual/l1_if.c @@ -42,6 +42,7 @@ #include <osmo-bts/amr.h> #include <osmo-bts/abis.h> #include <osmo-bts/scheduler.h> +#include <osmo-bts/handover.h> #include "virtual_um.h" extern int vbts_sched_start(struct gsm_bts *bts); @@ -383,7 +384,8 @@ lchan->tch.amr_mr.mode[2].mode, lchan->tch.amr_mr.mode[3].mode, amr_get_initial_mode(lchan), - (lchan->ho.active == 1)); + (lchan->ho.active == HANDOVER_ENABLED || + rsl_chan_rt_is_asci(lchan->rsl_chan_rt))); /* set lchan active */ lchan_set_state(lchan, LCHAN_S_ACTIVE); /* set initial ciphering */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iae0db6bfcf6629c114436a79648e832c82835abe Gerrit-Change-Number: 33833 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-bts[master]: ASCI: Add Notification/FACCH support
by jolly 19 Jul '23

19 Jul '23
Attention is currently required from: jolly, fixeria, pespin. Hello osmith, Jenkins Builder, laforge, fixeria, pespin, dexter, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/33448 to look at the new patch set (#6). Change subject: ASCI: Add Notification/FACCH support ...................................................................... ASCI: Add Notification/FACCH support When a VGCS/VBS call is established in a cell, NCH is used to notify about ongoing calls to idle subscribers. Additionally Notification/FACCH is used to notify subscribers in dedicated mode. This is performed by broadcasting this messages to all active dedicated channels. The mobile station can then indicate the call, so the user can join the call. More importaint is the notification of the calling subscriber's MS, which initiated the call. This is done on the early assigned channel. The MS must know on which channel the call is placed. After leaving the uplink, it must know where to access the uplink the next time. Change-Id: I3ed14fa54a907891e492a7ada8e745a2c56cd46d Related: OS#4851, OS#5781 --- M include/osmo-bts/notification.h M src/common/notification.c M src/common/rsl.c 3 files changed, 104 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/48/33448/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33448 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I3ed14fa54a907891e492a7ada8e745a2c56cd46d Gerrit-Change-Number: 33448 Gerrit-PatchSet: 6 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[L] Change in osmo-bts[master]: l1sap: proper rate adaptation for CSD (RFC4040 'clearmode')
by fixeria 19 Jul '23

19 Jul '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/33832 ) Change subject: l1sap: proper rate adaptation for CSD (RFC4040 'clearmode') ...................................................................... l1sap: proper rate adaptation for CSD (RFC4040 'clearmode') Since 95407f3f osmo-bts-trx supports scheduling all CSD specific channel rates, however the rate adaptation was missing. On the radio interface we deal with CSD-modified V.110 frames, which need to be converted to normal 80-bit V.110 frames (RA1'/RA1), which in turn need to be batched and sent in RFC4040 "clearmode" 160 octet RTP payloads (RA1/RA2 as per I.460). Change-Id: I5e3701ad52d5d428fd02caff037881045f2d0a02 Related: OS#1572 --- M include/osmo-bts/Makefile.am A include/osmo-bts/csd_v110.h M src/common/Makefile.am A src/common/csd_v110.c M src/common/l1sap.c 5 files changed, 250 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/32/33832/1 diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index 1a07287..3e54035 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -23,6 +23,7 @@ tx_power.h \ control_if.h \ cbch.h \ + csd_v110.h \ l1sap.h \ lchan.h \ power_control.h \ diff --git a/include/osmo-bts/csd_v110.h b/include/osmo-bts/csd_v110.h new file mode 100644 index 0000000..b80f95d --- /dev/null +++ b/include/osmo-bts/csd_v110.h @@ -0,0 +1,11 @@ +#pragma once + +/* RFC4040 "clearmode" RTP payload length */ +#define RFC4040_RTP_PLEN 160 + +struct gsm_lchan; + +int csd_v110_rtp_encode(const struct gsm_lchan *lchan, uint8_t *rtp, + const uint8_t *data, size_t data_len); +int csd_v110_rtp_decode(const struct gsm_lchan *lchan, uint8_t *data, + const uint8_t *rtp, size_t rtp_len); diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 270139c..beae875 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -50,6 +50,7 @@ bts_ctrl_commands.c \ bts_ctrl_lookup.c \ bts_shutdown_fsm.c \ + csd_v110.c \ l1sap.c \ cbch.c \ power_control.c \ diff --git a/src/common/csd_v110.c b/src/common/csd_v110.c new file mode 100644 index 0000000..f800f4c --- /dev/null +++ b/src/common/csd_v110.c @@ -0,0 +1,166 @@ +/* + * (C) 2023 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * Author: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de> + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 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. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include <stdint.h> +#include <errno.h> + +#include <osmocom/core/bits.h> +#include <osmocom/core/utils.h> +#include <osmocom/gsm/gsm44021.h> +#include <osmocom/gsm/gsm_utils.h> +#include <osmocom/gsm/protocol/gsm_04_08.h> +#include <osmocom/isdn/v110.h> + +#include <osmo-bts/csd_v110.h> +#include <osmo-bts/lchan.h> + +#define DATA_RATE(type, mode) ((type << 8) | mode) + +static int lchan_data_rate(const struct gsm_lchan *lchan, + size_t *num_blocks, + size_t *num_bits) +{ + switch (DATA_RATE(lchan->type, lchan->tch_mode)) { + /* TCH/F9.6: 4 * 60 bits every 20 ms (12.0 kbit/s) */ + case DATA_RATE(GSM_LCHAN_TCH_F, GSM48_CMODE_DATA_12k0): + *num_blocks = 4; + *num_bits = 60; + break; + /* TCH/F4.8: 2 * 60 bits every 20 ms (6.0 kbit/s) */ + case DATA_RATE(GSM_LCHAN_TCH_F, GSM48_CMODE_DATA_6k0): + *num_blocks = 2; + *num_bits = 60; + break; + /* TCH/H4.8: 4 * 60 bits every 40 ms (6.0 kbit/s) */ + case DATA_RATE(GSM_LCHAN_TCH_H, GSM48_CMODE_DATA_6k0): + *num_blocks = 4; + *num_bits = 60; + break; + /* TCH/F2.4: 2 * 36 bits every 20 ms (3.6 kbit/s) */ + case DATA_RATE(GSM_LCHAN_TCH_F, GSM48_CMODE_DATA_3k6): + *num_blocks = 2; + *num_bits = 36; + break; + /* TCH/H2.4: 4 * 36 bits every 40 ms (3.6 kbit/s) */ + case DATA_RATE(GSM_LCHAN_TCH_H, GSM48_CMODE_DATA_3k6): + *num_blocks = 4; + *num_bits = 36; + break; + /* TODO: TCH/F14.4: 290 bits every 20 ms (14.5 kbit/s) */ + case DATA_RATE(GSM_LCHAN_TCH_F, GSM48_CMODE_DATA_14k5): + default: + return -ENOTSUP; + } + + return 0; +} + +int csd_v110_rtp_encode(const struct gsm_lchan *lchan, uint8_t *rtp, + const uint8_t *data, size_t data_len) +{ + size_t num_blocks, num_bits; + ubit_t ra_bits[80 * 4]; + int rc; + + rc = lchan_data_rate(lchan, &num_blocks, &num_bits); + if (rc) + return rc; + + /* handle empty/incomplete frames gracefully */ + if (OSMO_UNLIKELY(data_len < (num_blocks * num_bits))) { + /* reuse ra_bits[]: fake a frame with all bits set to zero */ + memset(&ra_bits[0], 0x00, sizeof(ra_bits)); + data_len = num_blocks * num_bits; + data = &ra_bits[0]; + } + + /* RA1'/RA1: convert to an intermediate data rate */ + for (unsigned int i = 0; i < num_blocks; i++) { + struct osmo_v110_decoded_frame df; + + /* convert modified V.110 frames to normal V.110 frames */ + if (num_bits == 60) + osmo_csd_12k_6k_decode_frame(&df, &data[i * 60], 60); + else /* num_bits == 36 */ + osmo_csd_3k6_decode_frame(&df, &data[i * 36], 36); + osmo_v110_encode_frame(&ra_bits[i * 80], 80, &df); + } + + /* RA1/RA2: convert from an intermediate rate to 64 kbit/s */ + if (num_blocks == 4) { + /* 4 * 80 bits (16 kbit/s) => 2 bits per octet */ + for (unsigned int i = 0, j = 0; i < RFC4040_RTP_PLEN; i++) { + rtp[i] = (0xff >> 2); + rtp[i] |= ra_bits[j++] << 7; + rtp[i] |= ra_bits[j++] << 6; + } + } else { + /* 2 * 80 bits (8 kbit/s) => 1 bit per octet */ + for (unsigned int i = 0; i < RFC4040_RTP_PLEN; i++) { + rtp[i] = (0xff >> 1); + rtp[i] |= ra_bits[i] << 7; + } + } + + return RFC4040_RTP_PLEN; +} + +int csd_v110_rtp_decode(const struct gsm_lchan *lchan, uint8_t *data, + const uint8_t *rtp, size_t rtp_len) +{ + size_t num_blocks, num_bits; + ubit_t ra_bits[80 * 4]; + int rc; + + rc = lchan_data_rate(lchan, &num_blocks, &num_bits); + if (rc) + return rc; + + if (OSMO_UNLIKELY(rtp_len != RFC4040_RTP_PLEN)) + return -EINVAL; + + /* RA1/RA2: convert from 64 kbit/s to an intermediate rate */ + if (num_blocks == 4) { + /* 4 * 80 bits (16 kbit/s) => 2 bits per octet */ + for (unsigned int i = 0, j = 0; i < RFC4040_RTP_PLEN; i++) { + ra_bits[j++] = rtp[i] >> 7; + ra_bits[j++] = rtp[i] >> 6; + } + } else { + /* 2 * 80 bits (8 kbit/s) => 1 bit per octet */ + for (unsigned int i = 0; i < RFC4040_RTP_PLEN; i++) + ra_bits[i] = rtp[i] >> 7; + } + + /* RA1'/RA1: convert to an intermediate data rate */ + for (unsigned int i = 0; i < num_blocks; i++) { + struct osmo_v110_decoded_frame df; + + /* convert modified V.110 frames to normal V.110 frames */ + osmo_v110_decode_frame(&df, &ra_bits[i * 80], 80); + if (num_bits == 60) + osmo_csd_12k_6k_encode_frame(&data[i * 60], 60, &df); + else /* num_bits == 36 */ + osmo_csd_3k6_encode_frame(&data[i * 36], 36, &df); + } + + return num_blocks * num_bits; +} diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 7f61f2c..14074f0 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -57,6 +57,7 @@ #include <osmo-bts/rtp_input_preen.h> #include <osmo-bts/pcuif_proto.h> #include <osmo-bts/cbch.h> +#include <osmo-bts/csd_v110.h> /* determine the CCCH block number based on the frame number */ unsigned int l1sap_fn2ccch_block(uint32_t fn) @@ -1780,8 +1781,26 @@ return 1; } +static void send_ul_rtp_packet_data(struct gsm_lchan *lchan, uint32_t fn, + const uint8_t *data, uint16_t data_len) +{ + uint8_t rtp_pl[RFC4040_RTP_PLEN]; + int rc; + + rc = csd_v110_rtp_encode(lchan, &rtp_pl[0], data, data_len); + if (rc < 0) + return; + + osmo_rtp_send_frame_ext(lchan->abis_ip.rtp_socket, + &rtp_pl[0], sizeof(rtp_pl), + fn_ms_adj(fn, lchan), + lchan->rtp_tx_marker); + /* Only clear the marker bit once we have sent a RTP packet with it */ + lchan->rtp_tx_marker = false; +} + /* a helper function for the logic in l1sap_tch_ind() */ -static void send_ul_rtp_packet(struct gsm_lchan *lchan, uint32_t fn, +static void send_ul_rtp_packet_speech(struct gsm_lchan *lchan, uint32_t fn, const uint8_t *rtp_pl, uint16_t rtp_pl_len) { if (lchan->abis_ip.osmux.use) { @@ -1810,7 +1829,7 @@ else toc = 0x00; msgb_push_u8(msg, toc); - send_ul_rtp_packet(lchan, fn, msg->data, msg->len); + send_ul_rtp_packet_speech(lchan, fn, msg->data, msg->len); } /* A helper function for l1sap_tch_ind(): handling BFI @@ -1835,7 +1854,7 @@ /* did it actually give us some output? */ if (rc > 0) { /* yes, send it out in RTP */ - send_ul_rtp_packet(lchan, fn, ecu_out, rc); + send_ul_rtp_packet_speech(lchan, fn, ecu_out, rc); return; } } @@ -1843,7 +1862,7 @@ /* Are we in rtp continuous-streaming special mode? If so, send out * a BFI packet as zero-length RTP payload. */ if (lchan->ts->trx->bts->rtp_nogaps_mode) { - send_ul_rtp_packet(lchan, fn, NULL, 0); + send_ul_rtp_packet_speech(lchan, fn, NULL, 0); return; } @@ -1900,11 +1919,21 @@ if (lchan->ecu_state) osmo_ecu_frame_in(lchan->ecu_state, false, msg->data, msg->len); /* hand msg to RTP code for transmission */ - if (bts->emit_hr_rfc5993 && lchan->type == GSM_LCHAN_TCH_H && - lchan->tch_mode == GSM48_CMODE_SPEECH_V1) - send_rtp_rfc5993(lchan, fn, msg); - else - send_ul_rtp_packet(lchan, fn, msg->data, msg->len); + switch (lchan->rsl_cmode) { + case RSL_CMOD_SPD_SPEECH: + if (bts->emit_hr_rfc5993 && lchan->type == GSM_LCHAN_TCH_H && + lchan->tch_mode == GSM48_CMODE_SPEECH_V1) + send_rtp_rfc5993(lchan, fn, msg); + else + send_ul_rtp_packet_speech(lchan, fn, msg->data, msg->len); + break; + case RSL_CMOD_SPD_DATA: + send_ul_rtp_packet_data(lchan, fn, msg->data, msg->len); + break; + case RSL_CMOD_SPD_SIGN: + default: /* shall not happen */ + OSMO_ASSERT(0); + } /* if loopback is enabled, also queue received RTP data */ if (lchan->loopback) { /* add new frame to queue, make sure the queue doesn't get too long */ @@ -2191,10 +2220,23 @@ OSMO_ASSERT(0); } - msg = l1sap_msgb_alloc(rtp_pl_len); + msg = l1sap_msgb_alloc(512); if (!msg) return; - memcpy(msgb_put(msg, rtp_pl_len), rtp_pl, rtp_pl_len); + + if (lchan->rsl_cmode == RSL_CMOD_SPD_DATA) { + int rc = csd_v110_rtp_decode(lchan, msg->tail, + rtp_pl, rtp_pl_len); + if (rc > 0) { + msgb_put(msg, rc); + } else { + msgb_free(msg); + return; + } + } else { + memcpy(msgb_put(msg, rtp_pl_len), rtp_pl, rtp_pl_len); + } + msgb_pull(msg, sizeof(struct osmo_phsap_prim)); /* Store RTP header Marker bit in control buffer */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/33832 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I5e3701ad52d5d428fd02caff037881045f2d0a02 Gerrit-Change-Number: 33832 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in pysim[master]: requirements: add pyshark to requirements lists
by dexter 19 Jul '23

19 Jul '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/33831 ) Change subject: requirements: add pyshark to requirements lists ...................................................................... requirements: add pyshark to requirements lists pySim-trace.py requires pyshark, let's add it to the requirement lists Change-Id: I885c7210aac3774a5f1f5201903ad2bff94c3120 --- M README.md M requirements.txt M setup.py 3 files changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/31/33831/1 diff --git a/README.md b/README.md index 2a89c9a..2a79fb3 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ - colorlog - packaging - pycryptodomex + - pyshark Example for Debian: ```sh diff --git a/requirements.txt b/requirements.txt index 4332b66..665b09e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,4 +11,5 @@ colorlog pycryptodomex packaging +pyshark git+https://github.com/hologram-io/smpp.pdu diff --git a/setup.py b/setup.py index f776443..a16fca7 100644 --- a/setup.py +++ b/setup.py @@ -22,6 +22,7 @@ "colorlog", "pycryptodomex", "packaging", + "pyshark", "smpp.pdu @ git+https://github.com/hologram-io/smpp.pdu", ], scripts=[ -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33831 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I885c7210aac3774a5f1f5201903ad2bff94c3120 Gerrit-Change-Number: 33831 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-sgsn[master]: gmm: Add missing GSM48_IE_GMM_RX_NPDU_NUM_LIST IE in gsm48_gmm_att_tl...
by fixeria 19 Jul '23

19 Jul '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/33807 ) Change subject: gmm: Add missing GSM48_IE_GMM_RX_NPDU_NUM_LIST IE in gsm48_gmm_att_tlvdef ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/33807 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I5b43384407b1c9c33790cae9c48c2816213578e6 Gerrit-Change-Number: 33807 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 19 Jul 2023 11:13:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-remsim[master]: user_simtrace2: Fix uninitialized ifm->path
by fixeria 19 Jul '23

19 Jul '23
Attention is currently required from: laforge, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/33790 ) Change subject: user_simtrace2: Fix uninitialized ifm->path ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/33790 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I2bd0dac76b6d028d10f12f3f58a2aee123ca8562 Gerrit-Change-Number: 33790 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 19 Jul 2023 11:11:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • ...
  • 306
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.