Attention is currently required from: neels.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/29048 )
Change subject: configure.ac: drop dependencies on vty and ctrl
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-pfcp/+/29048
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: Idea223e9b039241dd35c735922b8794573730fc3
Gerrit-Change-Number: 29048
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 12 Aug 2022 15:09:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Christian Amsüss.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/29066 )
Change subject: proactive: Avoid clobbering the output of the command that triggered the FETCH
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
I think this should apply to master? I don't think it uses anything from laforge/ota?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/29066
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: laforge/ota
Gerrit-Change-Id: I2b794a5c5bc808b9703b4bc679c119341a0ed41c
Gerrit-Change-Number: 29066
Gerrit-PatchSet: 1
Gerrit-Owner: Christian Amsüss <chrysn(a)fsfe.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: Christian Amsüss <chrysn(a)fsfe.org>
Gerrit-Comment-Date: Fri, 12 Aug 2022 15:02:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/29065 )
Change subject: port_number.adoc: Add default osmux port
......................................................................
port_number.adoc: Add default osmux port
This has been the port used historically in most existing deployments,
and it's the one already documented in the osmux section of user
manuals.
Change-Id: I9593e484a0df7cbfc3fa68f071246e3fb714bd4c
---
M common/chapters/port_numbers.adoc
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
dexter: Looks good to me, approved
diff --git a/common/chapters/port_numbers.adoc b/common/chapters/port_numbers.adoc
index c86551d..a3198f7 100644
--- a/common/chapters/port_numbers.adoc
+++ b/common/chapters/port_numbers.adoc
@@ -10,6 +10,7 @@
[options="header",cols="10%,10%,40%,40%"]
|===============
|L4 Protocol|Port Number|Purpose|Software
+|UDP|1984|Osmux|osmo-mgw, osmo-bts
|UDP|2427|MGCP GW|osmo-bsc_mgcp, osmo-mgw
|TCP|2775|SMPP (SMS interface for external programs)|osmo-nitb
|TCP|3002|A-bis/IP OML|osmo-bts, osmo-bsc, osmo-nitb
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/29065
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: I9593e484a0df7cbfc3fa68f071246e3fb714bd4c
Gerrit-Change-Number: 29065
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: laforge.
Christian Amsüss has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/29067 )
Change subject: proactive: Send a Terminal Response automatically after a Fetch
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
I don't have the permissions for an own branch ("remote: You need 'Create' rights to create new references." / "remote: User: chrysn"), so here are two things I'd suggest for the parts of laforge/ota that are not yet submitted for/master.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/29067
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: laforge/ota
Gerrit-Change-Id: I43bc994e7517b5907fb40a98d84797c54056c47d
Gerrit-Change-Number: 29067
Gerrit-PatchSet: 1
Gerrit-Owner: Christian Amsüss <chrysn(a)fsfe.org>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 12 Aug 2022 13:54:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Christian Amsüss has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/29067 )
Change subject: proactive: Send a Terminal Response automatically after a Fetch
......................................................................
proactive: Send a Terminal Response automatically after a Fetch
Change-Id: I43bc994e7517b5907fb40a98d84797c54056c47d
---
M pySim/transport/__init__.py
1 file changed, 43 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/67/29067/1
diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py
index fb04209..09752ac 100644
--- a/pySim/transport/__init__.py
+++ b/pySim/transport/__init__.py
@@ -10,7 +10,7 @@
from pySim.exceptions import *
from pySim.construct import filter_dict
from pySim.utils import sw_match, b2h, h2b, i2h, Hexstr
-from pySim.cat import ProactiveCommand
+from pySim.cat import ProactiveCommand, CommandDetails, DeviceIdentities, Result
#
# Copyright (C) 2009-2010 Sylvain Munaut <tnt(a)246tNt.com>
@@ -42,10 +42,7 @@
"""Abstract base class representing the interface of some code that handles
the proactive commands, as returned by the card in responses to the FETCH
command."""
- def receive_fetch_raw(self, payload: Hexstr):
- # parse the proactive command
- pcmd = ProactiveCommand()
- parsed = pcmd.from_tlv(h2b(payload))
+ def receive_fetch_raw(self, pcmd: ProactiveCommand, parsed: Hexstr):
# try to find a generic handler like handle_SendShortMessage
handle_name = 'handle_%s' % type(parsed).__name__
if hasattr(self, handle_name):
@@ -167,11 +164,50 @@
# need not concern the caller.
rv = (rv[0], '9000')
# proactive sim as per TS 102 221 Setion 7.4.2
+ # TODO: Check SW manually to avoid recursing on the stack (provided this piece of code stays in this place)
fetch_rv = self.send_apdu_checksw('80120000' + last_sw[2:], sw)
+ # Setting this in case we later decide not to send a terminal
+ # response immediately unconditionally -- the card may still have
+ # something pending even though the last command was not processed
+ # yet.
last_sw = fetch_rv[1]
- print("FETCH: %s" % fetch_rv[0])
+ # parse the proactive command
+ pcmd = ProactiveCommand()
+ parsed = pcmd.from_tlv(h2b(fetch_rv[0]))
+ print("FETCH: %s (%s)" % (fetch_rv[0], type(parsed).__name__))
+ result = Result()
if self.proactive_handler:
- self.proactive_handler.receive_fetch_raw(fetch_rv[0])
+ # Extension point: If this does return a list of TLV objects,
+ # they could be appended after the Result; if the first is a
+ # Result, that cuold replace the one built here.
+ self.proactive_handler.receive_fetch_raw(pcmd, parsed)
+ result.from_dict({'general_result': 'performed_successfully', 'additional_information': ''})
+ else:
+ result.from_dict({'general_result': 'command_beyond_terminal_capability', 'additional_information': ''})
+
+ # Send response immediately, thus also flushing out any further
+ # proactive commands that the card already wants to send
+ #
+ # Structure as per TS 102 223 V4.4.0 Section 6.8
+
+ # The Command Details are echoed from the command that has been processed.
+ (command_details,) = [c for c in pcmd.decoded.children if isinstance(c, CommandDetails)]
+ # The Device Identities are fixed. (TS 102 223 V4.0.0 Section 6.8.2)
+ device_identities = DeviceIdentities()
+ device_identities.from_dict({'source_dev_id': 'terminal', 'dest_dev_id': 'uicc'})
+
+ # Testing hint: The value of tail does not influence the behavior
+ # of an SJA2 that sent ans SMS, so this is implemented only
+ # following TS 102 223, and not fully tested.
+ tail = command_details.to_tlv() + device_identities.to_tlv() + result.to_tlv()
+ # Testing hint: In contrast to the above, this part is positively
+ # essential to get the SJA2 to provide the later parts of a
+ # multipart SMS in response to an OTA RFM command.
+ terminal_response = '80140000' + b2h(len(tail).to_bytes(1, 'big') + tail)
+
+ terminal_response_rv = self.send_apdu(terminal_response)
+ last_sw = terminal_response_rv[1]
+
if not sw_match(rv[1], sw):
raise SwMatchError(rv[1], sw.lower(), self.sw_interpreter)
return rv
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/29067
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: laforge/ota
Gerrit-Change-Id: I43bc994e7517b5907fb40a98d84797c54056c47d
Gerrit-Change-Number: 29067
Gerrit-PatchSet: 1
Gerrit-Owner: Christian Amsüss <chrysn(a)fsfe.org>
Gerrit-MessageType: newchange
Christian Amsüss has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/29066 )
Change subject: proactive: Avoid clobbering the output of the command that triggered the FETCH
......................................................................
proactive: Avoid clobbering the output of the command that triggered the FETCH
Change-Id: I2b794a5c5bc808b9703b4bc679c119341a0ed41c
---
M pySim/transport/__init__.py
1 file changed, 9 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/66/29066/1
diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py
index 04e6b22..fb04209 100644
--- a/pySim/transport/__init__.py
+++ b/pySim/transport/__init__.py
@@ -160,13 +160,18 @@
sw : string (in hex) of status word (ex. "9000")
"""
rv = self.send_apdu(pdu)
+ last_sw = rv[1]
- while sw == '9000' and sw_match(rv[1], '91xx'):
+ while sw == '9000' and sw_match(last_sw, '91xx'):
+ # It *was* successful after all -- the extra pieces FETCH handled
+ # need not concern the caller.
+ rv = (rv[0], '9000')
# proactive sim as per TS 102 221 Setion 7.4.2
- rv = self.send_apdu_checksw('80120000' + rv[1][2:], sw)
- print("FETCH: %s" % rv[0])
+ fetch_rv = self.send_apdu_checksw('80120000' + last_sw[2:], sw)
+ last_sw = fetch_rv[1]
+ print("FETCH: %s" % fetch_rv[0])
if self.proactive_handler:
- self.proactive_handler.receive_fetch_raw(rv[0])
+ self.proactive_handler.receive_fetch_raw(fetch_rv[0])
if not sw_match(rv[1], sw):
raise SwMatchError(rv[1], sw.lower(), self.sw_interpreter)
return rv
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/29066
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: laforge/ota
Gerrit-Change-Id: I2b794a5c5bc808b9703b4bc679c119341a0ed41c
Gerrit-Change-Number: 29066
Gerrit-PatchSet: 1
Gerrit-Owner: Christian Amsüss <chrysn(a)fsfe.org>
Gerrit-MessageType: newchange