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

March 2023

  • 1 participants
  • 3642 discussions
[M] Change in osmo-bsc[master]: Fix Lb/A SCCP conn lookup after recent regression in optimization patch
by pespin 17 Mar '23

17 Mar '23
Attention is currently required from: neels, daniel. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31940 ) Change subject: Fix Lb/A SCCP conn lookup after recent regression in optimization patch ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: If42d93adee71d646766929a09bc01ae92b734ef3 Gerrit-Change-Number: 31940 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Fri, 17 Mar 2023 18:08:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-bts[master]: contrib: Add BER testing tool
by Jenkins Builder 17 Mar '23

17 Mar '23
Attention is currently required from: laforge. Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31967 ) Change subject: contrib: Add BER testing tool ...................................................................... Patch Set 3: (27 comments) File contrib/ber/rtp_ber.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/052f1c98_20950dcb PS3, Line 97: static const char *amr_rate_by_ft[] = { static const char * array should probably be static const char * const Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/b8d29024_305c57fc PS3, Line 237: for (i=0; i<8*payload_len; i++) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/c234b191_94aec00b PS3, Line 237: for (i=0; i<8*payload_len; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/98d67d55_4be24adf PS3, Line 237: for (i=0; i<8*payload_len; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/ee0c8f30_dc399226 PS3, Line 246: if (ones < 32) // This frames is probably us underrunning Tx, don't use it that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/f8a056c4_48105874 PS3, Line 258: if (as->state == RUNNING) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/9913c91c_a904d120 PS3, Line 361: else else should follow close brace '}' Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/e878e7cb_28e7dcb5 PS3, Line 399: if (as->state == WAIT_CONN) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/977eac73_e73b4368 PS3, Line 420: if (rtp_seq_num_diff(seq_number, as->rx_last_seq) > 1) { braces {} are not necessary for single statement blocks Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/e9161c3c_0dd80916 PS3, Line 431: if (d > 1) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/cff2fa55_3dbe298d PS3, Line 485: while (1) { braces {} are not necessary for single statement blocks File contrib/ber/rtp_gen_map.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/74e2bfa3_6b947b6b PS3, Line 30: int i,j; space required after that ',' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/2a96ad6a_56a590af PS3, Line 34: for (i=0; i<260; i++) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/5b311e61_089d940b PS3, Line 34: for (i=0; i<260; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/94032383_4687c98e PS3, Line 34: for (i=0; i<260; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/9f667001_655df301 PS3, Line 55: for (i=0; i<260; i++) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/2f63ff1e_6c284f16 PS3, Line 55: for (i=0; i<260; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/9c395a18_1cf3adfe PS3, Line 55: for (i=0; i<260; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/70e84536_2a6fab37 PS3, Line 96: for (i=0; i<16; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/5bab1f31_3ddfe8bd PS3, Line 96: for (i=0; i<16; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/5483534a_bd3de56c PS3, Line 99: for (i=0; i<244; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/4708cb3f_5d56dc79 PS3, Line 99: for (i=0; i<244; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/08eb6ab4_c6116f02 PS3, Line 102: for (i=0; i<4; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/feab452c_4e0d67d4 PS3, Line 102: for (i=0; i<4; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/faa7d6e9_c72aef96 PS3, Line 116: for (i=0; i<len; i++) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/d1a7d4db_f96bc008 PS3, Line 116: for (i=0; i<len; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5225): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/c3c634f8_c4df2d8a PS3, Line 116: for (i=0; i<len; i++) spaces required around that '<' (ctx:VxV) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31967 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1cffa0ae959e29ec61775b13185fd1057ed7485a Gerrit-Change-Number: 31967 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: tnt <tnt(a)246tNt.com> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Fri, 17 Mar 2023 18:01:20 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-bts[master]: contrib: Add BER testing tool
by laforge 17 Mar '23

17 Mar '23
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/31967 to look at the new patch set (#3). Change subject: contrib: Add BER testing tool ...................................................................... contrib: Add BER testing tool This implements RTP based GSM BER testing for osmo-bts, implementing ideas described in https://osmocom.org/projects/osmobts/wiki/BER_Testing In short: The command transmits a PRBS sequence encapsulated in RTP frames, which are sent to the BTS, which transmits that data in the (unimpaired) downlink. The mobile station receives the data and is instructed to loop it back in the (possibly impaired) uplink. The BTS receives that uplink, puts in in RTP frames which end up being received back by this very tool. By correlating the received RTP with the PRBS sequence, this tool can compute the BER (Bit Error Rate) of the (possibly impaired) uplink. Doing this with different RF channel model simulators in the uplink allows to establish BER at different levels and channel conditions. Original code by Sylvain Munaut extended with some comments and Automake integration by Harald Welte. Change-Id: I1cffa0ae959e29ec61775b13185fd1057ed7485a --- M .gitignore M configure.ac M contrib/Makefile.am A contrib/ber/Makefile.am A contrib/ber/README A contrib/ber/rtp_ber.c A contrib/ber/rtp_gen_map.c 7 files changed, 723 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/67/31967/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31967 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1cffa0ae959e29ec61775b13185fd1057ed7485a Gerrit-Change-Number: 31967 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: tnt <tnt(a)246tNt.com> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newpatchset
1 0
0 0
[L] Change in osmo-bts[master]: contrib: Add BER testing tool
by Jenkins Builder 17 Mar '23

17 Mar '23
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31967 ) Change subject: contrib: Add BER testing tool ...................................................................... Patch Set 2: (27 comments) File contrib/ber/rtp_ber.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/427d5fa7_30472afb PS2, Line 97: static const char *amr_rate_by_ft[] = { static const char * array should probably be static const char * const Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/86e7e3b1_e03af4d9 PS2, Line 237: for (i=0; i<8*payload_len; i++) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/4cef6491_add2e004 PS2, Line 237: for (i=0; i<8*payload_len; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/bf1838e0_46510b07 PS2, Line 237: for (i=0; i<8*payload_len; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/f1063f62_e8565ebb PS2, Line 246: if (ones < 32) // This frames is probably us underrunning Tx, don't use it that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/4d0bb175_2120f038 PS2, Line 258: if (as->state == RUNNING) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/6ca1abc9_8a7ac241 PS2, Line 361: else else should follow close brace '}' Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/e7474286_7b18f2e0 PS2, Line 399: if (as->state == WAIT_CONN) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/c6ebc284_e574ee4d PS2, Line 420: if (rtp_seq_num_diff(seq_number, as->rx_last_seq) > 1) { braces {} are not necessary for single statement blocks Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/a57c2be6_5c64ce8c PS2, Line 431: if (d > 1) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/2cff74b5_5c573e9b PS2, Line 485: while (1) { braces {} are not necessary for single statement blocks File contrib/ber/rtp_gen_map.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/d56992f8_51a10fa0 PS2, Line 30: int i,j; space required after that ',' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/216852af_8d7d87f7 PS2, Line 34: for (i=0; i<260; i++) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/5936d239_1fd521ec PS2, Line 34: for (i=0; i<260; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/46319a01_0c36e038 PS2, Line 34: for (i=0; i<260; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/8c3612b0_fe66755f PS2, Line 55: for (i=0; i<260; i++) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/cc365cfa_236463da PS2, Line 55: for (i=0; i<260; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/21f43138_68856b00 PS2, Line 55: for (i=0; i<260; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/ef1595b1_62cd281f PS2, Line 96: for (i=0; i<16; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/6bb7fe3b_ec3654e4 PS2, Line 96: for (i=0; i<16; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/234eef65_3c294cd6 PS2, Line 99: for (i=0; i<244; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/3a597644_9d175fa8 PS2, Line 99: for (i=0; i<244; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/86cc6816_634184b2 PS2, Line 102: for (i=0; i<4; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/29efa67b_49ff0b8a PS2, Line 102: for (i=0; i<4; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/4651b98a_5aa8ecee PS2, Line 116: for (i=0; i<len; i++) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/4802efab_dc455e66 PS2, Line 116: for (i=0; i<len; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5224): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/1d6d5ce0_95be08f1 PS2, Line 116: for (i=0; i<len; i++) spaces required around that '<' (ctx:VxV) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31967 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1cffa0ae959e29ec61775b13185fd1057ed7485a Gerrit-Change-Number: 31967 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-CC: Jenkins Builder Gerrit-CC: tnt <tnt(a)246tNt.com> Gerrit-Comment-Date: Fri, 17 Mar 2023 17:50:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-bts[master]: contrib: Add BER testing tool
by laforge 17 Mar '23

17 Mar '23
laforge has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-bts/+/31967 ) Change subject: contrib: Add BER testing tool ...................................................................... contrib: Add BER testing tool This implements RTP based GSM BER testing for osmo-bts, implementing ideas described in https://osmocom.org/projects/osmobts/wiki/BER_Testing In short: The command transmits a PRBS sequence encapsulated in RTP frames, which are sent to the BTS, which transmits that data in the (unimpaired) downlink. The mobile station receives the data and is instructed to loop it back in the (possibly impaired) uplink. The BTS receives that uplink, puts in in RTP frames which end up being received back by this very tool. By correlating the received RTP with the PRBS sequence, this tool can compute the BER (Bit Error Rate) of the (possibly impaired) uplink. Doing this with different RF channel model simulators in the uplink allows to establish BER at different levels and channel conditions. Original code by Sylvain Munaut extended with some comments and Automake integration by Harald Welte. Change-Id: I1cffa0ae959e29ec61775b13185fd1057ed7485a --- M configure.ac M contrib/Makefile.am A contrib/ber/Makefile.am A contrib/ber/README A contrib/ber/rtp_ber.c A contrib/ber/rtp_gen_map.c 6 files changed, 720 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/67/31967/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31967 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1cffa0ae959e29ec61775b13185fd1057ed7485a Gerrit-Change-Number: 31967 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-CC: Jenkins Builder Gerrit-CC: tnt <tnt(a)246tNt.com> Gerrit-MessageType: newpatchset
1 0
0 0
[L] Change in osmo-bts[master]: contrib: Add BER testing tool
by Jenkins Builder 17 Mar '23

17 Mar '23
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31967 ) Change subject: contrib: Add BER testing tool ...................................................................... Patch Set 1: (27 comments) File contrib/ber/rtp_ber.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/ef8f3388_919d98a3 PS1, Line 97: static const char *amr_rate_by_ft[] = { static const char * array should probably be static const char * const Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/e9d84e03_18182f30 PS1, Line 237: for (i=0; i<8*payload_len; i++) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/c9a30369_8eaa9998 PS1, Line 237: for (i=0; i<8*payload_len; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/0adeacd7_9cbd315a PS1, Line 237: for (i=0; i<8*payload_len; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/b9e6e8f9_4aa1dbef PS1, Line 246: if (ones < 32) // This frames is probably us underrunning Tx, don't use it that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/414c7fb6_09f58d46 PS1, Line 258: if (as->state == RUNNING) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/e5a95e52_bd028ee7 PS1, Line 361: else else should follow close brace '}' Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/711e1aca_070adcf0 PS1, Line 399: if (as->state == WAIT_CONN) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/4cdae59c_6e01deab PS1, Line 420: if (rtp_seq_num_diff(seq_number, as->rx_last_seq) > 1) { braces {} are not necessary for single statement blocks Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/df5fb29c_977e3a50 PS1, Line 431: if (d > 1) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/f760bdfe_5ff19c5a PS1, Line 485: while (1) { braces {} are not necessary for single statement blocks File contrib/ber/rtp_gen_map.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/3bb403a3_f414e2d4 PS1, Line 30: int i,j; space required after that ',' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/0097fc13_ecfa3061 PS1, Line 34: for (i=0; i<260; i++) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/5c2ed603_7bebd829 PS1, Line 34: for (i=0; i<260; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/618720d9_4f06d026 PS1, Line 34: for (i=0; i<260; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/648f470c_07a8f471 PS1, Line 55: for (i=0; i<260; i++) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/27d15f81_aa0e5c31 PS1, Line 55: for (i=0; i<260; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/9299913e_02ede7b6 PS1, Line 55: for (i=0; i<260; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/dde8cd40_6a687e22 PS1, Line 96: for (i=0; i<16; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/ed2346d9_8d4ffd55 PS1, Line 96: for (i=0; i<16; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/6c2b3101_f9c1e98c PS1, Line 99: for (i=0; i<244; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/f15301d5_8a6d75fb PS1, Line 99: for (i=0; i<244; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/dd16db4b_ce4d7946 PS1, Line 102: for (i=0; i<4; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/3d8c40e3_b7994932 PS1, Line 102: for (i=0; i<4; i++) spaces required around that '<' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/3d2e446a_858b5d21 PS1, Line 116: for (i=0; i<len; i++) that open brace { should be on the previous line Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/0f76ab5e_9b7d8095 PS1, Line 116: for (i=0; i<len; i++) spaces required around that '=' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5223): https://gerrit.osmocom.org/c/osmo-bts/+/31967/comment/8efd8c38_b74135b5 PS1, Line 116: for (i=0; i<len; i++) spaces required around that '<' (ctx:VxV) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31967 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1cffa0ae959e29ec61775b13185fd1057ed7485a Gerrit-Change-Number: 31967 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-CC: Jenkins Builder Gerrit-CC: tnt <tnt(a)246tNt.com> Gerrit-Comment-Date: Fri, 17 Mar 2023 17:45:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-bts[master]: contrib: Add BER testing tool
by laforge 17 Mar '23

17 Mar '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/31967 ) Change subject: contrib: Add BER testing tool ...................................................................... contrib: Add BER testing tool This implements RTP based GSM BER testing for osmo-bts, implementing ideas described in https://osmocom.org/projects/osmobts/wiki/BER_Testing In short: The command transmits a PRBS sequence encapsulated in RTP frames, which are sent to the BTS, which transmits that data in the (unimpaired) downlink. The mobile station receives the data and is instructed to loop it back in the (possibly impaired) uplink. The BTS receives that uplink, puts in in RTP frames which end up being received back by this very tool. By correlating the received RTP with the PRBS sequence, this tool can compute the BER (Bit Error Rate) of the (possibly impaired) uplink. Doing this with different RF channel model simulators in the uplink allows to establish BER at different levels and channel conditions. Original code by Sylvain Munaut extended with some comments and Automake integration by Harald Welte. Change-Id: I1cffa0ae959e29ec61775b13185fd1057ed7485a --- M configure.ac M contrib/Makefile.am A contrib/ber/Makefile.am A contrib/ber/README A contrib/ber/rtp_ber.c A contrib/ber/rtp_gen_map.c 6 files changed, 716 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/67/31967/1 diff --git a/configure.ac b/configure.ac index 0e79792..82074d4 100644 --- a/configure.ac +++ b/configure.ac @@ -449,6 +449,7 @@ doc/examples/Makefile doc/manuals/Makefile contrib/Makefile + contrib/ber/Makefile contrib/systemd/Makefile contrib/osmo-bts.spec Makefile) diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 3439c97..5594199 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -1 +1 @@ -SUBDIRS = systemd +SUBDIRS = systemd ber diff --git a/contrib/ber/Makefile.am b/contrib/ber/Makefile.am new file mode 100644 index 0000000..d700e96 --- /dev/null +++ b/contrib/ber/Makefile.am @@ -0,0 +1,24 @@ +AM_CPPFLAGS = \ + $(all_includes) \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ + $(NULL) + +AM_CFLAGS = \ + -Wall \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOTRAU_CFLAGS) \ + $(LIBOSMOCODEC_CFLAGS) \ + $(NULL) + +LDADD = \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOTRAU_LIBS) \ + $(LIBOSMOCODEC_LIBS) \ + $(NULL) + +noinst_PROGRAMS = rtp_ber rtp_gen_map + +rtp_ber_SOURCES = rtp_ber.c + +rtp_gen_map_SOURCES = rtp_gen_map.c diff --git a/contrib/ber/README b/contrib/ber/README new file mode 100644 index 0000000..07c4a78 --- /dev/null +++ b/contrib/ber/README @@ -0,0 +1,26 @@ +BER testing tool +---------------- + +* Check all configs (MSC/BSC/BTS) for proper codec support + - FR enabled + - EFR enabled + - AMR 12.2 enabled (and all other modes disabled !) + - Use `amr-payload octet-aligned` in BSC config + +* Check BTS config + - Disable jitter buffer : `bts N / rtp jitter-buffer 0` + +* Check BSC config + - Disable radio timeout : `network / bts n / radio-link-timeout infinite` + +* Start BER testing tool + - `./rtp_ber 4000` + +* On the MSC CLI, start a silent-call, then request GSM to test loop + - `subscriber imsi <XXX> silent-call start tch/f speech-amr` + - `subscriber imsi <XXX> ms-test close-loop b` + + Don't forget to terminate the loop and terminate the silent call ! + + - `subscriber imsi <XXX> ms-test open-loop` + - `subscriber imsi <XXX> silent-call stop` diff --git a/contrib/ber/rtp_ber.c b/contrib/ber/rtp_ber.c new file mode 100644 index 0000000..595e3a4 --- /dev/null +++ b/contrib/ber/rtp_ber.c @@ -0,0 +1,490 @@ +/* RTP based GSM BER testing for osmo-bts, implementing ideas described in + * https://osmocom.org/projects/osmobts/wiki/BER_Testing + * + * In short: The command transmits a PRBS sequence encapsulated in RTP frames, which are sent + * to the BTS, which transmits that data in the (unimpaired) downlink. The mobile station + * receives the data and is instructed to loop it back in the (possibly impaired) uplink. + * The BTS receives that uplink, puts in in RTP frames which end up being received back by this + * very tool. By correlating the received RTP with the PRBS sequence, this tool can compute + * the BER (Bit Error Rate) of the (possibly impaired) uplink. Doing this with different + * RF channel model simulators in the uplink allows to establish BER at different levels and + * channel conditions. */ + +/* (C) 2019 sysmocom - s.f.m.c. GmbH; Author: Sylvain Munaut + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +#include <sys/socket.h> +#include <netinet/in.h> +#include <arpa/inet.h> + +#include <osmocom/codec/codec.h> +#include <osmocom/core/logging.h> +#include <osmocom/core/prbs.h> +#include <osmocom/core/timer.h> +#include <osmocom/core/utils.h> +#include <osmocom/trau/osmo_ortp.h> + +#include "codec_bit_class.h" + + +struct app_state { + struct osmo_rtp_socket *rs; + + enum { + WAIT_CONN = 0, /* Wait for incoming connection */ + WAIT_LOOP, /* Wait for a somewhat valid packet to start measuring */ + RUNNING, /* Main state */ + } state; + + int pt; + + int ref_len; + uint8_t ref_bytes[GSM_FR_BYTES]; /* FR is the largest possible one */ + ubit_t ref_bits[8*GSM_FR_BYTES]; + + struct osmo_timer_list rtp_timer; + + uint16_t rx_last_seq; + uint32_t rx_last_ts; + uint32_t rx_idx; + uint32_t tx_idx; + + const int *err_tbl; /* Classification table */ + int err_frames; /* Number of accumulated frames */ + int err_cnt[3]; /* Bit error counter */ + int err_tot[3]; /* Total # bits in that class */ +}; + +#define FLOW_REG_TX_MAX_ADVANCE 200 +#define FLOW_REG_TX_MIN_ADVANCE 50 + + +const struct log_info log_info; + + +static const uint8_t amr_size_by_ft[] = { + [0] = 12, /* 4.75 */ + [1] = 13, /* 5.15 */ + [2] = 15, /* 5.9 */ + [3] = 17, /* 6.7 */ + [4] = 19, /* 7.4 */ + [5] = 20, /* 7.95 */ + [6] = 26, /* 10.2 */ + [7] = 31, /* 12.2 */ + [8] = 5, /* SID */ +}; + +static const char *amr_rate_by_ft[] = { + [0] = "4.75", + [1] = "5.15", + [2] = "5.9", + [3] = "6.7", + [4] = "7.4", + [5] = "7.95", + [6] = "10.2", + [7] = "12.2", + [8] = "SID", +}; + + +static void +_gsm_fr_gen_ref(struct app_state *as) +{ + struct osmo_prbs_state pn9; + + /* Length */ + as->ref_len = GSM_FR_BYTES; + + /* Marker */ + as->ref_bits[0] = 1; + as->ref_bits[1] = 1; + as->ref_bits[2] = 0; + as->ref_bits[3] = 1; + + /* PN */ + osmo_prbs_state_init(&pn9, &osmo_prbs9); + pn9.state = 31; + osmo_prbs_get_ubits(&as->ref_bits[4], 260, &pn9); + + /* Convert to bytes */ + osmo_ubit2pbit_ext(as->ref_bytes, 0, as->ref_bits, 0, 8*GSM_FR_BYTES, 0); + + /* Init error classes */ + as->err_tot[0] = 50; + as->err_tot[1] = 132; + as->err_tot[2] = 78; + as->err_tbl = gsm_fr_bitclass; +} + +static void +_gsm_efr_gen_ref(struct app_state *as) +{ + struct osmo_prbs_state pn9; + + /* Length */ + as->ref_len = GSM_EFR_BYTES; + + /* Marker */ + as->ref_bits[0] = 1; + as->ref_bits[1] = 1; + as->ref_bits[2] = 0; + as->ref_bits[3] = 0; + + /* PN */ + osmo_prbs_state_init(&pn9, &osmo_prbs9); + pn9.state = 31; + osmo_prbs_get_ubits(&as->ref_bits[4], 244, &pn9); + + /* Convert to bytes */ + osmo_ubit2pbit_ext(as->ref_bytes, 0, as->ref_bits, 0, 8*GSM_EFR_BYTES, 0); + + /* Init error classes */ + as->err_tot[0] = 50; + as->err_tot[1] = 125; + as->err_tot[2] = 73; + as->err_tbl = gsm_efr_bitclass; +} + +static void +_gsm_amr_gen_ref(struct app_state *as) +{ + struct osmo_prbs_state pn9; + uint8_t hdr[2]; + + /* Length */ + as->ref_len = 33; + + /* Header */ + hdr[0] = 0x70; + hdr[1] = 0x3c; + osmo_pbit2ubit_ext(as->ref_bits, 0, hdr, 0, 16, 0); + + /* PN */ + osmo_prbs_state_init(&pn9, &osmo_prbs9); + pn9.state = 31; + osmo_prbs_get_ubits(&as->ref_bits[16], 244, &pn9); + + /* Unused bits */ + as->ref_bits[260] = 0; + as->ref_bits[261] = 0; + as->ref_bits[262] = 0; + as->ref_bits[263] = 0; + + /* Convert to bytes */ + osmo_ubit2pbit_ext(as->ref_bytes, 0, as->ref_bits, 0, 264, 0); + + /* Init error classes */ + as->err_tot[0] = 81; + as->err_tot[1] = 163; + as->err_tot[2] = -1; + as->err_tbl = gsm_amr_12_2_bitclass; +} + + +static void +_gsm_gen_ref(struct app_state *as) +{ + switch (as->pt) { + case RTP_PT_GSM_FULL: + _gsm_fr_gen_ref(as); + break; + case RTP_PT_GSM_EFR: + _gsm_efr_gen_ref(as); + break; + case RTP_PT_AMR: + _gsm_amr_gen_ref(as); + break; + default: + fprintf(stderr, "[!] Unsupported payload type for BER measurement\n"); + } +} + +static int +_gsm_ber(struct app_state *as, const uint8_t *payload, unsigned int payload_len) +{ + ubit_t rx_bits[8*33]; + int err[3]; /* Class 1a, 1b, 2 */ + int ones; + int i, j; + + if (payload) { + /* Process real-payload */ + osmo_pbit2ubit_ext(rx_bits, 0, payload, 0, 8*payload_len, 0); + + err[0] = err[1] = err[2] = 0; + ones = 0; + + for (i=0; i<8*payload_len; i++) + { + j = as->err_tbl[i]; + if (j >= 0) { + err[j] += rx_bits[i] ^ as->ref_bits[i]; + ones += rx_bits[i]; + } + } + + if (ones < 32) // This frames is probably us underrunning Tx, don't use it + { + fprintf(stderr, "[w] Frame ignored as probably TX underrun %d %d\n", as->tx_idx, as->rx_idx); + return 1; + } + } else { + /* No payload -> Lost frame completely */ + err[0] = as->err_tot[0] / 2; + err[1] = as->err_tot[1] / 2; + err[2] = as->err_tot[2] / 2; + } + + if (as->state == RUNNING) + { + /* Update records */ + if (err[0] != 0) { + /* Class 1a bits bad -> Frame error */ + as->err_cnt[0]++; + } + + as->err_cnt[1] += err[1]; /* Class 1b */ + as->err_cnt[2] += err[2]; /* class 2 */ + + as->err_frames++; + + /* Enough for a read-out ? */ + if (as->err_frames == 200) { + printf("FBER: %4.2f C1b RBER: %5.3f C2 RBER: %5.3f\n", + 100.0f * as->err_cnt[0] / as->err_frames, + 100.0f * as->err_cnt[1] / (as->err_tot[1] * as->err_frames), + 100.0f * as->err_cnt[2] / (as->err_tot[2] * as->err_frames) + ); + memset(as->err_cnt, 0, sizeof(as->err_cnt)); + as->err_frames = 0; + } + } + + return err[0] != 0; +} + +static int +_rtp_check_payload_type(const uint8_t *payload, unsigned int payload_len) +{ + uint8_t ft; + int pt = -1; + + switch (payload_len) { + case GSM_FR_BYTES: /* FR or AMR 12.2k */ + /* Check for AMR */ + ft = (payload[1] >> 3) & 0xf; + if (ft == 7) + pt = RTP_PT_AMR; + + /* Check for FR */ + else if ((payload[0] & 0xF0) == 0xD0) + pt = RTP_PT_GSM_FULL; + + /* None of the above */ + else + fprintf(stderr, "[!] FR without 0xD0 signature or AMR with unknwon Frame Type ?!?\n"); + + break; + case GSM_EFR_BYTES: /* EFR */ + if ((payload[0] & 0xF0) != 0xC0) + fprintf(stderr, "[!] EFR without 0xC0 signature ?!?\n"); + pt = RTP_PT_GSM_EFR; + break; + case GSM_HR_BYTES: /* HR */ + pt = RTP_PT_GSM_HALF; + break; + default: /* AMR */ + { + uint8_t cmr, cmi, sti; + cmr = payload[0] >> 4; + ft = (payload[1] >> 3) & 0xf; + + if (payload_len != amr_size_by_ft[ft]+2) + fprintf(stderr, "AMR FT %u(%s) but size %u\n", + ft, amr_rate_by_ft[ft], payload_len); + + switch (ft) { + case 0: case 1: case 2: case 3: + case 4: case 5: case 6: case 7: + cmi = ft; + printf("AMR SPEECH with FT/CMI %u(%s), " + "CMR %u\n", + cmi, amr_rate_by_ft[cmi], + cmr); + break; + case 8: /* SID */ + cmi = (payload[2+4] >> 1) & 0x7; + sti = payload[2+4] & 0x10; + printf("AMR SID %s with CMI %u(%s), CMR %u(%s)\n", + sti ? "UPDATE" : "FIRST", + cmi, amr_rate_by_ft[cmi], + cmr, amr_rate_by_ft[cmr]); + break; + } + } + break; + } + + return pt; +} + +static void +rtp_timer_cb(void *priv) +{ + struct app_state *as = (struct app_state *)priv; + + /* Send at least one frame if we're not too far ahead */ + if (as->tx_idx < (as->rx_idx + FLOW_REG_TX_MAX_ADVANCE)) { + osmo_rtp_send_frame(as->rs, as->ref_bytes, as->ref_len, GSM_RTP_DURATION); + as->tx_idx++; + } + else + fprintf(stderr, "Skipped\n"); + + /* Then maybe a second one to try and catch up to RX */ + if (as->tx_idx < (as->rx_idx + FLOW_REG_TX_MIN_ADVANCE)) { + osmo_rtp_send_frame(as->rs, as->ref_bytes, as->ref_len, GSM_RTP_DURATION); + as->tx_idx++; + } + + /* Re-schedule */ + osmo_timer_schedule(&as->rtp_timer, 0, 20000); +} + +static int +rtp_seq_num_diff(uint16_t new, uint16_t old) +{ + int d = (int)new - (int)old; + while (d > 49152) + d -= 65536; + while (d < -49152) + d += 65536; + return d; +} + +static void +rtp_rx_cb(struct osmo_rtp_socket *rs, + const uint8_t *payload, unsigned int payload_len, + uint16_t seq_number, uint32_t timestamp, bool marker) +{ + struct app_state *as = (struct app_state *)rs->priv; + int pt, rc, d; + +// printf("Rx(%u, %d, %d, %d): %s\n", payload_len, seq_number, timestamp, marker, osmo_hexdump(payload, payload_len)); + + /* Identify payload */ + pt = _rtp_check_payload_type(payload, payload_len); + + /* First packet ? */ + if (as->state == WAIT_CONN) + { + /* Setup for this payload type */ + as->pt = pt; + osmo_rtp_socket_set_pt(as->rs, pt); + _gsm_gen_ref(as); + + /* Timer every 20 ms */ + osmo_timer_setup(&as->rtp_timer, rtp_timer_cb, as); + osmo_timer_add(&as->rtp_timer); + osmo_timer_schedule(&as->rtp_timer, 0, 20000); + + /* Init our time tracking */ + as->rx_last_seq = seq_number; + as->rx_last_ts = timestamp; + + /* Now we wait for a loop */ + as->state = WAIT_LOOP; + } + + /* RX sequence & timstamp tracking */ + if (rtp_seq_num_diff(seq_number, as->rx_last_seq) > 1) { + fprintf(stderr, "[!] RTP sequence number discontinuity (%d -> %d)\n", as->rx_last_seq, seq_number); + } + + d = (timestamp - as->rx_last_ts) / GSM_RTP_DURATION; + + as->rx_idx += d; + as->rx_last_seq = seq_number; + as->rx_last_ts = timestamp; + + /* Account for missing frames in BER tracking */ + if (d > 1) + { + fprintf(stderr, "[!] RTP %d missing frames assumed lost @%d\n", d-1, seq_number); + while (--d) + _gsm_ber(as, NULL, 0); + } + + /* BER analysis */ + rc = _gsm_ber(as, payload, payload_len); + + if ((as->state == WAIT_LOOP) && (rc == 0)) + as->state = RUNNING; +} + + +int main(int argc, char **argv) +{ + struct app_state _as, *as = &_as; + int rc, port; + + /* Args */ + if (argc < 2) + return -1; + + port = atoi(argv[1]); + + /* App init */ + memset(as, 0x00, sizeof(struct app_state)); + + log_init(&log_info, NULL); + osmo_rtp_init(NULL); + + /* Start auto-connect RTP socket */ + as->rs = osmo_rtp_socket_create(NULL, 0); + + as->rs->priv = as; + as->rs->rx_cb = rtp_rx_cb; + + /* Jitter buffer gets in the way, we want the raw traffic */ + osmo_rtp_socket_set_param(as->rs, OSMO_RTP_P_JIT_ADAP, 0); + osmo_rtp_socket_set_param(as->rs, OSMO_RTP_P_JITBUF, 0); + + /* Bind to requested port */ + fprintf(stderr, "[+] Binding RTP socket on port %u...\n", port); + rc = osmo_rtp_socket_bind(as->rs, "0.0.0.0", port); + if (rc < 0) { + fprintf(stderr, "[!] error binding RTP socket: %d\n", rc); + return rc; + } + + /* We 'connect' to the first source we hear from */ + osmo_rtp_socket_autoconnect(as->rs); + + /* Main loop */ + while (1) { + osmo_select_main(0); + } + + return 0; +} diff --git a/contrib/ber/rtp_gen_map.c b/contrib/ber/rtp_gen_map.c new file mode 100644 index 0000000..ded61be --- /dev/null +++ b/contrib/ber/rtp_gen_map.c @@ -0,0 +1,148 @@ +/* utility to generate codec_bit_class.h, a file with structures + * describing which [protection] class each bit of a given codec frame belongs to */ + +/* (C) 2019 sysmocom - s.f.m.c. GmbH; Author: Sylvain Munaut + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + + +#include <stdio.h> + +#include <osmocom/codec/codec.h> + + +static int +gen_table_fr(int *tbl) +{ + int i,j; + + tbl[0] = tbl[1] = tbl[2] = tbl[3] = -1; + + for (i=0; i<260; i++) + { + j = 4 + gsm610_bitorder[i]; + if (i < 50) + tbl[j] = 0; /* Class 1a */ + else if (i < 182) + tbl[j] = 1; /* Class 1b */ + else + tbl[j] = 2; /* Class 2 */ + } + + return GSM_FR_BYTES * 8; +} + +static int +gen_table_efr(int *tbl) +{ + int i, j, k; + + tbl[0] = tbl[1] = tbl[2] = tbl[3] = -1; + + for (i=0; i<260; i++) + { + j = gsm660_bitorder[i]; + + if (j < 71) + k = j; + else if (j < 73) + k = 71; + else if (j < 123) + k = j - 2; + else if (j < 125) + k = 119; + else if (j < 178) + k = j - 4; + else if (j < 180) + k = 172; + else if (j < 230) + k = j - 6; + else if (j < 232) + k = 222; + else if (j < 252) + k = j - 8; + else + continue; + + if (i < 50) + tbl[k] = 0; /* Class 1a */ + else if (i < 182) + tbl[k] = 1; /* Class 1b */ + else + tbl[k] = 2; /* Class 2 */ + } + + return GSM_EFR_BYTES * 8; +} + +static int +gen_table_amr_12_2(int *tbl) +{ + int i; + + for (i=0; i<16; i++) + tbl[i] = -1; + + for (i=0; i<244; i++) + tbl[i+16] = i < 81 ? 0 : 1; + + for (i=0; i<4; i++) + tbl[i+16+244] = -1; + + return 8 * 33; +} + + +static void +print_table(const char *name, int *tbl, int len) +{ + int i; + + printf("static const int %s[] = {\n", name); + + for (i=0; i<len; i++) + { + if ((i & 15) == 0) + printf("\t"); + + printf("%2d", tbl[i]); + + if (((i & 15) == 15) || (i == len-1)) + printf(",\n"); + else + printf(", "); + } + + printf("};\n\n"); +} + + +int main(int argc, char *argv[]) +{ + int tbl[33*8]; + int rv; + + rv = gen_table_fr(tbl); + print_table("gsm_fr_bitclass", tbl, rv); + + rv = gen_table_efr(tbl); + print_table("gsm_efr_bitclass", tbl, rv); + + rv = gen_table_amr_12_2(tbl); + print_table("gsm_amr_12_2_bitclass", tbl, rv); + + return 0; +} -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31967 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1cffa0ae959e29ec61775b13185fd1057ed7485a Gerrit-Change-Number: 31967 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-CC: tnt <tnt(a)246tNt.com> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-bts[master]: Avoid tx RF Resource Ind for disabled TRX
by pespin 17 Mar '23

17 Mar '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31966 ) Change subject: Avoid tx RF Resource Ind for disabled TRX ...................................................................... Patch Set 2: (1 comment) File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/31966/comment/b3555cba_4c6fe6bd PS1, Line 618: > ws Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31966 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I887e0cb03b2a5654accccf7a55fac51319981bfb Gerrit-Change-Number: 31966 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(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-Comment-Date: Fri, 17 Mar 2023 16:12:37 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bts[master]: Avoid tx RF Resource Ind for disabled TRX
by pespin 17 Mar '23

17 Mar '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31966 ) Change subject: Avoid tx RF Resource Ind for disabled TRX ...................................................................... Avoid tx RF Resource Ind for disabled TRX Related: SYS#6370 Change-Id: I887e0cb03b2a5654accccf7a55fac51319981bfb --- M src/common/bts_trx.c M src/common/l1sap.c 2 files changed, 20 insertions(+), 4 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/bts_trx.c b/src/common/bts_trx.c index fce1d02..280880f 100644 --- a/src/common/bts_trx.c +++ b/src/common/bts_trx.c @@ -227,10 +227,13 @@ osmo_fsm_inst_dispatch(trx->mo.fi, NM_EV_RSL_UP, NULL); osmo_fsm_inst_dispatch(trx->bb_transc.mo.fi, NM_EV_RSL_UP, NULL); - if ((rc = rsl_tx_rf_res(trx)) < 0) - oml_tx_failure_event_rep(&trx->bb_transc.mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_RSL_FAIL, - "Failed to establish RSL link (%d)", rc); - + if (trx->mo.nm_state.operational == NM_OPSTATE_ENABLED || + trx->bb_transc.mo.nm_state.operational == NM_OPSTATE_ENABLED) { + rc = rsl_tx_rf_res(trx); + if (rc < 0) + oml_tx_failure_event_rep(&trx->bb_transc.mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_RSL_FAIL, + "Failed to establish RSL link (%d)", rc); + } if (trx == trx->bts->c0) load_timer_start(trx->bts); diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 22b5e8c..efde406 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -615,6 +615,9 @@ return; llist_for_each_entry(trx, &bts->trx_list, list) { + if (trx->mo.nm_state.operational != NM_OPSTATE_ENABLED || + trx->bb_transc.mo.nm_state.operational != NM_OPSTATE_ENABLED) + continue; /* Calculate the average of all received samples */ l1sap_interf_meas_calc_avg(trx); /* Report to the BSC over the A-bis/RSL */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31966 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I887e0cb03b2a5654accccf7a55fac51319981bfb Gerrit-Change-Number: 31966 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(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
[S] Change in osmo-bts[master]: Avoid tx RF Resource Ind for disabled TRX
by pespin 17 Mar '23

17 Mar '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31966 ) Change subject: Avoid tx RF Resource Ind for disabled TRX ...................................................................... Patch Set 2: Code-Review+2 (1 comment) Patchset: PS2: Readding +2 after fixing ws. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31966 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I887e0cb03b2a5654accccf7a55fac51319981bfb Gerrit-Change-Number: 31966 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(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-Comment-Date: Fri, 17 Mar 2023 16:03:21 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • ...
  • 365
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.