[S] Change in osmo-ttcn3-hacks[master]: ggsn: log start of test in SUT

2023-10-23 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34839?usp=email )

Change subject: ggsn: log start of test in SUT
..

ggsn: log start of test in SUT

Change-Id: I2baccc2b49e8bcbf0d1ca6dae41624b2d18fc0fa
---
M ggsn_tests/GGSN_Tests.ttcn
1 file changed, 11 insertions(+), 0 deletions(-)

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




diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn
index 6cc9732..5b1f7a1 100644
--- a/ggsn_tests/GGSN_Tests.ttcn
+++ b/ggsn_tests/GGSN_Tests.ttcn
@@ -292,6 +292,8 @@
f_init_vty();
f_vty_set_gpdu_txseq(use_gtpu_txseq);
f_vty_enable_echo_interval(g_use_echo_intval);
+   /* Emit a marker to appear in the SUT's own logging 
output */
+   f_logp(GGSNVTY, testcasename() & "() start");
} else if (m_ggsn_impl == GGSN_IMPL_OPEN5GS) {
f_init_diameter(testcasename());
}

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34839?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: I2baccc2b49e8bcbf0d1ca6dae41624b2d18fc0fa
Gerrit-Change-Number: 34839
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-MessageType: merged


[S] Change in libosmocore[master]: LAPDm: Correctly count expiry of T200 during estabishment/release

2023-10-23 Thread jolly
jolly has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34840?usp=email )

Change subject: LAPDm: Correctly count expiry of T200 during 
estabishment/release
..

LAPDm: Correctly count expiry of T200 during estabishment/release

After T200 expires N200+1 times, the link establishment or relase
fails. The counting must be performed prior check.

Related: OS#5970
Change-Id: Icf44e26420fc91312e7c8972a2f3ed475e42fc48
---
M src/isdn/lapd_core.c
1 file changed, 17 insertions(+), 4 deletions(-)

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




diff --git a/src/isdn/lapd_core.c b/src/isdn/lapd_core.c
index 6475cb0..5674c66 100644
--- a/src/isdn/lapd_core.c
+++ b/src/isdn/lapd_core.c
@@ -593,6 +593,8 @@
switch (dl->state) {
case LAPD_STATE_SABM_SENT:
/* 5.4.1.3 */
+   /* increment re-transmission counter */
+   dl->retrans_ctr++;
if (dl->retrans_ctr >= dl->n200_est_rel + 1) {
/* flush tx and send buffers */
lapd_dl_flush_tx(dl);
@@ -611,13 +613,13 @@
}
/* retransmit SABM command */
lapd_send_resend(dl);
-   /* increment re-transmission counter */
-   dl->retrans_ctr++;
/* restart T200 (PH-READY-TO-SEND) */
lapd_start_t200(dl);
break;
case LAPD_STATE_DISC_SENT:
/* 5.4.4.3 */
+   /* increment re-transmission counter */
+   dl->retrans_ctr++;
if (dl->retrans_ctr >= dl->n200_est_rel + 1) {
/* send MDL ERROR INIDCATION to L3 */
mdl_error(MDL_CAUSE_T200_EXPIRED, >lctx);
@@ -635,8 +637,6 @@
}
/* retransmit DISC command */
lapd_send_resend(dl);
-   /* increment re-transmission counter */
-   dl->retrans_ctr++;
/* restart T200 (PH-READY-TO-SEND) */
lapd_start_t200(dl);
break;

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34840?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: Icf44e26420fc91312e7c8972a2f3ed475e42fc48
Gerrit-Change-Number: 34840
Gerrit-PatchSet: 2
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[M] Change in pysim[master]: transport: move argument parser setup into concrete classes

2023-10-23 Thread dexter
dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34854?usp=email )


Change subject: transport: move argument parser setup into concrete classes
..

transport: move argument parser setup into concrete classes

The argument parser is set up globally for all LinkBase objects in
__init__.py. Since we tend to have only platform independed code in
__init__.py, we should move the argument parser setup into the
specific LinkBase classes.

Related: OS#6210
Change-Id: I22c32aa81ca0588e3314c3ff4546f6e5092c11df
---
M pySim/transport/__init__.py
M pySim/transport/calypso.py
M pySim/transport/modem_atcmd.py
M pySim/transport/pcsc.py
M pySim/transport/serial.py
5 files changed, 56 insertions(+), 20 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/54/34854/1

diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py
index 5f48657..6cccf8c 100644
--- a/pySim/transport/__init__.py
+++ b/pySim/transport/__init__.py
@@ -267,27 +267,17 @@
 return (rsp, sw)


-def argparse_add_reader_args(arg_parser):
+def argparse_add_reader_args(arg_parser: argparse.ArgumentParser):
 """Add all reader related arguments to the given argparse.Argumentparser 
instance."""
-serial_group = arg_parser.add_argument_group('Serial Reader')
-serial_group.add_argument('-d', '--device', metavar='DEV', 
default='/dev/ttyUSB0',
-  help='Serial Device for SIM access')
-serial_group.add_argument('-b', '--baud', dest='baudrate', type=int, 
metavar='BAUD', default=9600,
-  help='Baud rate used for SIM access')
+from pySim.transport.serial import SerialSimLink
+from pySim.transport.pcsc import PcscSimLink
+from pySim.transport.modem_atcmd import ModemATCommandLink
+from pySim.transport.calypso import CalypsoSimLink

-pcsc_group = arg_parser.add_argument_group('PC/SC Reader')
-pcsc_group.add_argument('-p', '--pcsc-device', type=int, dest='pcsc_dev', 
metavar='PCSC', default=None,
-help='PC/SC reader number to use for SIM access')
-
-modem_group = arg_parser.add_argument_group('AT Command Modem Reader')
-modem_group.add_argument('--modem-device', dest='modem_dev', 
metavar='DEV', default=None,
- help='Serial port of modem for Generic SIM Access 
(3GPP TS 27.007)')
-modem_group.add_argument('--modem-baud', type=int, metavar='BAUD', 
default=115200,
- help='Baud rate used for modem port')
-
-osmobb_group = arg_parser.add_argument_group('OsmocomBB Reader')
-osmobb_group.add_argument('--osmocon', dest='osmocon_sock', 
metavar='PATH', default=None,
-  help='Socket path for Calypso (e.g. Motorola 
C1XX) based reader (via OsmocomBB)')
+SerialSimLink.argparse_add_reader_args(arg_parser)
+PcscSimLink.argparse_add_reader_args(arg_parser)
+ModemATCommandLink.argparse_add_reader_args(arg_parser)
+CalypsoSimLink.argparse_add_reader_args(arg_parser)

 return arg_parser

diff --git a/pySim/transport/calypso.py b/pySim/transport/calypso.py
index 3fd9992..ea97b69 100644
--- a/pySim/transport/calypso.py
+++ b/pySim/transport/calypso.py
@@ -20,7 +20,7 @@
 import struct
 import socket
 import os
-
+import argparse
 from typing import Optional

 from pySim.transport import LinkBase
@@ -164,3 +164,9 @@

 def __str__(self) -> str:
 return "osmocon:%s" % (self._sock_path)
+
+@staticmethod
+def argparse_add_reader_args(arg_parser: argparse.ArgumentParser):
+osmobb_group = arg_parser.add_argument_group('OsmocomBB Reader')
+osmobb_group.add_argument('--osmocon', dest='osmocon_sock', 
metavar='PATH', default=None,
+  help='Socket path for Calypso (e.g. Motorola 
C1XX) based reader (via OsmocomBB)')
diff --git a/pySim/transport/modem_atcmd.py b/pySim/transport/modem_atcmd.py
index 1b741b0..fee09c8 100644
--- a/pySim/transport/modem_atcmd.py
+++ b/pySim/transport/modem_atcmd.py
@@ -20,6 +20,7 @@
 import serial
 import time
 import re
+import argparse
 from typing import Optional

 from pySim.utils import Hexstr, ResTuple
@@ -173,3 +174,11 @@

 def __str__(self) -> str:
 return "modem:%s" % self._device
+
+@staticmethod
+def argparse_add_reader_args(arg_parser: argparse.ArgumentParser):
+modem_group = arg_parser.add_argument_group('AT Command Modem Reader')
+modem_group.add_argument('--modem-device', dest='modem_dev', 
metavar='DEV', default=None,
+ help='Serial port of modem for Generic SIM 
Access (3GPP TS 27.007)')
+modem_group.add_argument('--modem-baud', type=int, metavar='BAUD', 
default=115200,
+ help='Baud rate used for modem port')
diff --git a/pySim/transport/pcsc.py b/pySim/transport/pcsc.py
index 3f3d06c..fbe7c0f 

[S] Change in pysim[master]: transport: move init message into concrete classes

2023-10-23 Thread dexter
dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34853?usp=email )


Change subject: transport: move init message into concrete classes
..

transport: move init message into concrete classes

In in the module __init__.py we print an init message (which type of
LinkBase class is providing the SimLink). However in __init__.py we tend
to have only platform independed code but the message string can already
be categorized as platform depened. Let's put the init message into the
constructor of the concrete classes of LinkBase.

Related: OS#6210
Change-Id: I0a6dd7deb79a5f3e42b29094a1cf2535075fa430
---
M pySim/transport/__init__.py
M pySim/transport/calypso.py
M pySim/transport/modem_atcmd.py
M pySim/transport/pcsc.py
M pySim/transport/serial.py
5 files changed, 21 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/53/34853/1

diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py
index 581f8e5..5f48657 100644
--- a/pySim/transport/__init__.py
+++ b/pySim/transport/__init__.py
@@ -297,20 +297,16 @@
 Init card reader driver
 """
 if opts.pcsc_dev is not None:
-print("Using PC/SC reader interface")
 from pySim.transport.pcsc import PcscSimLink
 sl = PcscSimLink(opts.pcsc_dev, **kwargs)
 elif opts.osmocon_sock is not None:
-print("Using Calypso-based (OsmocomBB) reader interface")
 from pySim.transport.calypso import CalypsoSimLink
 sl = CalypsoSimLink(sock_path=opts.osmocon_sock, **kwargs)
 elif opts.modem_dev is not None:
-print("Using modem for Generic SIM Access (3GPP TS 27.007)")
 from pySim.transport.modem_atcmd import ModemATCommandLink
 sl = ModemATCommandLink(
  device=opts.modem_dev, baudrate=opts.modem_baud, **kwargs)
 else:  # Serial reader is default
-print("Using serial reader interface")
 from pySim.transport.serial import SerialSimLink
 sl = SerialSimLink(device=opts.device,
baudrate=opts.baudrate, **kwargs)
diff --git a/pySim/transport/calypso.py b/pySim/transport/calypso.py
index d7d9649..3fd9992 100644
--- a/pySim/transport/calypso.py
+++ b/pySim/transport/calypso.py
@@ -79,6 +79,8 @@

 def __init__(self, sock_path: str = "/tmp/osmocom_l2", **kwargs):
 super().__init__(**kwargs)
+print("Using Calypso-based (OsmocomBB) reader interface")
+
 # Make sure that a given socket path exists
 if not os.path.exists(sock_path):
 raise ReaderError(
diff --git a/pySim/transport/modem_atcmd.py b/pySim/transport/modem_atcmd.py
index 5e5a3dd..1b741b0 100644
--- a/pySim/transport/modem_atcmd.py
+++ b/pySim/transport/modem_atcmd.py
@@ -35,6 +35,7 @@

 def __init__(self, device: str = '/dev/ttyUSB0', baudrate: int = 115200, 
**kwargs):
 super().__init__(**kwargs)
+print("Using modem for Generic SIM Access (3GPP TS 27.007)")
 self._sl = serial.Serial(device, baudrate, timeout=5)
 self._echo = False # this will be auto-detected by 
_check_echo()
 self._device = device
diff --git a/pySim/transport/pcsc.py b/pySim/transport/pcsc.py
index c7b5878..3f3d06c 100644
--- a/pySim/transport/pcsc.py
+++ b/pySim/transport/pcsc.py
@@ -34,6 +34,7 @@

 def __init__(self, reader_number: int = 0, **kwargs):
 super().__init__(**kwargs)
+print("Using PC/SC reader interface")
 r = readers()
 if reader_number >= len(r):
 raise ReaderError('No reader found for number %d' % reader_number)
diff --git a/pySim/transport/serial.py b/pySim/transport/serial.py
index e5f7bdb..269ec9c 100644
--- a/pySim/transport/serial.py
+++ b/pySim/transport/serial.py
@@ -32,6 +32,7 @@
 def __init__(self, device: str = '/dev/ttyUSB0', baudrate: int = 9600, 
rst: str = '-rts',
  debug: bool = False, **kwargs):
 super().__init__(**kwargs)
+print("Using serial reader interface")
 if not os.path.exists(device):
 raise ValueError("device file %s does not exist -- abort" % device)
 self._sl = serial.Serial(

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34853?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: I0a6dd7deb79a5f3e42b29094a1cf2535075fa430
Gerrit-Change-Number: 34853
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-MessageType: newchange


[L] Change in osmocom-bb[master]: mobile: add support for Circuit Switched Data calls

2023-10-23 Thread jolly
Attention is currently required from: fixeria, pespin.

jolly has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34762?usp=email )

Change subject: mobile: add support for Circuit Switched Data calls
..


Patch Set 4:

(1 comment)

File src/host/layer23/src/mobile/vty_interface.c:

https://gerrit.osmocom.org/c/osmocom-bb/+/34762/comment/36d2fa71_3a575cbb
PS4, Line 634: trans-cap (udi|3100khz-audio|facsimile)
The transfer capability must be defined (generated) while doing the outgoing 
call (speech/fax/data), not at VTY. The only thing that needs to be defined 
here is how data calls have to be made: udi (ISDN) or audio (modem).



--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34762?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: I1995fa0a7a68d9b980852b664d472d4633777ac6
Gerrit-Change-Number: 34762
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly 
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Mon, 23 Oct 2023 08:54:20 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in pysim[master]: prevent SimCardCommands.select_adf_by_aid bypassing lchan

2023-10-23 Thread fixeria
Attention is currently required from: laforge.

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

Change subject: prevent SimCardCommands.select_adf_by_aid bypassing lchan
..


Patch Set 1: Code-Review+1

(1 comment)

File pySim/cards.py:

https://gerrit.osmocom.org/c/pysim/+/34849/comment/bdd219c9_533d75ab
PS1, Line 149: SimCardCommands
`Optional[SimCardCommands]` as it can be `None`



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34849?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: Idf05c297e6a2e24ca539408b8912e348c0782bb4
Gerrit-Change-Number: 34849
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Mon, 23 Oct 2023 06:57:06 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in pysim[master]: pySim-shell: Include current logical channel in prompt

2023-10-23 Thread fixeria
Attention is currently required from: laforge.

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

Change subject: pySim-shell: Include current logical channel in prompt
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34850?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: I45781a6fba205eeb4ac7f58d5cb642b7131bdd88
Gerrit-Change-Number: 34850
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Mon, 23 Oct 2023 06:53:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in pysim[master]: pySim-shell: Add 'switch_channel' command

2023-10-23 Thread fixeria
Attention is currently required from: laforge.

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

Change subject: pySim-shell: Add 'switch_channel' command
..


Patch Set 3: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34848?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: Ia76eb45c4925882ae6866e50b64d9610bd4d546d
Gerrit-Change-Number: 34848
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Mon, 23 Oct 2023 06:53:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in pysim[master]: utils: Fix bertlv_encode_tag() for multi-byte tags

2023-10-23 Thread fixeria
Attention is currently required from: laforge.

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

Change subject: utils: Fix bertlv_encode_tag() for multi-byte tags
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34851?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: If0bd9137883c4c8b01c4dfcbb53cabeee5c1ce2b
Gerrit-Change-Number: 34851
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Mon, 23 Oct 2023 06:52:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


<    1   2