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

September 2024

  • 1 participants
  • 1983 discussions
[S] Change in pysim[master]: pySim-prog: generate Ki and OPc value using _digits() function
by dexter 17 Sep '24

17 Sep '24
dexter has abandoned this change. ( https://gerrit.osmocom.org/c/pysim/+/38164?usp=email ) Change subject: pySim-prog: generate Ki and OPc value using _digits() function ...................................................................... Abandoned unfortunately this is not secure, so we cannot solve the problem this way. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38164?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: abandon Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ib53d9d04a2073dafcca7cd21b0324bee5a23c540 Gerrit-Change-Number: 38164 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in pysim[master]: pySim-prog: add FIXME note to tell that writing hlr.db files is broken
by dexter 17 Sep '24

17 Sep '24
Attention is currently required from: laforge. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38162?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified+1 by Jenkins Builder Change subject: pySim-prog: add FIXME note to tell that writing hlr.db files is broken ...................................................................... pySim-prog: add FIXME note to tell that writing hlr.db files is broken The writing to osmo-hlr SQLITE files is broken since the SQLITE format has evolved over time. Let's add a FIXME note to tell that this needs fixing. Related: SYS#4120 Change-Id: I2b23f8bb9f3c2adeb48b010834057f5b4fb1e626 --- M pySim-prog.py 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/62/38162/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38162?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2b23f8bb9f3c2adeb48b010834057f5b4fb1e626 Gerrit-Change-Number: 38162 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in pysim[master]: pySim-prog: rework documentation
by dexter 17 Sep '24

17 Sep '24
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38166?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: pySim-prog: rework documentation ...................................................................... pySim-prog: rework documentation The documentation for the classic pySim-prog application is a bit sparse. Let's rework it so that it includes the most important information that is required to operate pySim-prog. Let's also add a section about how the batch mode and CSV files are used. Related: SYS#4120 Change-Id: I1d1a65154cea7fa77428b412fcf8c7b4cba629b1 --- M docs/legacy.rst 1 file changed, 171 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/66/38166/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38166?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1d1a65154cea7fa77428b412fcf8c7b4cba629b1 Gerrit-Change-Number: 38166 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in pysim[master]: pySim-prog: add FIXME note to tell that writing hlr.db files is broken
by dexter 17 Sep '24

17 Sep '24
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38162?usp=email ) Change subject: pySim-prog: add FIXME note to tell that writing hlr.db files is broken ...................................................................... Patch Set 3: (1 comment) File pySim-prog.py: https://gerrit.osmocom.org/c/pysim/+/38162/comment/aab5c7fd_92eb1560?usp=em… : PS2, Line 627: dabase > database Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38162?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2b23f8bb9f3c2adeb48b010834057f5b4fb1e626 Gerrit-Change-Number: 38162 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Tue, 17 Sep 2024 08:40:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in pysim[master]: pySim-prog: rework documentation
by dexter 17 Sep '24

17 Sep '24
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38166?usp=email ) Change subject: pySim-prog: rework documentation ...................................................................... Patch Set 3: (1 comment) File docs/legacy.rst: https://gerrit.osmocom.org/c/pysim/+/38166/comment/bc2e1501_9f41473b?usp=em… : PS1, Line 46: KI, OPc > Let's keep this one open until we made a decision. Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38166?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1d1a65154cea7fa77428b412fcf8c7b4cba629b1 Gerrit-Change-Number: 38166 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Tue, 17 Sep 2024 08:40:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-abis[master]: trau2rtp EFR unit test: add patterns with bad CRC
by falconia 16 Sep '24

16 Sep '24
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38184?usp=email ) Change subject: trau2rtp EFR unit test: add patterns with bad CRC ...................................................................... trau2rtp EFR unit test: add patterns with bad CRC Unlike its FRv1 counterpart, the TRAU frame format for EFR includes CRC, intended to catch transmission errors in terrestrial circuits. Add some bad CRC patterns to the unit test for osmo_trau2rtp() EFR. Change-Id: Iee69b6a1593bdc8d11904a5f2ad46cd0fc6052a9 --- M tests/trau_conv/trau16_efr.in M tests/trau_conv/trau16_efr_std.ok M tests/trau_conv/trau16_efr_twts001.ok 3 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/84/38184/1 diff --git a/tests/trau_conv/trau16_efr.in b/tests/trau_conv/trau16_efr.in index b4bdb02..0f113aa 100644 --- a/tests/trau_conv/trau16_efr.in +++ b/tests/trau_conv/trau16_efr.in @@ -78,3 +78,11 @@ 0000ebecca1b97f3b45086fffffc8000c68efffffe008046c07fffffe0008451fffcffe08004e2ff ID perfect SID with BFI=1 SID=0 0000ebe8ca1b97f3b45086fffffc8000c68efffffe008046c07fffffe0008451fffcffe08004e2ff + +# The following frames were also constructed by hand. They have bad CRC +# and thus test the handling of this case in osmo_trau2rtp(). + +ID all Dn bits set to 0 +0000ebe88000800080008000800080008000800080008000800080008000800080008000800082ff +ID all Dn bits set to 1 +0000ebe8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeff diff --git a/tests/trau_conv/trau16_efr_std.ok b/tests/trau_conv/trau16_efr_std.ok index 8fff73a..110cd0e 100644 --- a/tests/trau_conv/trau16_efr_std.ok +++ b/tests/trau_conv/trau16_efr_std.ok @@ -116,3 +116,11 @@ 0000ebe8ca1b97f3b45086fffffc8000c68efffffe008046c07fffffe0008451fffcffe08004e2ff TRAU frame type: EFR osmo_trau2rtp() result: 0 +ID all Dn bits set to 0 +0000ebe88000800080008000800080008000800080008000800080008000800080008000800082ff + TRAU frame type: EFR + osmo_trau2rtp() result: 0 +ID all Dn bits set to 1 +0000ebe8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeff + TRAU frame type: EFR + osmo_trau2rtp() result: 0 diff --git a/tests/trau_conv/trau16_efr_twts001.ok b/tests/trau_conv/trau16_efr_twts001.ok index 2b11d14..370d1ba 100644 --- a/tests/trau_conv/trau16_efr_twts001.ok +++ b/tests/trau_conv/trau16_efr_twts001.ok @@ -226,3 +226,13 @@ 0 12 15 15 15 15 12 0 0 0 0 0 17 12 12 15 12 15 15 12 0 0 0 0 0 19 SID recompute: 0 +ID all Dn bits set to 0 +0000ebe88000800080008000800080008000800080008000800080008000800080008000800082ff + TRAU frame type: EFR + osmo_trau2rtp() result: 1 + TW-TS-001 TEH octet: 0xE6 +ID all Dn bits set to 1 +0000ebe8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeff + TRAU frame type: EFR + osmo_trau2rtp() result: 1 + TW-TS-001 TEH octet: 0xE6 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38184?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Iee69b6a1593bdc8d11904a5f2ad46cd0fc6052a9 Gerrit-Change-Number: 38184 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org>
1 0
0 0
[M] Change in libosmo-abis[master]: trau2rtp unit test: add patterns that showcase BFI=1 SID=0
by pespin 16 Sep '24

16 Sep '24
Attention is currently required from: falconia. pespin has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38183?usp=email ) Change subject: trau2rtp unit test: add patterns that showcase BFI=1 SID=0 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38183?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ic6a0ad289864fe3e11192d158e3bbe221994eaaa Gerrit-Change-Number: 38183 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Mon, 16 Sep 2024 22:02:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in libosmo-abis[master]: trau2rtp TW-TS-001: handle corner case of BFI with stale SID bits
by pespin 16 Sep '24

16 Sep '24
Attention is currently required from: falconia. pespin has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38182?usp=email ) Change subject: trau2rtp TW-TS-001: handle corner case of BFI with stale SID bits ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38182?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I2800301f7ac25537c4d7fb14acefd73a80590d7c Gerrit-Change-Number: 38182 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Mon, 16 Sep 2024 22:01:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in libosmo-abis[master]: trau2rtp unit test: add patterns that showcase BFI=1 SID=0
by falconia 16 Sep '24

16 Sep '24
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38183?usp=email ) Change subject: trau2rtp unit test: add patterns that showcase BFI=1 SID=0 ...................................................................... trau2rtp unit test: add patterns that showcase BFI=1 SID=0 The previous patch added special handling for the corner case in which the BTS indicates BFI=1 SID=0, but the bit pattern is still SID by the bit counting rules of GSM 06.31 or 06.81 section 6.1.1. The selection of test patterns in the unit test already had some frames that exhibit this effect, taken from actual Abis output of Nokia InSite BTS, but the exact effect of our handling becomes more visible when the bit pattern forms a perfect (not corrupted) SID frame, which I haven't been able to produce with the InSite. Therefore, add some hand-crafted test frames that fully showcase the effect of our transform. Change-Id: Ic6a0ad289864fe3e11192d158e3bbe221994eaaa --- M tests/trau_conv/trau16_efr.in M tests/trau_conv/trau16_efr_std.ok M tests/trau_conv/trau16_efr_twts001.ok M tests/trau_conv/trau16_fr.in M tests/trau_conv/trau16_fr_std.ok M tests/trau_conv/trau16_fr_twts001.ok 6 files changed, 88 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/83/38183/1 diff --git a/tests/trau_conv/trau16_efr.in b/tests/trau_conv/trau16_efr.in index a0a3fa0..b4bdb02 100644 --- a/tests/trau_conv/trau16_efr.in +++ b/tests/trau_conv/trau16_efr.in @@ -66,3 +66,15 @@ 0000ebead10eba68ada886f7fbfca494ca8cfffffe4ba04ac07ffffff0048491fffcffe0a485c2ff ID efr-dtx-dtmf.bin frame 0x53af1 0000ebe8cf05b311adada617fbfca494c87afffffe4ba04ac214fffff00484affffcffe0a485deff + +# The following two frames have been constructed by hand, starting with +# efr-dtx.bin frame 0x3cad1 and editing the hex string for desired effect. +# The first constructed frame is a perfect SID that has BFI=1 set, +# the second constructed frame is the same with C13 cleared. +# The intent is to showcase the effect of the hacky logic that "breaks" +# the SID bit pattern when the metadata bits indicate BFI=1 SID=0. + +ID perfect SID with BFI=1 +0000ebecca1b97f3b45086fffffc8000c68efffffe008046c07fffffe0008451fffcffe08004e2ff +ID perfect SID with BFI=1 SID=0 +0000ebe8ca1b97f3b45086fffffc8000c68efffffe008046c07fffffe0008451fffcffe08004e2ff diff --git a/tests/trau_conv/trau16_efr_std.ok b/tests/trau_conv/trau16_efr_std.ok index 1f09a0b..8fff73a 100644 --- a/tests/trau_conv/trau16_efr_std.ok +++ b/tests/trau_conv/trau16_efr_std.ok @@ -108,3 +108,11 @@ 0000ebe8cf05b311adada617fbfca494c87afffffe4ba04ac214fffff00484affffcffe0a485deff TRAU frame type: EFR osmo_trau2rtp() result: 0 +ID perfect SID with BFI=1 +0000ebecca1b97f3b45086fffffc8000c68efffffe008046c07fffffe0008451fffcffe08004e2ff + TRAU frame type: EFR + osmo_trau2rtp() result: 0 +ID perfect SID with BFI=1 SID=0 +0000ebe8ca1b97f3b45086fffffc8000c68efffffe008046c07fffffe0008451fffcffe08004e2ff + TRAU frame type: EFR + osmo_trau2rtp() result: 0 diff --git a/tests/trau_conv/trau16_efr_twts001.ok b/tests/trau_conv/trau16_efr_twts001.ok index 761f03b..2b11d14 100644 --- a/tests/trau_conv/trau16_efr_twts001.ok +++ b/tests/trau_conv/trau16_efr_twts001.ok @@ -202,3 +202,27 @@ 16 8 7 15 15 15 14 0 0 1 0 0 18 60 12 15 12 15 15 12 0 2 2 2 0 22 SID recompute: 0 +ID perfect SID with BFI=1 +0000ebecca1b97f3b45086fffffc8000c68efffffe008046c07fffffe0008451fffcffe08004e2ff + TRAU frame type: EFR + osmo_trau2rtp() result: 32 + TW-TS-001 TEH octet: 0xE2 + EFR frame: + LPC 20 54 191 155 17 + 3 7 15 15 15 15 12 0 0 0 0 0 17 + 7 7 15 15 15 15 12 0 0 0 0 0 17 + 3 15 15 15 15 15 12 0 0 0 0 0 17 + 15 15 15 12 15 15 12 0 0 0 0 0 19 + SID recompute: 2 +ID perfect SID with BFI=1 SID=0 +0000ebe8ca1b97f3b45086fffffc8000c68efffffe008046c07fffffe0008451fffcffe08004e2ff + TRAU frame type: EFR + osmo_trau2rtp() result: 32 + TW-TS-001 TEH octet: 0xE2 + EFR frame: + LPC 20 54 191 155 17 + 0 4 15 15 15 15 12 0 0 0 0 0 17 + 4 4 15 15 15 15 12 0 0 0 0 0 17 + 0 12 15 15 15 15 12 0 0 0 0 0 17 + 12 12 15 12 15 15 12 0 0 0 0 0 19 + SID recompute: 0 diff --git a/tests/trau_conv/trau16_fr.in b/tests/trau_conv/trau16_fr.in index 2b3f20a..1153e34 100644 --- a/tests/trau_conv/trau16_fr.in +++ b/tests/trau_conv/trau16_fr.in @@ -55,3 +55,15 @@ ID fr1-dtx.bin frame 0x104d1 000088b8ee49c3b2e00691e58000800080f1889fa000800086948004c8008000821b90009000caff + +# The following two frames have been constructed by hand, starting with +# fr1-dtx.bin frame 0x8051 and editing the hex string for desired effect. +# The first constructed frame is a perfect SID that has BFI=1 set, +# the second constructed frame is the same with C13 cleared. +# The intent is to showcase the effect of the hacky logic that "breaks" +# the SID bit pattern when the metadata bits indicate BFI=1 SID=0. + +ID perfect SID with BFI=1 +000088bcb58ee6ee92008000800080008000800080008000800080008000800080008000800082ff +ID perfect SID with BFI=1 SID=0 +000088b8b58ee6ee92008000800080008000800080008000800080008000800080008000800082ff diff --git a/tests/trau_conv/trau16_fr_std.ok b/tests/trau_conv/trau16_fr_std.ok index 584bade..baad06f 100644 --- a/tests/trau_conv/trau16_fr_std.ok +++ b/tests/trau_conv/trau16_fr_std.ok @@ -92,3 +92,11 @@ 000088b8ee49c3b2e00691e58000800080f1889fa000800086948004c8008000821b90009000caff TRAU frame type: FR osmo_trau2rtp() result: 0 +ID perfect SID with BFI=1 +000088bcb58ee6ee92008000800080008000800080008000800080008000800080008000800082ff + TRAU frame type: FR + osmo_trau2rtp() result: 0 +ID perfect SID with BFI=1 SID=0 +000088b8b58ee6ee92008000800080008000800080008000800080008000800080008000800082ff + TRAU frame type: FR + osmo_trau2rtp() result: 0 diff --git a/tests/trau_conv/trau16_fr_twts001.ok b/tests/trau_conv/trau16_fr_twts001.ok index 5cef573..bc31762 100644 --- a/tests/trau_conv/trau16_fr_twts001.ok +++ b/tests/trau_conv/trau16_fr_twts001.ok @@ -154,3 +154,27 @@ 64 1 1 10 2 2 2 2 1 1 1 0 0 0 0 0 0 0 0 0 33 7 3 3 2 0 0 0 1 0 0 0 2 2 SID recompute: 0 +ID perfect SID with BFI=1 +000088bcb58ee6ee92008000800080008000800080008000800080008000800080008000800082ff + TRAU frame type: FR + osmo_trau2rtp() result: 34 + TW-TS-001 TEH octet: 0xE2 + FR frame: + LARc 22 35 27 12 7 7 4 4 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + SID recompute: 2 +ID perfect SID with BFI=1 SID=0 +000088b8b58ee6ee92008000800080008000800080008000800080008000800080008000800082ff + TRAU frame type: FR + osmo_trau2rtp() result: 34 + TW-TS-001 TEH octet: 0xE2 + FR frame: + LARc 22 35 27 12 7 7 4 4 + 0 0 0 0 2 2 2 2 0 0 0 0 0 0 0 0 0 + 0 0 0 0 2 2 2 2 0 0 0 0 0 0 0 0 0 + 0 0 0 0 2 2 2 2 0 0 0 0 0 0 0 0 0 + 0 0 0 0 2 2 2 2 0 0 0 0 0 0 0 0 0 + SID recompute: 0 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38183?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ic6a0ad289864fe3e11192d158e3bbe221994eaaa Gerrit-Change-Number: 38183 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org>
1 0
0 0
[M] Change in libosmo-abis[master]: trau2rtp TW-TS-001: handle corner case of BFI with stale SID bits
by falconia 16 Sep '24

16 Sep '24
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38182?usp=email ) Change subject: trau2rtp TW-TS-001: handle corner case of BFI with stale SID bits ...................................................................... trau2rtp TW-TS-001: handle corner case of BFI with stale SID bits Many BTS models will emit the previous content of their internal buffer, perhaps corrupted in some peculiar way, when they need to emit "BFI with no data" because they received FACCH, or because they received nothing at all and no channel decoding attempt was made. This situation is described in detail here: https://osmocom.org/projects/retro-gsm/wiki/No-data_output However, when these TRAU-UL BFIs (from Abis or from incoming TFO) are to be converted to TW-TS-001 with osmo_trau2rtp(), a corner case arises: if the BTS indicated SID=0 by way of C13 & C14 bits but the stale payload bit content indicates SID != 0, the full decoder or TFO transform on the receiving end of the RTP stream will get an erroneous "invalid SID" indication (instead of "plain" BFI) if the marked-bad payload is passed through without alteration. Handle this corner case by modifying marked-bad (BFI=1) payloads to make them non-SID in the special case when the BTS indicated SID=0, but the bit pattern says otherwise. Change-Id: I2800301f7ac25537c4d7fb14acefd73a80590d7c --- M src/trau/trau_rtp_conv.c M tests/trau_conv/trau16_efr_twts001.ok M tests/trau_conv/trau16_fr_twts001.ok 3 files changed, 137 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/82/38182/1 diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index 1a200c7..24ea70c 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -98,6 +98,36 @@ //static const uint8_t c_bits_check_fr[] = { 0, 0, 0, 1, 0 }; //static const uint8_t c_bits_check_efr[] = { 1, 1, 0, 1, 0 }; +/* + * This little helper function modifies a marked-bad (BFI=1) GSM-FR payload + * so it would no longer classify as SID by the bit counting rules + * of GSM 06.31 section 6.1.1. It is needed at times when a BTS emits + * "BFI with no data", out-of-band SID bits (C13 & C14) are set to 0, + * but the stale bit pattern in the output buffer used by the BTS + * happens to be (usually invalid) SID. + * + * In order to reliably "break the SID", we need to set 16 bits in the + * SID field to values opposite of SID codeword, i.e., to 1 for GSM-FR. + * The SID field of GSM-FR includes the msb of every xMc pulse, and also + * the middle bit of most (but not all) xMc pulses. The pulses whose + * middle bit is not part of the SID field are the last 9 pulses of + * the last subframe. For simplicity, we produce the desired effect + * by setting the middle bit of pulses 0, 1, 2 and 3 in every subframe, + * for a total of 16 bits. + */ +static void make_fr_bfi_nonsid(uint8_t *fr_bytes) +{ + uint8_t *subf_bytes; + unsigned subn; + + subf_bytes = fr_bytes + 5; /* skip signature and LARc bits */ + for (subn = 0; subn < 4; subn++) { + subf_bytes[2] |= 0x24; + subf_bytes[3] |= 0x90; + subf_bytes += 7; + } +} + /*! Generate the 33 bytes RTP payload for GSM-FR from a decoded TRAU frame. * \param[out] out caller-provided output buffer * \param[in] out_len length of out buffer in bytes @@ -153,6 +183,36 @@ j++; } + /* + * Many BTS models will emit the previous content of their internal + * buffer, perhaps corrupted in some peculiar way, when they need to + * emit "BFI with no data" because they received FACCH, or because + * they received nothing at all and no channel decoding attempt was + * made. When this situation occurs, the Rx DTX handler in the TRAU + * needs to be told "this is a regular BFI, not an invalid SID", + * and the BTS makes this indication by setting C12=1 (BFI), + * C13=0 and C14=0 (SID=0). However, the stale or corrupted frame + * payload bit content in the Abis output buffer will still sometimes + * indicate SID (usually invalid) by the bit counting rules of + * GSM 06.31 section 6.1.1! This situation creates a problem + * in the case of TW-TS-001 output: there are no out-of-band bits + * for C13 & C14, and when the remote transcoder or TFO transform + * calls osmo_fr_sid_classify() or its libgsmfr2 equivalent, + * it will detect an invalid SID (always invalid due to BFI=1) + * instead of intended-by-BTS "regular BFI". Solution: because + * there is no need to preserve all payload bits that are known + * to be bad or dummy, we can afford to corrupt some of them; + * as a workaround for the unintentional-SID problem, we "break" + * the SID field. + * + * Note that BFI=1 is a required condition for the logic below. + * Because standard RFC 3551 output does not support BFI, + * this logic applies only to TW-TS-001 output. + */ + if (tf->c_bits[11] && !tf->c_bits[12] && !tf->c_bits[13] && + osmo_fr_is_any_sid(out)) + make_fr_bfi_nonsid(out); + return req_out_len; } @@ -356,6 +416,38 @@ } } +/* + * This little helper function modifies a marked-bad (BFI=1) GSM-EFR payload + * so it would no longer classify as SID by the bit counting rules + * of GSM 06.81 section 6.1.1. It is needed at times when a BTS emits + * "BFI with no data", out-of-band SID bits (C13 & C14) are set to 0, + * but the stale bit pattern in the output buffer used by the BTS + * happens to be (usually invalid) SID. + * + * In order to reliably "break the SID", we need to set 16 bits in the + * SID field to values opposite of SID codeword, i.e., to 0 for GSM-EFR. + * The SID field of GSM-EFR includes (in every subframe) some bits in + * LTP lag and LTP gain fields, and many bits in the fixed codebook + * excitation pulses portion. The reference decoder from ETSI makes use + * of the fixed codebook portion even in marked-bad frames, hence + * we prefer not to corrupt this portion - but we can still reliably + * break the SID by clearing some bits in LTP lag and gain fields. + * Let's clear the two lsbs of each LTP lag and LTP gain field, + * giving us the needed total of 16 bits. + */ +static void make_efr_bfi_nonsid(uint8_t *efr_bytes) +{ + /* subframe 0 */ + efr_bytes[6] &= 0x99; + /* subframe 1 */ + efr_bytes[12] &= 0xE6; + efr_bytes[13] &= 0x7F; + /* subframe 2 */ + efr_bytes[19] &= 0x33; + /* subframe 3 */ + efr_bytes[25] &= 0xCC; +} + /*! Generate the 31 bytes RTP payload for GSM-EFR from a decoded TRAU frame. * \param[out] out caller-provided output buffer * \param[in] out_len length of out buffer in bytes @@ -430,6 +522,36 @@ if (rc) goto bad_frame; + /* + * Many BTS models will emit the previous content of their internal + * buffer, perhaps corrupted in some peculiar way, when they need to + * emit "BFI with no data" because they received FACCH, or because + * they received nothing at all and no channel decoding attempt was + * made. When this situation occurs, the Rx DTX handler in the TRAU + * needs to be told "this is a regular BFI, not an invalid SID", + * and the BTS makes this indication by setting C12=1 (BFI), + * C13=0 and C14=0 (SID=0). However, the stale or corrupted frame + * payload bit content in the Abis output buffer will still sometimes + * indicate SID (usually invalid) by the bit counting rules of + * GSM 06.81 section 6.1.1! This situation creates a problem + * in the case of TW-TS-001 output: there are no out-of-band bits + * for C13 & C14, and when the remote transcoder or TFO transform + * calls osmo_efr_sid_classify() or its libgsmefr equivalent, + * it will detect an invalid SID (always invalid due to BFI=1) + * instead of intended-by-BTS "regular BFI". Solution: because + * there is no need to preserve all payload bits that are known + * to be bad or dummy, we can afford to corrupt some of them; + * as a workaround for the unintentional-SID problem, we "break" + * the SID field. + * + * Note that BFI=1 is a required condition for the logic below. + * Because standard RFC 3551 output does not support BFI, + * this logic applies only to TW-TS-001 output. + */ + if (tf->c_bits[11] && !tf->c_bits[12] && !tf->c_bits[13] && + osmo_efr_is_any_sid(out)) + make_efr_bfi_nonsid(out); + return req_out_len; bad_frame: diff --git a/tests/trau_conv/trau16_efr_twts001.ok b/tests/trau_conv/trau16_efr_twts001.ok index 14dfe9d..761f03b 100644 --- a/tests/trau_conv/trau16_efr_twts001.ok +++ b/tests/trau_conv/trau16_efr_twts001.ok @@ -173,11 +173,11 @@ TW-TS-001 TEH octet: 0xE2 EFR frame: LPC 15 202 265 142 28 - 339 0 15 15 15 15 12 2 2 2 2 4 19 - 60 15 15 15 15 15 12 4 5 5 0 0 19 - 144 10 7 15 15 15 14 0 0 1 0 0 19 - 63 15 15 12 15 15 12 0 2 2 2 0 19 - SID recompute: 1 + 336 0 15 15 15 15 12 2 2 2 2 4 19 + 60 12 15 15 15 15 12 4 5 5 0 0 19 + 144 8 7 15 15 15 14 0 0 1 0 0 19 + 60 12 15 12 15 15 12 0 2 2 2 0 19 + SID recompute: 0 ID efr-dtx-dtmf.bin frame 0x53a51 0000ebead10eba68ada886f7fbfca494ca8cfffffe4ba04ac07ffffff0048491fffcffe0a485c2ff TRAU frame type: EFR @@ -197,8 +197,8 @@ TW-TS-001 TEH octet: 0xE2 EFR frame: LPC 30 10 408 138 54 - 339 0 11 15 11 15 12 2 2 2 2 4 18 - 61 7 15 15 15 15 12 4 5 5 0 0 18 - 16 10 7 15 15 15 14 0 0 1 0 0 18 - 63 15 15 12 15 15 12 0 2 2 2 0 22 - SID recompute: 1 + 336 0 11 15 11 15 12 2 2 2 2 4 18 + 60 4 15 15 15 15 12 4 5 5 0 0 18 + 16 8 7 15 15 15 14 0 0 1 0 0 18 + 60 12 15 12 15 15 12 0 2 2 2 0 22 + SID recompute: 0 diff --git a/tests/trau_conv/trau16_fr_twts001.ok b/tests/trau_conv/trau16_fr_twts001.ok index a26439b..5cef573 100644 --- a/tests/trau_conv/trau16_fr_twts001.ok +++ b/tests/trau_conv/trau16_fr_twts001.ok @@ -149,8 +149,8 @@ TW-TS-001 TEH octet: 0xE2 FR frame: LARc 59 36 12 24 13 4 3 0 - 64 1 0 49 3 2 1 0 0 0 0 0 0 0 0 0 0 - 96 3 0 34 0 1 7 3 1 0 0 0 0 0 0 0 0 - 64 1 1 10 0 0 0 0 1 1 1 0 0 0 0 0 0 - 0 0 0 33 5 1 1 0 0 0 0 1 0 0 0 2 2 - SID recompute: 1 + 64 1 0 49 3 2 3 2 0 0 0 0 0 0 0 0 0 + 96 3 0 34 2 3 7 3 1 0 0 0 0 0 0 0 0 + 64 1 1 10 2 2 2 2 1 1 1 0 0 0 0 0 0 + 0 0 0 33 7 3 3 2 0 0 0 1 0 0 0 2 2 + SID recompute: 0 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38182?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I2800301f7ac25537c4d7fb14acefd73a80590d7c Gerrit-Change-Number: 38182 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • ...
  • 199
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.