This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/24403 ) Change subject: transport: Add support for SW 6Cxx ...................................................................... transport: Add support for SW 6Cxx According to ETSI TS 102 221 Section 7.2.2.3.1 Table 7.1 the UICC may respond with SW 6Cxx to tell us to re-issue the command with a modified P3/Le. Change-Id: Ia7e6202bbd0f61034a985ecf76d0542d959922ce --- M pySim/transport/__init__.py 1 file changed, 10 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py index 5311d8f..dae2a78 100644 --- a/pySim/transport/__init__.py +++ b/pySim/transport/__init__.py @@ -109,11 +109,16 @@ # available. There are two SWs commonly used for this 9fxx (sim) and 61xx (usim), where # xx is the number of response bytes available. # See also: - # SW1=9F: 3GPP TS 51.011 9.4.1, Responses to commands which are correctly executed - # SW1=61: ISO/IEC 7816-4, Table 5 — General meaning of the interindustry values of SW1-SW2 - if (sw is not None) and ((sw[0:2] == '9f') or (sw[0:2] == '61')): - pdu_gr = pdu[0:2] + 'c00000' + sw[2:4] - data, sw = self.send_apdu_raw(pdu_gr) + if (sw is not None): + if ((sw[0:2] == '9f') or (sw[0:2] == '61')): + # SW1=9F: 3GPP TS 51.011 9.4.1, Responses to commands which are correctly executed + # SW1=61: ISO/IEC 7816-4, Table 5 — General meaning of the interindustry values of SW1-SW2 + pdu_gr = pdu[0:2] + 'c00000' + sw[2:4] + data, sw = self.send_apdu_raw(pdu_gr) + if sw[0:2] == '6c': + # SW1=6C: ETSI TS 102 221 Table 7.1: Procedure byte coding + pdu_gr = pdu[0:8] + sw[2:4] + data,sw = self.send_apdu_raw(pdu_gr) return data, sw -- To view, visit https://gerrit.osmocom.org/c/pysim/+/24403 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ia7e6202bbd0f61034a985ecf76d0542d959922ce Gerrit-Change-Number: 24403 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210525/d8fb176c/attachment.htm>