[M] Change in osmo-hnbgw[master]: allow (second) CS RAB Assignment Request without RTP info

2023-11-09 Thread osmith
Attention is currently required from: neels.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email )

Change subject: allow (second) CS RAB Assignment Request without RTP info
..


Patch Set 4: Code-Review+2

(1 comment)

Patchset:

PS4:
patch looks good, and this fixes a crash triggered by a recently added test in 
the ttcn3 testsuite: https://osmocom.org/issues/6253



--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I25bf19981cd75a87a7ceb3382dae1ec626ae475c
Gerrit-Change-Number: 34974
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Thu, 09 Nov 2023 09:43:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: devices: fix wrong gain to power mapping

2023-11-09 Thread fixeria
Attention is currently required from: Hoernchen, laforge.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34972?usp=email )

Change subject: devices: fix wrong gain to power mapping
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34972?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
Gerrit-Change-Number: 34972
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 09 Nov 2023 09:51:28 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[master]: ms: init blade with fpga control

2023-11-09 Thread fixeria
Attention is currently required from: Hoernchen.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34965?usp=email )

Change subject: ms: init blade with fpga control
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34965?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I32fe31f1e11f4ceb3c864ec8739d177e780d0a7e
Gerrit-Change-Number: 34965
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: Hoernchen 
Gerrit-Comment-Date: Thu, 09 Nov 2023 09:52:07 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: hnbgw: osmo-hnbgw.cfg: reduce X31 to 5s

2023-11-09 Thread osmith
Attention is currently required from: fixeria, laforge, neels.

Hello Jenkins Builder, fixeria, laforge, neels,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34980?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Verified+1 by Jenkins Builder


Change subject: hnbgw: osmo-hnbgw.cfg: reduce X31 to 5s
..

hnbgw: osmo-hnbgw.cfg: reduce X31 to 5s

Set X31 to 5s as expected by the testsuite. The config files changed
here are not used by jenkins, but are used for manual testing by some
developers.

Previous patch ee4ce863 ("hnbgw: Introduce mp_hnbgw_timer_x31") already
sets the timer in one of the configs, move it to the end and add the
comment to make it consistent here and with the configs in
docker-playground.

Related: docker-playground I223d38e9ec2ca0f9f2ce2ac5311932789f328c9a
Change-Id: I1c275a1d10cfe0fe67d71e900881b0c4891af0be
---
M hnbgw/osmo-hnbgw-with-pfcp.cfg
M hnbgw/osmo-hnbgw.cfg
2 files changed, 25 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/80/34980/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34980?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1c275a1d10cfe0fe67d71e900881b0c4891af0be
Gerrit-Change-Number: 34980
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[S] Change in docker-playground[master]: ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31

2023-11-09 Thread osmith
Attention is currently required from: laforge, neels, osmith, pespin.

osmith has uploaded a new patch set (#2) to the change originally created by 
pespin. ( https://gerrit.osmocom.org/c/docker-playground/+/34952?usp=email )

The following approvals got outdated and were removed:
Code-Review+1 by osmith, Verified+1 by Jenkins Builder


Change subject: ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31
..

ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31

Depends: osmo-ttcn3-hacks.git I176ef96e193f2ca39077bcee3a2187768ddb45ce
Change-Id: I98e1d4d649ea07b006a7d4c15f8d94a9b4b3de1d
---
M ttcn3-hnbgw-test/HNBGW_Tests.cfg
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/52/34952/2
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/34952?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I98e1d4d649ea07b006a7d4c15f8d94a9b4b3de1d
Gerrit-Change-Number: 34952
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[S] Change in docker-playground[master]: ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31

2023-11-09 Thread osmith
Attention is currently required from: laforge, neels, pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/34952?usp=email )

Change subject: ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31
..


Patch Set 2: Code-Review+1

(1 comment)

Patchset:

PS2: 
I just realized that this patch exists. It was missing the modification to 
with-pfcp/osmo-hnbgw.cfg. Rebased it on the similar patch I made, which 
modifies both osmo-hnbgw.cfg.



--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/34952?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I98e1d4d649ea07b006a7d4c15f8d94a9b4b3de1d
Gerrit-Change-Number: 34952
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 09 Nov 2023 10:04:25 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in docker-playground[master]: ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31

2023-11-09 Thread fixeria
Attention is currently required from: laforge, neels, osmith, pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/34952?usp=email )

Change subject: ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/34952?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I98e1d4d649ea07b006a7d4c15f8d94a9b4b3de1d
Gerrit-Change-Number: 34952
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 09 Nov 2023 10:08:19 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in docker-playground[master]: ttcn3-hnbgw-test: reduce X31 to 5s

2023-11-09 Thread fixeria
Attention is currently required from: laforge, neels, osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/34979?usp=email )

Change subject: ttcn3-hnbgw-test: reduce X31 to 5s
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/34979?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I223d38e9ec2ca0f9f2ce2ac5311932789f328c9a
Gerrit-Change-Number: 34979
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 09 Nov 2023 10:08:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: logging_gsmtap: Temporarily disable logging when sending the logs

2023-11-09 Thread osmith
Attention is currently required from: arehbein, daniel, laforge.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email )

Change subject: logging_gsmtap: Temporarily disable logging when sending the 
logs
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e
Gerrit-Change-Number: 34966
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Thu, 09 Nov 2023 10:10:05 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in pysim[master]: pySim-shell: Move init_card() function to new pySim.app module

2023-11-09 Thread osmith
Attention is currently required from: dexter, laforge.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34956?usp=email )

Change subject: pySim-shell: Move init_card() function to new pySim.app module
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34956?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Icf557ed3064ef613ed693ce28bd3514a97a938bd
Gerrit-Change-Number: 34956
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 09 Nov 2023 10:12:51 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in pysim[master]: transport: Move printing of reader number/name to generic code

2023-11-09 Thread osmith
Attention is currently required from: dexter, laforge.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34961?usp=email )

Change subject: transport: Move printing of reader number/name to generic code
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34961?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I663a9ea69bf7e7aaa6502896b6a71ef692f8d844
Gerrit-Change-Number: 34961
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 09 Nov 2023 10:15:07 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in pysim[master]: transport: Extend the documentation for each transport driver

2023-11-09 Thread osmith
Attention is currently required from: dexter, laforge.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34962?usp=email )

Change subject: transport: Extend the documentation for each transport driver
..


Patch Set 2: Code-Review+2

(1 comment)

File pySim/transport/pcsc.py:

https://gerrit.osmocom.org/c/pysim/+/34962/comment/4754b4eb_c7667b21
PS2, Line 127: Microsoft
 : Windows
Linux not mentioned first? ;)



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34962?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I8807bfb11f43b167f1321d556e09ec5234fff629
Gerrit-Change-Number: 34962
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 09 Nov 2023 10:16:52 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-hnbgw[master]: tests/ranap_rab_ass: Test RAB-Ass.req with X.213 IPv4 address len=7

2023-11-09 Thread osmith
Attention is currently required from: pespin.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34964?usp=email )

Change subject: tests/ranap_rab_ass: Test RAB-Ass.req with X.213 IPv4 address 
len=7
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34964?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I71323018d79a4f5778dc6e49488d75ae7c2c4cdc
Gerrit-Change-Number: 34964
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 09 Nov 2023 10:22:58 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in docker-playground[master]: ttcn3-hnbgw-test: reduce X31 to 5s

2023-11-09 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/34979?usp=email )

Change subject: ttcn3-hnbgw-test: reduce X31 to 5s
..

ttcn3-hnbgw-test: reduce X31 to 5s

Set X31 to 5s as expected by the testsuite to fix currently failing:
  - TC_ranap_cs_mo_disconnect
  - TC_ranap_ps_mo_disconnect

It was recently increased to 15s in the related patch.

Related: osmo-hnbgw I24225cfc0addf326c239ec658a27b93b83a3e751
Change-Id: I223d38e9ec2ca0f9f2ce2ac5311932789f328c9a
---
M ttcn3-hnbgw-test/osmo-hnbgw.cfg
M ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg
2 files changed, 22 insertions(+), 0 deletions(-)

Approvals:
  fixeria: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/ttcn3-hnbgw-test/osmo-hnbgw.cfg b/ttcn3-hnbgw-test/osmo-hnbgw.cfg
index 377fad8..bed6f51 100644
--- a/ttcn3-hnbgw-test/osmo-hnbgw.cfg
+++ b/ttcn3-hnbgw-test/osmo-hnbgw.cfg
@@ -73,6 +73,9 @@
   mgw remote-ip 172.18.35.203
  # don't spam RANAP RESET messages for up to eight CN links across all tests
  timer hnbgw T4 60
+ # reduce default X31 from 15 seconds
+ # https://gerrit.osmocom.org/c/osmo-hnbgw/+/34922
+ timer hnbgw X31 5

 msc 0
  remote-addr msc-naught
diff --git a/ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg 
b/ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg
index 1d11602..d10ea6d 100644
--- a/ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg
+++ b/ttcn3-hnbgw-test/with-pfcp/osmo-hnbgw.cfg
@@ -80,6 +80,9 @@
   local-port 8805
  # send PFCP Assoc Setup Req more often
  timer pfcp x26 5
+ # reduce default X31 from 15 seconds
+ # https://gerrit.osmocom.org/c/osmo-hnbgw/+/34922
+ timer hnbgw X31 5

 msc 0
  remote-addr msc-naught

--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/34979?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I223d38e9ec2ca0f9f2ce2ac5311932789f328c9a
Gerrit-Change-Number: 34979
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-MessageType: merged


[S] Change in docker-playground[master]: ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31

2023-11-09 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/34952?usp=email )

Change subject: ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31
..

ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31

Depends: osmo-ttcn3-hacks.git I176ef96e193f2ca39077bcee3a2187768ddb45ce
Change-Id: I98e1d4d649ea07b006a7d4c15f8d94a9b4b3de1d
---
M ttcn3-hnbgw-test/HNBGW_Tests.cfg
1 file changed, 12 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved




diff --git a/ttcn3-hnbgw-test/HNBGW_Tests.cfg b/ttcn3-hnbgw-test/HNBGW_Tests.cfg
index a76d5fd..9a7e1b9 100644
--- a/ttcn3-hnbgw-test/HNBGW_Tests.cfg
+++ b/ttcn3-hnbgw-test/HNBGW_Tests.cfg
@@ -109,6 +109,8 @@
}
 };
 HNBGW_Tests.mp_validate_talloc_asn1 := true;
+# keep in sync with osmo-hnbgw.cfg "timer hnbgw x31":
+HNBGW_Tests.mp_hnbgw_timer_x31 := 5;

 [MAIN_CONTROLLER]


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/34952?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I98e1d4d649ea07b006a7d4c15f8d94a9b4b3de1d
Gerrit-Change-Number: 34952
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: ms: init blade with fpga control

2023-11-09 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34965?usp=email )

Change subject: ms: init blade with fpga control
..

ms: init blade with fpga control

Blade 1 defaults to fpga tuning, but the blade 2 code defaults to host,
which does 8000 register reads and writes. The only way to speed this up
is to set the env var, which reduces opening the blade device from 10 to
1 seconds.

Change-Id: I32fe31f1e11f4ceb3c864ec8739d177e780d0a7e
---
M Transceiver52M/ms/bladerf_specific.h
1 file changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved




diff --git a/Transceiver52M/ms/bladerf_specific.h 
b/Transceiver52M/ms/bladerf_specific.h
index e32d77c..e9245d4 100644
--- a/Transceiver52M/ms/bladerf_specific.h
+++ b/Transceiver52M/ms/bladerf_specific.h
@@ -254,6 +254,8 @@

bladerf_log_set_verbosity(BLADERF_LOG_LEVEL_DEBUG);
bladerf_set_usb_reset_on_open(true);
+
+   setenv("BLADERF_DEFAULT_TUNING_MODE","fpga",1); // ensure blade 
2 does not spend 10 seconds initializing host control
blade_check(bladerf_open, &dev, "");
if (!dev) {
std::cerr << "open failed, device missing?" << 
std::endl;

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34965?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I32fe31f1e11f4ceb3c864ec8739d177e780d0a7e
Gerrit-Change-Number: 34965
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


[S] Change in osmo-trx[master]: devices: fix wrong gain to power mapping

2023-11-09 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34972?usp=email )

Change subject: devices: fix wrong gain to power mapping
..

devices: fix wrong gain to power mapping

The dev type was set too early, but the actual dev is only being
discovered during open, so update it. This broke the gain to power
mapping by defaulting to a wrong device.

Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
---
M Transceiver52M/device/bladerf/bladerf.cpp
M Transceiver52M/device/common/bandmanager.h
M Transceiver52M/device/lms/LMSDevice.cpp
M Transceiver52M/device/uhd/UHDDevice.cpp
4 files changed, 22 insertions(+), 1 deletion(-)

Approvals:
  fixeria: Looks good to me, approved; Verified
  Jenkins Builder: Verified




diff --git a/Transceiver52M/device/bladerf/bladerf.cpp 
b/Transceiver52M/device/bladerf/bladerf.cpp
index 3e830b1..2f3c86a 100644
--- a/Transceiver52M/device/bladerf/bladerf.cpp
+++ b/Transceiver52M/device/bladerf/bladerf.cpp
@@ -279,6 +279,7 @@

dev_type = blade_dev_type::BLADE2;
tx_window = TX_WINDOW_FIXED;
+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));

struct bladerf_devinfo info;
bladerf_get_devinfo(dev, &info);
diff --git a/Transceiver52M/device/common/bandmanager.h 
b/Transceiver52M/device/common/bandmanager.h
index a198937..d07f21d 100644
--- a/Transceiver52M/device/common/bandmanager.h
+++ b/Transceiver52M/device/common/bandmanager.h
@@ -34,7 +34,7 @@
using powerkeyt = typename powermapt::key_type;
using powermappedt = typename powermapt::mapped_type;
using devkeyt = typename devmapt::key_type;
-   const devkeyt &m_dev_type;
+   devkeyt m_dev_type;
const powermapt &m_power_map;
const devmapt &m_dev_map;
powerkeyt m_fallback;
@@ -102,6 +102,10 @@
band_ass_curr_sess = false;
}

+   void update_band_dev(devkeyt dev_type) {
+   m_dev_type = dev_type;
+   }
+
void get_dev_band_desc(powermappedt &desc)
{
if (m_band == 0) {
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp 
b/Transceiver52M/device/lms/LMSDevice.cpp
index 451d2b9..7c220d2 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -245,6 +245,7 @@

m_dev_type = parse_dev_type(m_lms_dev);
dev_desc = dev_param_map.at(m_dev_type);
+   update_band_dev(m_dev_type);

if ((cfg->clock_ref != REF_EXTERNAL) && (cfg->clock_ref != 
REF_INTERNAL)) {
LOGC(DDEV, ERROR) << "Invalid reference type";
diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp 
b/Transceiver52M/device/uhd/UHDDevice.cpp
index ec772aa..85e9e38 100644
--- a/Transceiver52M/device/uhd/UHDDevice.cpp
+++ b/Transceiver52M/device/uhd/UHDDevice.cpp
@@ -530,6 +530,8 @@
if (!parse_dev_type())
return -1;

+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));
+
if ((dev_type == E3XX) && !uhd_e3xx_version_chk()) {
LOGC(DDEV, ALERT) << "E3XX requires UHD 003.009.000 or greater";
return -1;

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34972?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
Gerrit-Change-Number: 34972
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


[M] Change in osmo-hnbgw[master]: tests/ranap_rab_ass: Test RAB-Ass.req with X.213 IPv4 address len=7

2023-11-09 Thread fixeria
Attention is currently required from: pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34964?usp=email )

Change subject: tests/ranap_rab_ass: Test RAB-Ass.req with X.213 IPv4 address 
len=7
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34964?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I71323018d79a4f5778dc6e49488d75ae7c2c4cdc
Gerrit-Change-Number: 34964
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 09 Nov 2023 11:34:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: logging_gsmtap: Temporarily disable logging when sending the logs

2023-11-09 Thread fixeria
Attention is currently required from: arehbein, daniel, laforge.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email )

Change subject: logging_gsmtap: Temporarily disable logging when sending the 
logs
..


Patch Set 2:

(1 comment)

File src/core/logging_gsmtap.c:

https://gerrit.osmocom.org/c/libosmocore/+/34966/comment/2ef9061c_b6b37246
PS2, Line 118: level = target->loglevel
I believe we should not be overwriting the input parameters for the sake of 
saving one variable. If someone later adds some code below, they may need the 
original value passed by the caller, and it may not be obvious to them that it 
was overwritten. All in all, please add a new `unsigned int` variable for 
temporary storage of the `target->loglevel`.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e
Gerrit-Change-Number: 34966
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-CC: fixeria 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Thu, 09 Nov 2023 11:42:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[L] Change in libosmocore[master]: tests: Test gsmtap logging if write queue fills up

2023-11-09 Thread fixeria
Attention is currently required from: daniel.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email )

Change subject: tests: Test gsmtap logging if write queue fills up
..


Patch Set 2: Code-Review-1

(4 comments)

File tests/Makefile.am:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/b0f29678_b196770f
PS2, Line 18: logging/logging_test_gsmtap
This file needs to be updated properly:

* define `logging_test_gsmtap_SOURCES`,
* add `logging_test_gsmtap.err` to `EXTRA_DIST`.


https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/742cd617_f1dc078e
PS2, Line 566: logging/logging_test
add the respective statement for `logging_test_gsmtap` here


File tests/logging/logging_test_gsmtap.err:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/207ec47b_9dddbd44
PS2, Line 108: 0x61100328
this is non-deterministic output, we should not match it


File tests/testsuite.at:

https://gerrit.osmocom.org/c/libosmocore/+/34967/comment/cc41c509_d39525a8 
PS2, Line 206: logging_test_gsmtap.ok
no such file?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34967?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5ae0c4c3820a9ed59eaf4003d2c57b6bdfe3468
Gerrit-Change-Number: 34967
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Thu, 09 Nov 2023 11:51:29 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-hnbgw[master]: allow (second) CS RAB Assignment Request without RTP info

2023-11-09 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34974?usp=email )

Change subject: allow (second) CS RAB Assignment Request without RTP info
..

allow (second) CS RAB Assignment Request without RTP info

In the field, we've encountered a so far unsupported scenario: after a
RAB Assignment Request and Response have successfully set up an RTP
stream, the CN sends *another* RAB Assignment Request to modify some SDU
parameters, omitting the transportLayerInformation IE (not modifying the
RTP address).

Directly forward all RAB Assignment Requests that have no RTP
information. This covers above use case, and also generally applies: no
RTP info means nothing to tell the MGW about.

Do not (yet?) support modifying the RTP address/port.

Related: osmo-ttcn3-hacks Iadaba0e5e82ad6d163ad509904ede213e2462d5c
Related: SYS#6624
Change-Id: I25bf19981cd75a87a7ceb3382dae1ec626ae475c
---
M src/osmo-hnbgw/mgw_fsm.c
1 file changed, 80 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  osmith: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/src/osmo-hnbgw/mgw_fsm.c b/src/osmo-hnbgw/mgw_fsm.c
index ddab0b5..7b4c811 100644
--- a/src/osmo-hnbgw/mgw_fsm.c
+++ b/src/osmo-hnbgw/mgw_fsm.c
@@ -683,6 +683,47 @@
return 0;
 }

+static bool is_rab_ass_without_tli(struct hnbgw_context_map *map, 
ranap_message *message)
+{
+   RANAP_RAB_AssignmentRequestIEs_t *ies;
+   RANAP_ProtocolIE_ContainerPair_t *protocol_ie_container_pair;
+   RANAP_ProtocolIE_FieldPair_t *protocol_ie_field_pair;
+   RANAP_RAB_SetupOrModifyItemFirst_t _rab_setup_or_modify_item_first = { 
0 };
+   RANAP_RAB_SetupOrModifyItemFirst_t *rab_setup_or_modify_item_first = 
&_rab_setup_or_modify_item_first;
+   int rc;
+   bool ret;
+
+   ies = &message->msg.raB_AssignmentRequestIEs;
+
+   if (!(ies->presenceMask & 
RAB_ASSIGNMENTREQUESTIES_RANAP_RAB_SETUPORMODIFYLIST_PRESENT))
+   return false;
+
+   /* Detect the end of the list */
+   if (ies->raB_SetupOrModifyList.list.count < 1)
+   return false;
+
+   protocol_ie_container_pair = ies->raB_SetupOrModifyList.list.array[0];
+   protocol_ie_field_pair = protocol_ie_container_pair->list.array[0];
+
+   if (!protocol_ie_field_pair)
+   return false;
+
+   if (protocol_ie_field_pair->id != 
RANAP_ProtocolIE_ID_id_RAB_SetupOrModifyItem) {
+   RANAP_DEBUG
+   ("Decoding failed, the protocol IE field-pair is not of 
type RANAP RAB setup-or-modify-item!\n");
+   return false;
+   }
+
+   rc = 
ranap_decode_rab_setupormodifyitemfirst(rab_setup_or_modify_item_first,
+
&protocol_ie_field_pair->firstValue);
+   if (rc < 0)
+   return false;
+
+   ret = rab_setup_or_modify_item_first->transportLayerInformation == NULL;
+   ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_SetupOrModifyItemFirst, 
rab_setup_or_modify_item_first);
+   return ret;
+}
+
 /* Check if the message contains a RAB-ReleaseItem that matches the RAB-ID 
that is managed by the given context map */
 static bool is_our_rab_release(struct hnbgw_context_map *map, ranap_message 
*message)
 {
@@ -721,6 +762,15 @@
initialized = true;
}

+   /* There may be CS RAB Assignment Requests without actual RTP 
information: after a normal RAB Assignment,
+* another RAB Assignment may follow, modifying some RAB parameters. 
When there is no RTP info in the message,
+* there is no RTP to redirect via MGW, hence just forward as-is. */
+   if (is_rab_ass_without_tli(map, message)) {
+   LOG_MAP(map, DCN, LOGL_INFO,
+   "Rx RAB Assignment Request without 
transportLayerInformation, forwarding as-is\n");
+   return map_rua_dispatch(map, MAP_RUA_EV_TX_DIRECT_TRANSFER, 
ranap_msg);
+   }
+
/* The RTP stream negotiation usually begins with a 
RAB-AssignmentRequest and ends with an IU-Release, however
 * it may also be that the MSC decides to release the RAB with a 
dedicated RAB-AssignmentRequest that contains
 * a ReleaseList. In this case an FSM will already be present. */
@@ -791,6 +841,13 @@
return -1;
}

+   if (map->mgw_fi->state == MGW_ST_ESTABLISHED) {
+   /* This is a response to a second RAB Assignment Request, which 
only modified some RAB config on top of
+* an earlier RAB Assignment. Just forward the response as-is, 
we already have our MGW set up and need
+* no info from it. (i.e. we don't support modifying the RTP 
address.) */
+   return map_sccp_dispatch(map, MAP_SCCP_EV_TX_DATA_REQUEST, 
ranap_msg);
+   }
+
mgw_fsm_priv = map->mgw_fi->priv;

talloc_steal

[S] Change in libosmocore[master]: logging_gsmtap: Temporarily disable logging when sending the logs

2023-11-09 Thread laforge
Attention is currently required from: arehbein, daniel, fixeria.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email )

Change subject: logging_gsmtap: Temporarily disable logging when sending the 
logs
..


Patch Set 2:

(1 comment)

File src/core/logging_gsmtap.c:

https://gerrit.osmocom.org/c/libosmocore/+/34966/comment/2ae312bb_d173590a
PS2, Line 118: level = target->loglevel
> I believe we should not be overwriting the input parameters for the sake of 
> saving one variable. […]
as daniel is on holidays and this is  a fairly trivial change: @fixeria, would 
you mind amending this patch and sending an updated version?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e
Gerrit-Change-Number: 34966
Gerrit-PatchSet: 2
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-CC: fixeria 
Gerrit-Attention: arehbein 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Thu, 09 Nov 2023 12:27:51 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: logging_gsmtap: Temporarily disable logging when sending the logs

2023-11-09 Thread fixeria
Attention is currently required from: arehbein, daniel, fixeria, osmith.

fixeria has uploaded a new patch set (#3) to the change originally created by 
daniel. ( https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email )

The following approvals got outdated and were removed:
Code-Review+1 by osmith, Verified+1 by Jenkins Builder


Change subject: logging_gsmtap: Temporarily disable logging when sending the 
logs
..

logging_gsmtap: Temporarily disable logging when sending the logs

This avoids an infinite recursion when sending a gsmtap log message
causes a log message.
Temporarily set target->loglevel higher than LOGL_FATAL, which
effectively disables logging for that target. Other targets like stderr
will still log this message so there is still an indication that
something went wrong.

Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e
Related: OS#6213
---
M src/core/logging_gsmtap.c
1 file changed, 22 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/34966/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e
Gerrit-Change-Number: 34966
Gerrit-PatchSet: 3
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-CC: fixeria 
Gerrit-Attention: osmith 
Gerrit-Attention: arehbein 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-MessageType: newpatchset


[S] Change in libosmocore[master]: logging_gsmtap: Temporarily disable logging when sending the logs

2023-11-09 Thread fixeria
Attention is currently required from: arehbein, daniel, laforge, osmith.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email )

Change subject: logging_gsmtap: Temporarily disable logging when sending the 
logs
..


Patch Set 3:

(1 comment)

File src/core/logging_gsmtap.c:

https://gerrit.osmocom.org/c/libosmocore/+/34966/comment/7fc6d8c8_6b59a0af
PS2, Line 118: level = target->loglevel
> as daniel is on holidays and this is  a fairly trivial change: @fixeria, 
> would you mind amending thi […]
Sure, done. LGTM.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e
Gerrit-Change-Number: 34966
Gerrit-PatchSet: 3
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-CC: fixeria 
Gerrit-Attention: osmith 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Thu, 09 Nov 2023 12:35:50 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[M] Change in pysim[master]: pySim-shell: Move init_card() function to new pySim.app module

2023-11-09 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34956?usp=email )

Change subject: pySim-shell: Move init_card() function to new pySim.app module
..

pySim-shell: Move init_card() function to new pySim.app module

The point of this is to move generic code out of pySim-shell.py,
paving the way for more/other executables using the full power of
our class model without having to reinvent the wheel.

Change-Id: Icf557ed3064ef613ed693ce28bd3514a97a938bd
---
M pySim-shell.py
A pySim/app.py
2 files changed, 133 insertions(+), 94 deletions(-)

Approvals:
  osmith: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




diff --git a/pySim-shell.py b/pySim-shell.py
index 0c559f9..795276a 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -2,7 +2,7 @@

 # Interactive shell for working with SIM / UICC / USIM / ISIM cards
 #
-# (C) 2021-2022 by Harald Welte 
+# (C) 2021-2023 by Harald Welte 
 #
 # 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
@@ -48,111 +48,20 @@
 from pprint import pprint as pp

 from pySim.exceptions import *
-from pySim.commands import SimCardCommands
 from pySim.transport import init_reader, ApduTracer, argparse_add_reader_args, 
ProactiveHandler
-from pySim.cards import card_detect, SimCardBase, UiccCardBase
 from pySim.utils import h2b, b2h, i2h, swap_nibbles, rpad, JsonEncoder, 
bertlv_parse_one, sw_match
 from pySim.utils import sanitize_pin_adm, tabulate_str_list, 
boxed_heading_str, Hexstr, dec_iccid
 from pySim.utils import is_hexstr_or_decimal, is_hexstr, is_decimal
 from pySim.card_handler import CardHandler, CardHandlerAuto

-from pySim.filesystem import CardDF, CardADF, CardModel, CardApplication
-from pySim.runtime import RuntimeState
-from pySim.profile import CardProfile
-from pySim.cdma_ruim import CardProfileRUIM
-from pySim.ts_102_221 import CardProfileUICC
+from pySim.filesystem import CardDF, CardADF
 from pySim.ts_102_222 import Ts10Commands
 from pySim.gsm_r import DF_EIRENE
 from pySim.cat import ProactiveCommand

-# we need to import this module so that the SysmocomSJA2 sub-class of
-# CardModel is created, which will add the ATR-based matching and
-# calling of SysmocomSJA2.add_files.  See  CardModel.apply_matching_models
-import pySim.sysmocom_sja2
-
-# we need to import these modules so that the various sub-classes of
-# CardProfile are created, which will be used in init_card() to iterate
-# over all known CardProfile sub-classes.
-import pySim.ts_31_102
-import pySim.ts_31_103
-import pySim.ts_31_104
-import pySim.ara_m
-import pySim.global_platform
-import pySim.euicc
-
 from pySim.card_key_provider import CardKeyProviderCsv, 
card_key_provider_register, card_key_provider_get_field

-
-def init_card(sl):
-"""
-Detect card in reader and setup card profile and runtime state. This
-function must be called at least once on startup. The card and runtime
-state object (rs) is required for all pySim-shell commands.
-"""
-
-# Create command layer
-scc = SimCardCommands(transport=sl)
-
-# Wait up to three seconds for a card in reader and try to detect
-# the card type.
-print("Waiting for card...")
-try:
-sl.wait_for_card(3)
-except NoCardError:
-print("No card detected!")
-return None, None
-except:
-print("Card not readable!")
-return None, None
-
-generic_card = False
-card = card_detect(scc)
-if card is None:
-print("Warning: Could not detect card type - assuming a generic card 
type...")
-card = SimCardBase(scc)
-generic_card = True
-
-profile = CardProfile.pick(scc)
-if profile is None:
-print("Unsupported card type!")
-return None, card
-
-# ETSI TS 102 221, Table 9.3 specifies a default for the PIN key
-# references, however card manufactures may still decide to pick an
-# arbitrary key reference. In case we run on a generic card class that is
-# detected as an UICC, we will pick the key reference that is officially
-# specified.
-if generic_card and isinstance(profile, CardProfileUICC):
-card._adm_chv_num = 0x0A
-
-print("Info: Card is of type: %s" % str(profile))
-
-# FIXME: this shouldn't really be here but somewhere else/more generic.
-# We cannot do it within pySim/profile.py as that would create circular
-# dependencies between the individual profiles and profile.py.
-if isinstance(profile, CardProfileUICC):
-for app_cls in CardApplication.__subclasses__():
-constr_sig = inspect.signature(app_cls.__init__)
-# skip any intermediary sub-classes such as CardApplicationSD
-if len(constr_sig.parameters) != 1:
-continue
-profile.add_application(app

[S] Change in pysim[master]: transport: Extend the documentation for each transport driver

2023-11-09 Thread laforge
Attention is currently required from: dexter.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34962?usp=email )

Change subject: transport: Extend the documentation for each transport driver
..


Patch Set 2:

(1 comment)

File pySim/transport/pcsc.py:

https://gerrit.osmocom.org/c/pysim/+/34962/comment/1225bfa0_ccced6a1
PS2, Line 127: Microsoft
 : Windows
> Linux not mentioned first? ;)
PC/SC was specified by Microsoft for ... windows :P



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34962?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I8807bfb11f43b167f1321d556e09ec5234fff629
Gerrit-Change-Number: 34962
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 09 Nov 2023 12:37:53 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: gsmtap_util: Simplify sink

2023-11-09 Thread laforge
Attention is currently required from: arehbein.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34881?usp=email )

Change subject: gsmtap_util: Simplify sink
..


Patch Set 4: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34881?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4025920d5f62d17133e9b5fe81cd34a88c4f20b5
Gerrit-Change-Number: 34881
Gerrit-PatchSet: 4
Gerrit-Owner: arehbein 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Attention: arehbein 
Gerrit-Comment-Date: Thu, 09 Nov 2023 12:40:13 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: logging_gsmtap: Temporarily disable logging when sending the logs

2023-11-09 Thread laforge
Attention is currently required from: arehbein, daniel, fixeria, osmith.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email )

Change subject: logging_gsmtap: Temporarily disable logging when sending the 
logs
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e
Gerrit-Change-Number: 34966
Gerrit-PatchSet: 3
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-CC: fixeria 
Gerrit-Attention: osmith 
Gerrit-Attention: arehbein 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Thu, 09 Nov 2023 12:47:00 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: logging_gsmtap: Temporarily disable logging when sending the logs

2023-11-09 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email )

Change subject: logging_gsmtap: Temporarily disable logging when sending the 
logs
..

logging_gsmtap: Temporarily disable logging when sending the logs

This avoids an infinite recursion when sending a gsmtap log message
causes a log message.
Temporarily set target->loglevel higher than LOGL_FATAL, which
effectively disables logging for that target. Other targets like stderr
will still log this message so there is still an indication that
something went wrong.

Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e
Related: OS#6213
---
M src/core/logging_gsmtap.c
1 file changed, 22 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/src/core/logging_gsmtap.c b/src/core/logging_gsmtap.c
index dfd059b..7775c27 100644
--- a/src/core/logging_gsmtap.c
+++ b/src/core/logging_gsmtap.c
@@ -65,6 +65,7 @@
struct timeval tv;
int rc;
const char *file_basename;
+   unsigned int _level;

/* get timestamp ASAP */
osmo_gettimeofday(&tv, NULL);
@@ -114,7 +115,11 @@
}
msgb_put(msg, rc);

+   /* Ensure that any error occurring when sending the log message doesn't 
cause infinite recursion */
+   _level = target->loglevel;
+   target->loglevel = UINT8_MAX;
rc = gsmtap_sendmsg(target->tgt_gsmtap.gsmtap_inst, msg);
+   target->loglevel = _level;
if (rc)
msgb_free(msg);
 }

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34966?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I19203cadbad6019a3834793b8ac816d903fe088e
Gerrit-Change-Number: 34966
Gerrit-PatchSet: 3
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-CC: fixeria 
Gerrit-MessageType: merged


[M] Change in libosmocore[master]: gsmtap_util: Use Osmo IO instead of Osmo write queues

2023-11-09 Thread laforge
Attention is currently required from: arehbein, pespin.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34743?usp=email )

Change subject: gsmtap_util: Use Osmo IO instead of Osmo write queues
..


Patch Set 8: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34743?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iadbbef74e3add7001d84dd6b68f51eac293e44d0
Gerrit-Change-Number: 34743
Gerrit-PatchSet: 8
Gerrit-Owner: arehbein 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: arehbein 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 09 Nov 2023 12:47:28 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: gsmtap_util: Use Osmo IO instead of Osmo write queues

2023-11-09 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34743?usp=email )

Change subject: gsmtap_util: Use Osmo IO instead of Osmo write queues
..

gsmtap_util: Use Osmo IO instead of Osmo write queues

 - Adapt decl. of 'struct gsmtap_inst' for usage of Osmo IO while maintaining 
backwards compatibility
 - Maintain legacy behavior without any message queues if osmo_io_mode is zero

Related: OS#6213
Change-Id: Iadbbef74e3add7001d84dd6b68f51eac293e44d0
---
M src/core/gsmtap_util.c
1 file changed, 53 insertions(+), 37 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  daniel: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




diff --git a/src/core/gsmtap_util.c b/src/core/gsmtap_util.c
index dcbd304..458d1d7 100644
--- a/src/core/gsmtap_util.c
+++ b/src/core/gsmtap_util.c
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 

@@ -46,13 +47,28 @@
  *
  * \file gsmtap_util.c */

-/*! one gsmtap instance */
+/*! one gsmtap instance
+ *  Until gsmtap_inst_fd() is removed from the API at some point in the 
future, we have to keep the first member as
+ *  'int' and the second as 'struct osmo_wqueue' (this effectively makes sure 
that the struct member wq.bfd.fd maintains
+ *  the same memory offset from the start of the struct) to ensure that 
inlined static 'instances' of gsmtap_inst_fd() in
+ *  old binaries keep working the way they used to even with gsmtap_inst 
objects obtained from newer versions of libosmocore */
 struct gsmtap_inst {
-   int ofd_wq_mode;/*!< wait queue mode? This field member may not 
be changed or moved (backwards compatibility) */
-   struct osmo_wqueue wq;  /*!< the wait queue. This field member may not 
be changed or moved (backwards compatibility) */
-   struct osmo_fd sink_ofd; /*!< file descriptor */
+   int osmo_io_mode; /*!< Indicates whether or not to use Osmo IO 
mode for message output (thus enabling use of tx queues).
+  *   This field member may not be changed or 
moved (backwards compatibility) */
+   struct osmo_wqueue wq;/*!< the wait queue. This field member may 
not be changed or moved (backwards compatibility) */
+
+   struct osmo_io_fd *out;   /*!< Used when osmo_io_mode is nonzero */
+   struct osmo_fd sink_ofd;
 };

+struct _gsmtap_inst_legacy {
+   int ofd_wq_mode;
+   struct osmo_wqueue wq;
+   struct osmo_fd sink_ofd;
+};
+osmo_static_assert(offsetof(struct gsmtap_inst, wq) == offsetof(struct 
_gsmtap_inst_legacy, wq),
+  gsmtap_inst_new_wq_offset_equals_legacy_wq_offset);
+
 /*! Deprecated, use gsmtap_inst_fd2() instead
  *  \param[in] gti GSMTAP instance
  *  \returns file descriptor of GSMTAP instance */
@@ -253,6 +269,7 @@

 #include 
 #include 
+#include 

 /*! Create a new (sending) GSMTAP source socket
  *  \param[in] host host name or IP address in string format
@@ -346,8 +363,8 @@
if (!gti)
return -ENODEV;

-   if (gti->ofd_wq_mode)
-   return osmo_wqueue_enqueue(>i->wq, msg);
+   if (gti->osmo_io_mode)
+   return osmo_iofd_write_msgb(gti->out, msg);
else {
/* try immediate send and return error if any */
int rc;
@@ -416,35 +433,17 @@
signal_dbm, snr, data, len);
 }

-/* Callback from select layer if we can write to the socket */
-static int gsmtap_wq_w_cb(struct osmo_fd *ofd, struct msgb *msg)
-{
-   int rc;
-
-   rc = write(ofd->fd, msg->data, msg->len);
-   if (rc < 0) {
-   return rc;
-   }
-   if (rc != msg->len) {
-   return -EIO;
-   }
-
-   return 0;
-}
-
 /* Callback from select layer if we can read from the sink socket */
 static int gsmtap_sink_fd_cb(struct osmo_fd *fd, unsigned int flags)
 {
int rc;
uint8_t buf[4096];
-
if (!(flags & OSMO_FD_READ))
return 0;

rc = read(fd->fd, buf, sizeof(buf));
-   if (rc < 0) {
+   if (rc < 0)
return rc;
-   }
/* simply discard any data arriving on the socket */

return 0;
@@ -473,7 +472,7 @@
if (fd < 0)
return fd;

-   if (gti->ofd_wq_mode) {
+   if (gti->osmo_io_mode) {
struct osmo_fd *sink_ofd;

sink_ofd = >i->sink_ofd;
@@ -491,6 +490,12 @@
return fd;
 }

+/* Registered in Osmo IO as a no-op to set the write callback. */
+static void gsmtap_ops_noop_cb(struct osmo_io_fd *iofd, int res, struct msgb 
*msg)
+{
+}
+
+static struct osmo_io_ops gsmtap_ops = { .write_cb = gsmtap_ops_noop_cb };

 /*! Open GSMTAP source socket, connect and register osmo_fd
  *  \param[in] local_host IP address in string format
@@ -509,27 +514,27 @@
const char *rem_host, uint16_t 
rem_port, int ofd_wq

[M] Change in libosmocore[master]: gsmtap_util: Use Osmo IO instead of Osmo write queues

2023-11-09 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34743?usp=email )

Change subject: gsmtap_util: Use Osmo IO instead of Osmo write queues
..


Patch Set 9:

(1 comment)

File src/core/gsmtap_util.c:

https://gerrit.osmocom.org/c/libosmocore/+/34743/comment/7263655c_446a9895
PS5, Line 478:  osmo_iofd_setup(gti, gti->sink_fd, "gsmtap_inst.out", 
OSMO_IO_FD_MODE_READ_WRITE, &gsmtap_sink_ops, NULL);
> Test to reproduce your issue (even with the old wqueue code) and proposed fix 
> here: […]
the fix for that other issue (disabling log / endless loop) has been merged



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34743?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iadbbef74e3add7001d84dd6b68f51eac293e44d0
Gerrit-Change-Number: 34743
Gerrit-PatchSet: 9
Gerrit-Owner: arehbein 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 09 Nov 2023 12:48:17 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: daniel 
Gerrit-MessageType: comment


[S] Change in pysim[master]: runtime: fix tracking of selected_adf

2023-11-09 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34897?usp=email )

Change subject: runtime: fix tracking of selected_adf
..

runtime: fix tracking of selected_adf

The class property selected_adf is not updated in all locations where an
ADF is selected, this means that we may loose track of the currently
selected ADF in some locations

Change-Id: I4cc0c58ff887422b4f3954d35c8380ddc00baa1d
Related: OS#5418
---
M pySim/runtime.py
1 file changed, 16 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve




diff --git a/pySim/runtime.py b/pySim/runtime.py
index 8660724..58df22d 100644
--- a/pySim/runtime.py
+++ b/pySim/runtime.py
@@ -111,6 +111,7 @@
 for f in sorted(set(apps_profile) - set(apps_taken), key=str):
 try:
 data, sw = self.card.select_adf_by_aid(f.aid)
+self.selected_adf = f
 if sw == "9000":
 print(" %s: %s" % (f.name, f.aid))
 apps_taken.append(f)
@@ -344,6 +345,7 @@
 try:
 if isinstance(f, CardADF):
 (data, sw) = self.rs.card.select_adf_by_aid(f.aid, 
scc=self.scc)
+self.selected_adf = f
 else:
 (data, sw) = self.scc.select_file(f.fid)
 self.selected_file = f

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34897?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4cc0c58ff887422b4f3954d35c8380ddc00baa1d
Gerrit-Change-Number: 34897
Gerrit-PatchSet: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


[S] Change in osmo-ttcn3-hacks[master]: hnbgw: osmo-hnbgw.cfg: reduce X31 to 5s

2023-11-09 Thread neels
Attention is currently required from: fixeria, laforge, osmith.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34980?usp=email )

Change subject: hnbgw: osmo-hnbgw.cfg: reduce X31 to 5s
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34980?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1c275a1d10cfe0fe67d71e900881b0c4891af0be
Gerrit-Change-Number: 34980
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 09 Nov 2023 16:23:52 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[ewild/1.6.1]: Bump version: 1.6.0 → 1.6.1

2023-11-09 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34989?usp=email )


Change subject: Bump version: 1.6.0 → 1.6.1
..

Bump version: 1.6.0 → 1.6.1

Change-Id: I345ba6569ae0765b3d33e4024d07fc5d925bdf80
---
M debian/changelog
1 file changed, 16 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/89/34989/1

diff --git a/debian/changelog b/debian/changelog
index 90f554e..ac6e089 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+osmo-trx (1.6.1) unstable; urgency=medium
+
+  [ Eric Wild ]
+  * devices: fix wrong gain to power mapping
+
+ -- Eric Wild   Thu, 09 Nov 2023 14:16:21 +0200
+
 osmo-trx (1.6.0) unstable; urgency=medium

   [ Vadim Yanitskiy ]

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34989?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: ewild/1.6.1
Gerrit-Change-Id: I345ba6569ae0765b3d33e4024d07fc5d925bdf80
Gerrit-Change-Number: 34989
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[S] Change in osmo-trx[ewild/1.6.1]: devices: fix wrong gain to power mapping

2023-11-09 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email )


Change subject: devices: fix wrong gain to power mapping
..

devices: fix wrong gain to power mapping

The dev type was set too early, but the actual dev is only being
discovered during open, so update it. This broke the gain to power
mapping by defaulting to a wrong device.

Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
---
M Transceiver52M/device/bladerf/bladerf.cpp
M Transceiver52M/device/common/bandmanager.h
M Transceiver52M/device/lms/LMSDevice.cpp
M Transceiver52M/device/uhd/UHDDevice.cpp
4 files changed, 22 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/88/34988/1

diff --git a/Transceiver52M/device/bladerf/bladerf.cpp 
b/Transceiver52M/device/bladerf/bladerf.cpp
index 3e830b1..2f3c86a 100644
--- a/Transceiver52M/device/bladerf/bladerf.cpp
+++ b/Transceiver52M/device/bladerf/bladerf.cpp
@@ -279,6 +279,7 @@

dev_type = blade_dev_type::BLADE2;
tx_window = TX_WINDOW_FIXED;
+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));

struct bladerf_devinfo info;
bladerf_get_devinfo(dev, &info);
diff --git a/Transceiver52M/device/common/bandmanager.h 
b/Transceiver52M/device/common/bandmanager.h
index a198937..d07f21d 100644
--- a/Transceiver52M/device/common/bandmanager.h
+++ b/Transceiver52M/device/common/bandmanager.h
@@ -34,7 +34,7 @@
using powerkeyt = typename powermapt::key_type;
using powermappedt = typename powermapt::mapped_type;
using devkeyt = typename devmapt::key_type;
-   const devkeyt &m_dev_type;
+   devkeyt m_dev_type;
const powermapt &m_power_map;
const devmapt &m_dev_map;
powerkeyt m_fallback;
@@ -102,6 +102,10 @@
band_ass_curr_sess = false;
}

+   void update_band_dev(devkeyt dev_type) {
+   m_dev_type = dev_type;
+   }
+
void get_dev_band_desc(powermappedt &desc)
{
if (m_band == 0) {
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp 
b/Transceiver52M/device/lms/LMSDevice.cpp
index 451d2b9..7c220d2 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -245,6 +245,7 @@

m_dev_type = parse_dev_type(m_lms_dev);
dev_desc = dev_param_map.at(m_dev_type);
+   update_band_dev(m_dev_type);

if ((cfg->clock_ref != REF_EXTERNAL) && (cfg->clock_ref != 
REF_INTERNAL)) {
LOGC(DDEV, ERROR) << "Invalid reference type";
diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp 
b/Transceiver52M/device/uhd/UHDDevice.cpp
index ec772aa..85e9e38 100644
--- a/Transceiver52M/device/uhd/UHDDevice.cpp
+++ b/Transceiver52M/device/uhd/UHDDevice.cpp
@@ -530,6 +530,8 @@
if (!parse_dev_type())
return -1;

+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));
+
if ((dev_type == E3XX) && !uhd_e3xx_version_chk()) {
LOGC(DDEV, ALERT) << "E3XX requires UHD 003.009.000 or greater";
return -1;

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: ewild/1.6.1
Gerrit-Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
Gerrit-Change-Number: 34988
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange


[S] Change in osmo-trx[ewild/1.6.1]: devices: fix wrong gain to power mapping

2023-11-09 Thread osmith
Attention is currently required from: Hoernchen.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email )

Change subject: devices: fix wrong gain to power mapping
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: ewild/1.6.1
Gerrit-Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
Gerrit-Change-Number: 34988
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: osmith 
Gerrit-CC: Jenkins Builder
Gerrit-Attention: Hoernchen 
Gerrit-Comment-Date: Thu, 09 Nov 2023 16:46:32 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[ewild/1.6.1]: devices: fix wrong gain to power mapping

2023-11-09 Thread osmith
Attention is currently required from: Hoernchen.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email )

Change subject: devices: fix wrong gain to power mapping
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: ewild/1.6.1
Gerrit-Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
Gerrit-Change-Number: 34988
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: osmith 
Gerrit-CC: Jenkins Builder
Gerrit-Attention: Hoernchen 
Gerrit-Comment-Date: Thu, 09 Nov 2023 16:46:46 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[ewild/1.6.1]: Bump version: 1.6.0 → 1.6.1

2023-11-09 Thread osmith
Attention is currently required from: Hoernchen.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34989?usp=email )

Change subject: Bump version: 1.6.0 → 1.6.1
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34989?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: ewild/1.6.1
Gerrit-Change-Id: I345ba6569ae0765b3d33e4024d07fc5d925bdf80
Gerrit-Change-Number: 34989
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: osmith 
Gerrit-CC: Jenkins Builder
Gerrit-Attention: Hoernchen 
Gerrit-Comment-Date: Thu, 09 Nov 2023 16:46:43 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-bts[master]: osmo-bts-trx: tx_tch[fh]_fn(): fix sending idle CSD frames

2023-11-09 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/34992?usp=email )


Change subject: osmo-bts-trx: tx_tch[fh]_fn(): fix sending idle CSD frames
..

osmo-bts-trx: tx_tch[fh]_fn(): fix sending idle CSD frames

In accordance with 3GPP TS 44.021, sections 8.1.6 and 10.2.3, the
transmission of idle frames to the DTE is mandated when no data is
received from the radio interface.  An idle frame has all data,
status, and E-bits to binary '1' (excluding the alignment pattern).
This requirement is currently implemented for the Uplink, see
function csd_v110_rtp_encode().

However, 3GPP TS 44.021 does not explicitly specify whether the same
rule is applicable to the Downlink, perhaps assuming a continuous
stream of bits on the CSD-over-TDM link.  Currently, we transmit
a sequence of binary '0' on the Downlink instead of idle frames.

* In non-transparent (RLP) mode, whether all bits in a block are
  set to binary '0' or '1' has no impact, as both scenarios lead
  to an incorrect FCS.
* In transparent sync mode, any filling be it binary '0' or '1'
  is perceived as incorrect or unexpected.
* In transparent async mode, it is more logical to transmit a
  sequence of binary '1,' which will be interpreted as
  a sequence of stop bits.

Let's align the Downlink with the Uplink for consistency and transmit
idle frames when no data is available for transmission.  The modified
60-bit V.110 frames exclude the alignment pattern, so sending a
sequence of binary '1' is enough to achieve the intended goal.

Change-Id: I0b25cfac41b6d8dcf3bfd9d46d51a9665f1b047a
Related: OS#1572
---
M src/osmo-bts-trx/sched_lchan_tchf.c
M src/osmo-bts-trx/sched_lchan_tchh.c
2 files changed, 80 insertions(+), 20 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/92/34992/1

diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c 
b/src/osmo-bts-trx/sched_lchan_tchf.c
index c0dfd47..0138a2a 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -535,16 +535,25 @@
int rc;

LOGL1SB(DL1P, LOGL_DEBUG, l1ts, br, "No TCH or FACCH prim for 
transmit.\n");
-   /* If the channel mode is TCH/FS or TCH/EFS, transmit a dummy
-* speech block with inverted CRC3, designed to induce a BFI
-* condition in the MS receiver.  In all other channel modes,
-* transmit dummy FACCH like we always did before.
+   /* - If the channel mode is TCH/FS or TCH/EFS, transmit a dummy
+*   speech block with inverted CRC3, designed to induce a BFI
+*   condition in the MS receiver.
+* - If the channel mode is one of the CSD modes, transmit an
+*   idle frame as described in 3GPP TS 44.021, sections 8.1.6
+*   and 10.2.3 (all data, status and E-bits set to binary '1').
+* - In all other channel modes, transmit dummy FACCH
+*   like we always did before.
 *
 * FIXME: someone who knows AMR needs to look at this problem
 * and decide what is the correct BTS Tx behavior for frame
 * gaps in TCH/AFS.  See OS#6049.
 */
switch (tch_mode) {
+   case GSM48_CMODE_DATA_12k0:
+   case GSM48_CMODE_DATA_6k0:
+   case GSM48_CMODE_DATA_3k6:
+   case GSM48_CMODE_DATA_14k5:
+   break; /* see below */
case GSM48_CMODE_SPEECH_V1:
case GSM48_CMODE_SPEECH_EFR:
rc = gsm0503_tch_fr_encode(BUFPOS(bursts_p, 0), NULL, 
0, 1);
@@ -591,30 +600,36 @@
break;
/* CSD (TCH/F9.6): 12.0 kbit/s radio interface rate */
case GSM48_CMODE_DATA_12k0:
-   if (msg_tch != NULL)
-   gsm0503_tch_fr96_encode(BUFPOS(bursts_p, 0), 
msgb_l2(msg_tch));
+   if (msg_tch == NULL)
+   msg_tch = tch_dummy_msgb(4 * 60, 0x01);
+   gsm0503_tch_fr96_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_tch));
if (msg_facch != NULL)
gsm0503_tch_fr_facch_encode(BUFPOS(bursts_p, 0), 
msgb_l2(msg_facch));
break;
/* CSD (TCH/F4.8): 6.0 kbit/s radio interface rate */
case GSM48_CMODE_DATA_6k0:
-   if (msg_tch != NULL)
-   gsm0503_tch_fr48_encode(BUFPOS(bursts_p, 0), 
msgb_l2(msg_tch));
+   if (msg_tch == NULL)
+   msg_tch = tch_dummy_msgb(2 * 60, 0x01);
+   gsm0503_tch_fr48_encode(BUFPOS(bursts_p, 0), msgb_l2(msg_tch));
if (msg_facch != NULL)
gsm0503_tch_fr_facch_encode(BUFPOS(bursts_p, 0), 
msgb_l2(msg_facch));
break;
/* CSD (TCH/F2.4): 3.6 kbit/s radio interfac

[M] Change in osmo-bts[master]: osmo-bts-trx: tx_tch[fh]_fn(): rework generation of dummy FACCH

2023-11-09 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/34991?usp=email )


Change subject: osmo-bts-trx: tx_tch[fh]_fn(): rework generation of dummy FACCH
..

osmo-bts-trx: tx_tch[fh]_fn(): rework generation of dummy FACCH

Even though it might have a somewhat higher performance impact,
opting for the common code path for FACCH by allocating a msgb
on heap is more favorable for both readability and maintainability.

This choice is preferred over directly calling
gsm0503_tch_fr_encode() and then using a 'goto' statement.
A similar strategy will be adopted in an follow up patch for CSD.

Change-Id: I67cb5c6f4d15149996e17c78a59d66db396da8ff
Related: OS#1572
---
M src/osmo-bts-trx/sched_lchan_tchf.c
M src/osmo-bts-trx/sched_lchan_tchh.c
2 files changed, 61 insertions(+), 28 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/91/34991/1

diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c 
b/src/osmo-bts-trx/sched_lchan_tchf.c
index 34af8a1..c0dfd47 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -490,6 +490,19 @@
}
 }

+struct msgb *tch_dummy_msgb(size_t size, uint8_t pad)
+{
+   struct msgb *msg;
+
+   msg = msgb_alloc(size, __func__);
+   OSMO_ASSERT(msg != NULL);
+
+   msg->l2h = msgb_put(msg, size);
+   memset(msg->l2h, pad, size);
+
+   return msg;
+}
+
 /* obtain a to-be-transmitted TCH/F (Full Traffic Channel) burst */
 int tx_tchf_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
 {
@@ -519,11 +532,6 @@
/* dequeue a TCH and/or a FACCH message to be transmitted */
tch_dl_dequeue(l1ts, br, &msg_tch, &msg_facch);
if (msg_tch == NULL && msg_facch == NULL) {
-   static const uint8_t dummy[GSM_MACBLOCK_LEN] = {
-   0x03, 0x03, 0x01, /* TODO: use randomized padding */
-   0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 
0x2b,
-   0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 
0x2b,
-   };
int rc;

LOGL1SB(DL1P, LOGL_DEBUG, l1ts, br, "No TCH or FACCH prim for 
transmit.\n");
@@ -541,13 +549,18 @@
case GSM48_CMODE_SPEECH_EFR:
rc = gsm0503_tch_fr_encode(BUFPOS(bursts_p, 0), NULL, 
0, 1);
if (rc == 0)
-   break;
+   goto send_burst;
/* fall-through */
+   case GSM48_CMODE_SIGN:
default:
-   gsm0503_tch_fr_encode(BUFPOS(bursts_p, 0), dummy, 
sizeof(dummy), 1);
-   chan_state->dl_facch_bursts = 8;
+   /* TODO: use randomized padding */
+   msg_facch = tch_dummy_msgb(GSM_MACBLOCK_LEN, 
GSM_MACBLOCK_PADDING);
+   /* dummy LAPDm func=UI frame */
+   msg_facch->l2h[0] = 0x03;
+   msg_facch->l2h[1] = 0x03;
+   msg_facch->l2h[2] = 0x01;
+   break;
}
-   goto send_burst;
}

/* Unlike SACCH, FACCH has no dedicated slots on the multiframe layout.
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c 
b/src/osmo-bts-trx/sched_lchan_tchh.c
index 77309cf..96ee5e8 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -399,6 +399,8 @@
 extern void tch_dl_dequeue(struct l1sched_ts *l1ts, const struct 
trx_dl_burst_req *br,
   struct msgb **msg_tch, struct msgb **msg_facch);

+struct msgb *tch_dummy_msgb(size_t size, uint8_t pad);
+
 /* obtain a to-be-transmitted TCH/H (Half Traffic Channel) burst */
 int tx_tchh_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br)
 {
@@ -445,11 +447,6 @@

/* no message at all, send a dummy L2 frame on FACCH */
if (msg_tch == NULL && msg_facch == NULL) {
-   static const uint8_t dummy[GSM_MACBLOCK_LEN] = {
-   0x03, 0x03, 0x01, /* TODO: use randomized padding */
-   0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 
0x2b,
-   0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 
0x2b,
-   };
int rc;
 
LOGL1SB(DL1P, LOGL_INFO, l1ts, br, "No TCH or FACCH prim for 
transmit.\n");
@@ -462,25 +459,30 @@
 * and decide what is the correct BTS Tx behavior for frame
 * gaps in TCH/AHS.  See OS#6049.
 */
-   if (tch_mode == GSM48_CMODE_SPEECH_V1) {
+   switch (tch_mode) {
+   case GSM48_CMODE_SPEECH_V1:
rc = gsm0503_tch_hr_encode(BUFPOS(bursts_p, 0), NULL, 
0);
if (rc == 0)
goto send_burst;
-

[S] Change in osmo-bts[master]: osmo-bts-trx: tx_tch[fh]_fn(): use BUFPOS macro everywhere

2023-11-09 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/34990?usp=email )


Change subject: osmo-bts-trx: tx_tch[fh]_fn(): use BUFPOS macro everywhere
..

osmo-bts-trx: tx_tch[fh]_fn(): use BUFPOS macro everywhere

For the sake of consistency.

Change-Id: I16ce4c979c5b44fd67324eb2ed3da28a4b78221b
Related: OS#1572
---
M src/osmo-bts-trx/sched_lchan_tchf.c
M src/osmo-bts-trx/sched_lchan_tchh.c
2 files changed, 15 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/90/34990/1

diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c 
b/src/osmo-bts-trx/sched_lchan_tchf.c
index ae800a9..34af8a1 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -539,12 +539,12 @@
switch (tch_mode) {
case GSM48_CMODE_SPEECH_V1:
case GSM48_CMODE_SPEECH_EFR:
-   rc = gsm0503_tch_fr_encode(bursts_p, NULL, 0, 1);
+   rc = gsm0503_tch_fr_encode(BUFPOS(bursts_p, 0), NULL, 
0, 1);
if (rc == 0)
break;
/* fall-through */
default:
-   gsm0503_tch_fr_encode(bursts_p, dummy, sizeof(dummy), 
1);
+   gsm0503_tch_fr_encode(BUFPOS(bursts_p, 0), dummy, 
sizeof(dummy), 1);
chan_state->dl_facch_bursts = 8;
}
goto send_burst;
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c 
b/src/osmo-bts-trx/sched_lchan_tchh.c
index 23e59cf..77309cf 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -463,7 +463,7 @@
 * gaps in TCH/AHS.  See OS#6049.
 */
if (tch_mode == GSM48_CMODE_SPEECH_V1) {
-   rc = gsm0503_tch_hr_encode(bursts_p, NULL, 0);
+   rc = gsm0503_tch_hr_encode(BUFPOS(bursts_p, 0), NULL, 
0);
if (rc == 0)
goto send_burst;
}

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/34990?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I16ce4c979c5b44fd67324eb2ed3da28a4b78221b
Gerrit-Change-Number: 34990
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


[M] Change in osmocom-bb[master]: trxcon/l1sched: tx_tch[fh]_fn(): fix sending idle CSD frames

2023-11-09 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34993?usp=email )


Change subject: trxcon/l1sched: tx_tch[fh]_fn(): fix sending idle CSD frames
..

trxcon/l1sched: tx_tch[fh]_fn(): fix sending idle CSD frames

In accordance with 3GPP TS 44.021, sections 8.1.6 and 10.2.3, the
transmission of idle frames to the DTE is mandated when no data is
received from the radio interface.  An idle frame has all data,
status, and E-bits to binary '1' (excluding the alignment pattern).

This requirement is currently implemented by osmo-bts for the Uplink,
and is going to be adopted for the Downlink (see the related patch).

This patch brings trxcon/l1sched in sync with osmo-bts-trx.

Change-Id: I7dea3dde46bc02814e99c3e873298cc7ed045a51
Related: osmo-bts.git I0b25cfac41b6d8dcf3bfd9d46d51a9665f1b047a
Related: OS#1572, OS#4396
---
M src/host/trxcon/src/sched_lchan_tchf.c
M src/host/trxcon/src/sched_lchan_tchh.c
2 files changed, 52 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/93/34993/1

diff --git a/src/host/trxcon/src/sched_lchan_tchf.c 
b/src/host/trxcon/src/sched_lchan_tchf.c
index ac9ee6b..909804e 100644
--- a/src/host/trxcon/src/sched_lchan_tchf.c
+++ b/src/host/trxcon/src/sched_lchan_tchf.c
@@ -335,7 +335,11 @@
gsm0503_tch_fr144_encode(BUFPOS(bursts_p, 0), 
msgb_l2(msg));
/* Confirm data sending (pass ownership of the 
msgb/prim) */
l1sched_lchan_emit_data_cnf(lchan, msg, br->fn);
-   } /* else: all bits of this frame are set to zero */
+   } else {
+   ubit_t idle[290];
+   memset(&idle[0], 0x01, sizeof(idle));
+   gsm0503_tch_fr144_encode(BUFPOS(bursts_p, 0), &idle[0]);
+   }
if ((msg = msg_facch) != NULL) {
gsm0503_tch_fr_facch_encode(BUFPOS(bursts_p, 0), 
msgb_l2(msg));
/* Confirm FACCH sending (pass ownership of the 
msgb/prim) */
@@ -349,7 +353,11 @@
gsm0503_tch_fr96_encode(BUFPOS(bursts_p, 0), 
msgb_l2(msg));
/* Confirm data sending (pass ownership of the 
msgb/prim) */
l1sched_lchan_emit_data_cnf(lchan, msg, br->fn);
-   } /* else: all bits of this frame are set to zero */
+   } else {
+   ubit_t idle[4 * 60];
+   memset(&idle[0], 0x01, sizeof(idle));
+   gsm0503_tch_fr96_encode(BUFPOS(bursts_p, 0), &idle[0]);
+   }
if ((msg = msg_facch) != NULL) {
gsm0503_tch_fr_facch_encode(BUFPOS(bursts_p, 0), 
msgb_l2(msg));
/* Confirm FACCH sending (pass ownership of the 
msgb/prim) */
@@ -363,7 +371,11 @@
gsm0503_tch_fr48_encode(BUFPOS(bursts_p, 0), 
msgb_l2(msg));
/* Confirm data sending (pass ownership of the 
msgb/prim) */
l1sched_lchan_emit_data_cnf(lchan, msg, br->fn);
-   } /* else: all bits of this frame are set to zero */
+   } else {
+   ubit_t idle[2 * 60];
+   memset(&idle[0], 0x01, sizeof(idle));
+   gsm0503_tch_fr48_encode(BUFPOS(bursts_p, 0), &idle[0]);
+   }
if ((msg = msg_facch) != NULL) {
gsm0503_tch_fr_facch_encode(BUFPOS(bursts_p, 0), 
msgb_l2(msg));
/* Confirm FACCH sending (pass ownership of the 
msgb/prim) */
@@ -372,14 +384,16 @@
goto send_burst;
/* CSD (TCH/F2.4): 3.6 kbit/s radio interface rate */
case GSM48_CMODE_DATA_3k6:
-   if (msg == NULL)
-   goto send_burst;
-   if (msg == msg_facch) {
+   if (msg_facch != NULL) {
/* FACCH/F does steal a TCH/F2.4 frame completely */
rc = gsm0503_tch_fr_facch_encode(BUFPOS(bursts_p, 0), 
msgb_l2(msg));
-   } else {
+   } else if (msg_tch != NULL) {
OSMO_ASSERT(msgb_l2len(msg) == 2 * 36);
rc = gsm0503_tch_fr24_encode(BUFPOS(bursts_p, 0), 
msgb_l2(msg));
+   } else {
+   ubit_t idle[2 * 36];
+   memset(&idle[0], 0x01, sizeof(idle));
+   gsm0503_tch_fr24_encode(BUFPOS(bursts_p, 0), &idle[0]);
}
break;
default:
diff --git a/src/host/trxcon/src/sched_lchan_tchh.c 
b/src/host/trxcon/src/sched_lchan_tchh.c
index 0932cce..99e2680 100644
--- a/src/host/trxcon/src/sched_lchan_tchh.c
+++ b/src/host/trxcon/src/sched_lchan_tchh.c
@@ -542,7 +542,11 @@
gsm0503_tch_hr48_encode(BUFPOS(bursts_p

[M] Change in osmocom-bb[master]: trxcon/l1sched: tx_tch[fh]_fn(): fix sending idle CSD frames

2023-11-09 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34993?usp=email )

Change subject: trxcon/l1sched: tx_tch[fh]_fn(): fix sending idle CSD frames
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34993?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7dea3dde46bc02814e99c3e873298cc7ed045a51
Gerrit-Change-Number: 34993
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Thu, 09 Nov 2023 20:01:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in osmocom-bb[master]: trxcon/l1sched: tx_tch[fh]_fn(): fix sending idle CSD frames

2023-11-09 Thread fixeria
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmocom-bb/+/34993?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: trxcon/l1sched: tx_tch[fh]_fn(): fix sending idle CSD frames
..

trxcon/l1sched: tx_tch[fh]_fn(): fix sending idle CSD frames

In accordance with 3GPP TS 44.021, sections 8.1.6 and 10.2.3, the
transmission of idle frames to the DTE is mandated when no data is
received from the radio interface.  An idle frame has all data,
status, and E-bits to binary '1' (excluding the alignment pattern).

This requirement is currently implemented by osmo-bts for the Uplink,
and is going to be adopted for the Downlink (see the related patch).

This patch brings trxcon/l1sched in sync with osmo-bts-trx.

Change-Id: I7dea3dde46bc02814e99c3e873298cc7ed045a51
Related: osmo-bts.git I0b25cfac41b6d8dcf3bfd9d46d51a9665f1b047a
Related: OS#1572, OS#4396
---
M src/host/trxcon/src/sched_lchan_tchf.c
M src/host/trxcon/src/sched_lchan_tchh.c
2 files changed, 53 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/93/34993/3
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34993?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7dea3dde46bc02814e99c3e873298cc7ed045a51
Gerrit-Change-Number: 34993
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


[S] Change in osmo-trx[ewild/1.6.1]: devices: fix wrong gain to power mapping

2023-11-09 Thread fixeria
Attention is currently required from: Hoernchen.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email )

Change subject: devices: fix wrong gain to power mapping
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: ewild/1.6.1
Gerrit-Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
Gerrit-Change-Number: 34988
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: Hoernchen 
Gerrit-Comment-Date: Thu, 09 Nov 2023 20:07:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[ewild/1.6.1]: Bump version: 1.6.0 → 1.6.1

2023-11-09 Thread fixeria
Attention is currently required from: Hoernchen.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34989?usp=email )

Change subject: Bump version: 1.6.0 → 1.6.1
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34989?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: ewild/1.6.1
Gerrit-Change-Id: I345ba6569ae0765b3d33e4024d07fc5d925bdf80
Gerrit-Change-Number: 34989
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: Hoernchen 
Gerrit-Comment-Date: Thu, 09 Nov 2023 20:08:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-trx[ewild/1.6.1]: devices: fix wrong gain to power mapping

2023-11-09 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email )

Change subject: devices: fix wrong gain to power mapping
..

devices: fix wrong gain to power mapping

The dev type was set too early, but the actual dev is only being
discovered during open, so update it. This broke the gain to power
mapping by defaulting to a wrong device.

Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
---
M Transceiver52M/device/bladerf/bladerf.cpp
M Transceiver52M/device/common/bandmanager.h
M Transceiver52M/device/lms/LMSDevice.cpp
M Transceiver52M/device/uhd/UHDDevice.cpp
4 files changed, 22 insertions(+), 1 deletion(-)

Approvals:
  osmith: Looks good to me, approved
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve




diff --git a/Transceiver52M/device/bladerf/bladerf.cpp 
b/Transceiver52M/device/bladerf/bladerf.cpp
index 3e830b1..2f3c86a 100644
--- a/Transceiver52M/device/bladerf/bladerf.cpp
+++ b/Transceiver52M/device/bladerf/bladerf.cpp
@@ -279,6 +279,7 @@

dev_type = blade_dev_type::BLADE2;
tx_window = TX_WINDOW_FIXED;
+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));

struct bladerf_devinfo info;
bladerf_get_devinfo(dev, &info);
diff --git a/Transceiver52M/device/common/bandmanager.h 
b/Transceiver52M/device/common/bandmanager.h
index a198937..d07f21d 100644
--- a/Transceiver52M/device/common/bandmanager.h
+++ b/Transceiver52M/device/common/bandmanager.h
@@ -34,7 +34,7 @@
using powerkeyt = typename powermapt::key_type;
using powermappedt = typename powermapt::mapped_type;
using devkeyt = typename devmapt::key_type;
-   const devkeyt &m_dev_type;
+   devkeyt m_dev_type;
const powermapt &m_power_map;
const devmapt &m_dev_map;
powerkeyt m_fallback;
@@ -102,6 +102,10 @@
band_ass_curr_sess = false;
}

+   void update_band_dev(devkeyt dev_type) {
+   m_dev_type = dev_type;
+   }
+
void get_dev_band_desc(powermappedt &desc)
{
if (m_band == 0) {
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp 
b/Transceiver52M/device/lms/LMSDevice.cpp
index 451d2b9..7c220d2 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -245,6 +245,7 @@

m_dev_type = parse_dev_type(m_lms_dev);
dev_desc = dev_param_map.at(m_dev_type);
+   update_band_dev(m_dev_type);

if ((cfg->clock_ref != REF_EXTERNAL) && (cfg->clock_ref != 
REF_INTERNAL)) {
LOGC(DDEV, ERROR) << "Invalid reference type";
diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp 
b/Transceiver52M/device/uhd/UHDDevice.cpp
index ec772aa..85e9e38 100644
--- a/Transceiver52M/device/uhd/UHDDevice.cpp
+++ b/Transceiver52M/device/uhd/UHDDevice.cpp
@@ -530,6 +530,8 @@
if (!parse_dev_type())
return -1;

+   update_band_dev(dev_key(dev_type, tx_sps, rx_sps));
+
if ((dev_type == E3XX) && !uhd_e3xx_version_chk()) {
LOGC(DDEV, ALERT) << "E3XX requires UHD 003.009.000 or greater";
return -1;

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34988?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: ewild/1.6.1
Gerrit-Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
Gerrit-Change-Number: 34988
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-MessageType: merged


[S] Change in osmo-trx[ewild/1.6.1]: Bump version: 1.6.0 → 1.6.1

2023-11-09 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/34989?usp=email )

Change subject: Bump version: 1.6.0 → 1.6.1
..

Bump version: 1.6.0 → 1.6.1

Change-Id: I345ba6569ae0765b3d33e4024d07fc5d925bdf80
---
M debian/changelog
1 file changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  osmith: Looks good to me, approved




diff --git a/debian/changelog b/debian/changelog
index 90f554e..ac6e089 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+osmo-trx (1.6.1) unstable; urgency=medium
+
+  [ Eric Wild ]
+  * devices: fix wrong gain to power mapping
+
+ -- Eric Wild   Thu, 09 Nov 2023 14:16:21 +0200
+
 osmo-trx (1.6.0) unstable; urgency=medium

   [ Vadim Yanitskiy ]

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/34989?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: ewild/1.6.1
Gerrit-Change-Id: I345ba6569ae0765b3d33e4024d07fc5d925bdf80
Gerrit-Change-Number: 34989
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-MessageType: merged


[S] Change in libosmocore[master]: tests: update expected stderr for loggingrb test

2023-11-09 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34994?usp=email )


Change subject: tests: update expected stderr for loggingrb test
..

tests: update expected stderr for loggingrb test

Change-Id: I4fc4f3be428e040f5ac88dacfc865e7bae9b8b96
Fixes: 11a41682 "logging: ensure ANSI color escape is sent in same line/before 
newline"
Related: OS#6249
---
M tests/loggingrb/logging_test.err
1 file changed, 14 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/94/34994/1

diff --git a/tests/loggingrb/logging_test.err b/tests/loggingrb/logging_test.err
index e070561..b59d2e8 100644
--- a/tests/loggingrb/logging_test.err
+++ b/tests/loggingrb/logging_test.err
@@ -1,2 +1,3 @@
-You should see this
-You should see this
+You should see this
+You should see this
+
\ No newline at end of file

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34994?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4fc4f3be428e040f5ac88dacfc865e7bae9b8b96
Gerrit-Change-Number: 34994
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


[S] Change in libosmocore[master]: tests: update expected stderr for loggingrb test

2023-11-09 Thread fixeria
Attention is currently required from: laforge, manawyrm.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34994?usp=email )

Change subject: tests: update expected stderr for loggingrb test
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
Interestingly enough, this unit test fails for me with the current master. And 
this patch makes it pass locally. Somehow this patch makes it fail on Jenkins, 
and somehow the related change passed Jenkins build...



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34994?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4fc4f3be428e040f5ac88dacfc865e7bae9b8b96
Gerrit-Change-Number: 34994
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: manawyrm 
Gerrit-Attention: manawyrm 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 09 Nov 2023 20:44:49 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in libosmocore[master]: tests: update expected stderr for loggingrb test

2023-11-09 Thread fixeria
fixeria has abandoned this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34994?usp=email )

Change subject: tests: update expected stderr for loggingrb test
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34994?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4fc4f3be428e040f5ac88dacfc865e7bae9b8b96
Gerrit-Change-Number: 34994
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: manawyrm 
Gerrit-MessageType: abandon


[S] Change in libosmocore[master]: coding: gsm0503_tch_a[fh]s_encode(): make *codec const

2023-11-09 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34996?usp=email )


Change subject: coding: gsm0503_tch_a[fh]s_encode(): make *codec const
..

coding: gsm0503_tch_a[fh]s_encode(): make *codec const

Change-Id: I9e37a47c080cf57005e0205aa0d3cd25755a75f0
---
M include/osmocom/coding/gsm0503_coding.h
M src/coding/gsm0503_coding.c
2 files changed, 13 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/96/34996/1

diff --git a/include/osmocom/coding/gsm0503_coding.h 
b/include/osmocom/coding/gsm0503_coding.h
index 13d5344..3c51127 100644
--- a/include/osmocom/coding/gsm0503_coding.h
+++ b/include/osmocom/coding/gsm0503_coding.h
@@ -56,7 +56,7 @@
int *n_errors, int *n_bits_total);

 int gsm0503_tch_afs_encode(ubit_t *bursts, const uint8_t *tch_data, int len,
-   int codec_mode_req, uint8_t *codec, int codecs, uint8_t ft,
+   int codec_mode_req, const uint8_t *codec, int codecs, uint8_t ft,
uint8_t cmr);
 int gsm0503_tch_afs_decode(uint8_t *tch_data, const sbit_t *bursts,
int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft,
@@ -66,7 +66,7 @@
uint8_t *cmr, int *n_errors, int *n_bits_total, uint8_t *dtx);

 int gsm0503_tch_ahs_encode(ubit_t *bursts, const uint8_t *tch_data, int len,
-   int codec_mode_req, uint8_t *codec, int codecs, uint8_t ft, uint8_t 
cmr);
+   int codec_mode_req, const uint8_t *codec, int codecs, uint8_t ft, 
uint8_t cmr);
 int gsm0503_tch_ahs_decode(uint8_t *tch_data, const sbit_t *bursts, int odd,
int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft,
uint8_t *cmr, int *n_errors, int *n_bits_total);
diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c
index f8840c9..8effef5 100644
--- a/src/coding/gsm0503_coding.c
+++ b/src/coding/gsm0503_coding.c
@@ -2447,7 +2447,7 @@
  *  \param[in] cmr Codec Mode Request (used in codec_mode_req = 1 only)
  *  \returns 0 in case of success; negative on error */
 int gsm0503_tch_afs_encode(ubit_t *bursts, const uint8_t *tch_data, int len,
-   int codec_mode_req, uint8_t *codec, int codecs, uint8_t ft,
+   int codec_mode_req, const uint8_t *codec, int codecs, uint8_t ft,
uint8_t cmr)
 {
ubit_t iB[912], cB[456], h;
@@ -2935,7 +2935,7 @@
  *  \param[in] cmr Codec Mode Request (used in codec_mode_req = 1 only)
  *  \returns 0 in case of success; negative on error */
 int gsm0503_tch_ahs_encode(ubit_t *bursts, const uint8_t *tch_data, int len,
-   int codec_mode_req, uint8_t *codec, int codecs, uint8_t ft,
+   int codec_mode_req, const uint8_t *codec, int codecs, uint8_t ft,
uint8_t cmr)
 {
ubit_t iB[912], cB[456], h;

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34996?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I9e37a47c080cf57005e0205aa0d3cd25755a75f0
Gerrit-Change-Number: 34996
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


[S] Change in libosmocore[master]: coding: gsm0503_tch_a[fh]s_encode(): improve cmr/ft checks

2023-11-09 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34995?usp=email )


Change subject: coding: gsm0503_tch_a[fh]s_encode(): improve cmr/ft checks
..

coding: gsm0503_tch_a[fh]s_encode(): improve cmr/ft checks

Change-Id: If03d5b015ab1c8db56a4c67bdc8e36e260c06562
---
M src/coding/gsm0503_coding.c
1 file changed, 19 insertions(+), 26 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/95/34995/1

diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c
index 0e7f689..f8840c9 100644
--- a/src/coding/gsm0503_coding.c
+++ b/src/coding/gsm0503_coding.c
@@ -2465,19 +2465,11 @@

h = 0;

-   if (codec_mode_req) {
-   if (cmr >= codecs) {
-   /* FIXME: CMR ID is not in codec list! */
-   return -1;
-   }
-   id = cmr;
-   } else {
-   if (ft >= codecs) {
-   /* FIXME: FT ID is not in codec list! */
-   return -1;
-   }
-   id = ft;
-   }
+   id = codec_mode_req ? cmr : ft;
+   if (OSMO_UNLIKELY(id >= ARRAY_SIZE(gsm0503_afs_ic_ubit)))
+   return -1;
+   if (OSMO_UNLIKELY(ft >= codecs))
+   return -1;

switch (codec[ft]) {
case 7: /* TCH/AFS12.2 */
@@ -2970,19 +2962,11 @@

h = 0;

-   if (codec_mode_req) {
-   if (cmr >= codecs) {
-   /* FIXME: CMR ID %d not in codec list */
-   return -1;
-   }
-   id = cmr;
-   } else {
-   if (ft >= codecs) {
-   /* FIXME: FT ID %d not in codec list */
-   return -1;
-   }
-   id = ft;
-   }
+   id = codec_mode_req ? cmr : ft;
+   if (OSMO_UNLIKELY(id >= ARRAY_SIZE(gsm0503_ahs_ic_ubit)))
+   return -1;
+   if (OSMO_UNLIKELY(ft >= codecs))
+   return -1;

switch (codec[ft]) {
case 5: /* TCH/AHS7.95 */

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34995?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If03d5b015ab1c8db56a4c67bdc8e36e260c06562
Gerrit-Change-Number: 34995
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


[S] Change in osmo-ttcn3-hacks[master]: hnbgw: osmo-hnbgw.cfg: reduce X31 to 5s

2023-11-09 Thread neels
neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34980?usp=email )

Change subject: hnbgw: osmo-hnbgw.cfg: reduce X31 to 5s
..

hnbgw: osmo-hnbgw.cfg: reduce X31 to 5s

Set X31 to 5s as expected by the testsuite. The config files changed
here are not used by jenkins, but are used for manual testing by some
developers.

Previous patch ee4ce863 ("hnbgw: Introduce mp_hnbgw_timer_x31") already
sets the timer in one of the configs, move it to the end and add the
comment to make it consistent here and with the configs in
docker-playground.

Related: docker-playground I223d38e9ec2ca0f9f2ce2ac5311932789f328c9a
Change-Id: I1c275a1d10cfe0fe67d71e900881b0c4891af0be
---
M hnbgw/osmo-hnbgw-with-pfcp.cfg
M hnbgw/osmo-hnbgw.cfg
2 files changed, 25 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  neels: Looks good to me, approved




diff --git a/hnbgw/osmo-hnbgw-with-pfcp.cfg b/hnbgw/osmo-hnbgw-with-pfcp.cfg
index 550657b..6407e41 100644
--- a/hnbgw/osmo-hnbgw-with-pfcp.cfg
+++ b/hnbgw/osmo-hnbgw-with-pfcp.cfg
@@ -71,6 +71,9 @@
   local-addr 127.0.0.2
   local-port 8805
  timer pfcp x26 5
+ # reduce default X31 from 15 seconds
+ # https://gerrit.osmocom.org/c/osmo-hnbgw/+/34922
+ timer hnbgw X31 5

 msc 0
  remote-addr msc-naught
diff --git a/hnbgw/osmo-hnbgw.cfg b/hnbgw/osmo-hnbgw.cfg
index edd8c21..60f0aba 100644
--- a/hnbgw/osmo-hnbgw.cfg
+++ b/hnbgw/osmo-hnbgw.cfg
@@ -49,9 +49,11 @@
   local-ip 127.0.0.1
   local-port 29169
   hnbap-allow-tmsi 1
- timer hnbgw x31 5
  # don't spam RANAP RESET messages for up to eight CN links across all tests
  timer hnbgw T4 60
+ # reduce default X31 from 15 seconds
+ # https://gerrit.osmocom.org/c/osmo-hnbgw/+/34922
+ timer hnbgw X31 5

 msc 0
  remote-addr msc-naught

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34980?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1c275a1d10cfe0fe67d71e900881b0c4891af0be
Gerrit-Change-Number: 34980
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-MessageType: merged


[M] Change in osmo-gsm-manuals[master]: add static SS7 routing example to cs7-config.adoc

2023-11-09 Thread neels
Attention is currently required from: laforge, msuraev, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273?usp=email )

Change subject: add static SS7 routing example to cs7-config.adoc
..


Patch Set 6:

(1 comment)

File common/chapters/cs7-config.adoc:

https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273/comment/4aec179d_fe27185a
PS5, Line 375: For static routing, the M3UA port numbers must be fixed, i.e. 
there must be no `0` for a client's local port as in
 : `asp foo 2905 0 m3ua`. Instead, you may use `asp foo 2905 2905 
m3ua`.
> This is not true afaict. […]
what should we do, drop this paragraph?



--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I44afddf7004f5bf37eec706ca3da12c04f83f8fa
Gerrit-Change-Number: 32273
Gerrit-PatchSet: 6
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: msuraev 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: msuraev 
Gerrit-Comment-Date: Thu, 09 Nov 2023 23:53:21 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in osmo-gsm-manuals[master]: add static SS7 routing example to cs7-config.adoc

2023-11-09 Thread neels
Attention is currently required from: laforge, msuraev, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273?usp=email )

Change subject: add static SS7 routing example to cs7-config.adoc
..


Patch Set 6:

(1 comment)

File common/chapters/cs7-config.adoc:

https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273/comment/8eab00bb_c6a31f3b
PS5, Line 375: For static routing, the M3UA port numbers must be fixed, i.e. 
there must be no `0` for a client's local port as in
 : `asp foo 2905 0 m3ua`. Instead, you may use `asp foo 2905 2905 
m3ua`.
> what should we do, drop this paragraph?
well, I just tried again, to set one osmo-bsc with sctp-role client to local 
port 0, and the connection to the MSC is broken by it... could you confirm that 
0 works in a way that i'm not seeing? (the files I used for testing are linked 
in the commit log)



--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I44afddf7004f5bf37eec706ca3da12c04f83f8fa
Gerrit-Change-Number: 32273
Gerrit-PatchSet: 6
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: msuraev 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: msuraev 
Gerrit-Comment-Date: Fri, 10 Nov 2023 00:16:20 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-mgw[master]: replace two assertions with graceful error handling

2023-11-09 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/34997?usp=email )


Change subject: replace two assertions with graceful error handling
..

replace two assertions with graceful error handling

A user reports crashes of osmo-bsc upon EV_MDCX. It turns out that there
is a lot of error reporting and a distinct possibility to get a NULL
return value because of external input. Terminate the FSM instead.

FSM termination is the proper way to report a bad error, it signals the
parent_term_evt to the FSM parent, which will then be able to act on the
failed MGCP operation.

Related: SYS#6632
Change-Id: Ia5d8a9aff565399a85a5b116d7029fedcab234e0
---
M src/libosmo-mgcp-client/mgcp_client_fsm.c
1 file changed, 28 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/97/34997/1

diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c 
b/src/libosmo-mgcp-client/mgcp_client_fsm.c
index 660f0ad..432ad84 100644
--- a/src/libosmo-mgcp-client/mgcp_client_fsm.c
+++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c
@@ -364,13 +364,21 @@
switch (event) {
case EV_MDCX:
msg = make_mdcx_msg(mgcp_ctx);
-   OSMO_ASSERT(msg);
+   if (!msg) {
+   /* make_mdcx_msg() should already have logged the error 
*/
+   osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL);
+   return;
+   }
rc = mgcp_client_tx(mgcp, msg, mgw_mdcx_resp_cb, fi);
new_state = ST_MDCX_RESP;
break;
case EV_DLCX:
msg = make_dlcx_msg(mgcp_ctx);
-   OSMO_ASSERT(msg);
+   if (!msg) {
+   /* make_dlcx_msg() should already have logged the error 
*/
+   osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL);
+   return;
+   }
rc = mgcp_client_tx(mgcp, msg, mgw_dlcx_resp_cb, fi);
new_state = ST_DLCX_RESP;
break;

--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34997?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ia5d8a9aff565399a85a5b116d7029fedcab234e0
Gerrit-Change-Number: 34997
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


[S] Change in osmo-mgw[master]: client: replace two assertions with graceful error handling

2023-11-09 Thread neels
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-mgw/+/34997?usp=email

to look at the new patch set (#2).


Change subject: client: replace two assertions with graceful error handling
..

client: replace two assertions with graceful error handling

A user reports crashes of osmo-bsc upon EV_MDCX. It turns out that there
is a lot of error reporting and a distinct possibility to get a NULL
return value because of external input. Terminate the FSM instead.

FSM termination is the proper way to report a bad error, it signals the
parent_term_evt to the FSM parent, which will then be able to act on the
failed MGCP operation.

Related: SYS#6632
Change-Id: Ia5d8a9aff565399a85a5b116d7029fedcab234e0
---
M src/libosmo-mgcp-client/mgcp_client_fsm.c
1 file changed, 28 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/97/34997/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34997?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ia5d8a9aff565399a85a5b116d7029fedcab234e0
Gerrit-Change-Number: 34997
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


[S] Change in osmo-mgw[master]: client: replace two assertions with graceful error handling

2023-11-09 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/34997?usp=email )

Change subject: client: replace two assertions with graceful error handling
..


Patch Set 2: Code-Review-1

(1 comment)

Patchset:

PS2:
untested



--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34997?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ia5d8a9aff565399a85a5b116d7029fedcab234e0
Gerrit-Change-Number: 34997
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Comment-Date: Fri, 10 Nov 2023 01:03:13 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment