jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/33852 )
Change subject: ASCI: Fixed talker release event before MSC acknowledges
......................................................................
ASCI: Fixed talker release event before MSC acknowledges
If the talker establishes and releases the uplink before the MSC has
acknowledged or rejected the uplink access, the event and the cause is
queued. When the MSC acknowledges the uplink acces, the UPLINK RELEASE
INDICATION is sent with queued cause.
Change-Id: I753b78ba3b8b5e589746780328028443d80cf099
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/vgcs_fsm.c
2 files changed, 31 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/52/33852/1
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 43f08d5..7d36baa 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -429,6 +429,9 @@
struct gsm_subscriber_connection *talker;
/* L3 info of link establihment (Talker established) */
struct llist_head l3_queue;
+ /* Flag and cause (Talker released) */
+ bool talker_rel;
+ uint8_t talker_cause;
/* Flag that states acknowledgement of the talker by MSC */
bool msc_ack;
/* List of VGCS/VBS "resource controling" connections */
diff --git a/src/osmo-bsc/vgcs_fsm.c b/src/osmo-bsc/vgcs_fsm.c
index d999490..87461b2 100644
--- a/src/osmo-bsc/vgcs_fsm.c
+++ b/src/osmo-bsc/vgcs_fsm.c
@@ -192,6 +192,7 @@
while ((msg = msgb_dequeue(&conn->vgcs_call.l3_queue)))
msgb_free(msg);
conn->vgcs_call.msc_ack = false;
+ conn->vgcs_call.talker_rel = false;
/* Report busy uplink to the MSC. */
bsc_tx_uplink_req(conn);
/* Block all other channels. */
@@ -292,6 +293,13 @@
break;
case VGCS_EV_TALKER_REL:
LOG_CALL(conn, LOGL_DEBUG, "Talker released on uplink.\n");
+ if (!conn->vgcs_call.msc_ack) {
+ LOG_CALL(conn, LOGL_DEBUG, "Talker released before MSC acknowleded or rejected.\n");
+ conn->vgcs_call.talker_rel = true;
+ conn->vgcs_call.talker_cause = cause;
+ break;
+ }
+talker_released:
/* Talker released channel, call becomes idle. */
osmo_fsm_inst_state_chg(fi, VGCS_CALL_ST_IDLE, 0, 0);
conn->vgcs_call.talker = NULL;
@@ -338,6 +346,12 @@
bsc_dtap(conn, 0, msg);
msgb_free(msg);
}
+ /* If there is a pending talker release. */
+ if (conn->vgcs_call.talker_rel) {
+ LOG_CALL(conn, LOGL_DEBUG, "Sending queued talker release messages to MSC.\n");
+ cause = conn->vgcs_call.talker_cause;
+ goto talker_released;
+ }
break;
case VGCS_EV_MSC_REJECT:
LOG_CALL(conn, LOGL_DEBUG, "MSC rejects talker on uplink.\n");
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/33852
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I753b78ba3b8b5e589746780328028443d80cf099
Gerrit-Change-Number: 33852
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-MessageType: newchange
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/33837 )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: apdu/ts_102_221: extract channel number from dict before calling del_lchan
......................................................................
apdu/ts_102_221: extract channel number from dict before calling del_lchan
When the method del_lchan is called, closed_channel_nr still contains a dict
that contains the channel number under the key 'logical_channel_number'.
This will lead to an exception. We must extact the channel number from
the dict before we can use it with del_lchan. (See also
created_channel_nr)
Related: OS#6094
Change-Id: I399856bc227f17b66cdb4158a69a35d50ba222a7
---
M pySim/apdu/ts_102_221.py
1 file changed, 17 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim/apdu/ts_102_221.py b/pySim/apdu/ts_102_221.py
index 3780c8a..2d3ad82 100644
--- a/pySim/apdu/ts_102_221.py
+++ b/pySim/apdu/ts_102_221.py
@@ -396,7 +396,7 @@
self.col_id = '%02u' % created_channel_nr
return {'mode': mode, 'created_channel': created_channel_nr }
elif mode == 'close_channel':
- closed_channel_nr = self.cmd_dict['p2']
+ closed_channel_nr = self.cmd_dict['p2']['logical_channel_number']
rs.del_lchan(closed_channel_nr)
self.col_id = '%02u' % closed_channel_nr
return {'mode': mode, 'closed_channel': closed_channel_nr }
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/33837
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I399856bc227f17b66cdb4158a69a35d50ba222a7
Gerrit-Change-Number: 33837
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: fixeria, dexter.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/33831 )
Change subject: requirements: add pyshark to requirements lists
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> How would you describe it then? I could remove the dependency from setup.py and requirements. […]
I think I also explicitly didn't add a hard dependency as not everyone may be interetsed in pySim-trace.
In autotools this is where I would add a --enable-foo or --with-foo. I have no idea how to achieve that in python. We have the same topic for the smpp.pdu dependency which is not needed for core pySim. Any idea?
In terms of overall dependency reduction, I think by refactoring we can get rid of pytlv (we have much more powerful TLV code in pySim internally now). We should also be able to get rid of bidict. For pyyaml I don't even know why we depend on it... ah, the card_handler. Should also be possible to do in a simpler way without introducing that dependency.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/33831
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I885c7210aac3774a5f1f5201903ad2bff94c3120
Gerrit-Change-Number: 33831
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 20 Jul 2023 15:50:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/33849 )
Change subject: cards: fix swapped PIN mapping number
......................................................................
cards: fix swapped PIN mapping number
The constant for _adm_chv_num is swapped. It should be 0x0A, rather than
0xA0
Change-Id: I5680d2deee855ef316a98058e8c8ff8cf4edbbb2
---
M pySim/cards.py
1 file changed, 13 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim/cards.py b/pySim/cards.py
index c6a68fc..c87c488 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -101,7 +101,7 @@
self._scc.cla_byte = "00"
self._scc.sel_ctrl = "0004" # request an FCP
# See also: ETSI TS 102 221, Table 9.3
- self._adm_chv_num = 0xA0
+ self._adm_chv_num = 0x0A
def probe(self) -> bool:
# EF.DIR is a mandatory EF on all ICCIDs; however it *may* also exist on a TS 51.011 SIM
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/33849
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5680d2deee855ef316a98058e8c8ff8cf4edbbb2
Gerrit-Change-Number: 33849
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged