Attention is currently required from: fixeria, laforge.
dexter has posted comments on this change by laforge. (
https://gerrit.osmocom.org/c/pysim/+/37925?usp=email )
Change subject: pySim.apdu_source.stdin_hex
......................................................................
Patch Set 1:
(2 comments)
Patchset:
PS1:
I have tried this out. and fed it some APDUs (the testcases from current
master, /tests/pySim-shell_test/apdu/test_apdu.script). Case 1-3 seem to work
fine but when I enter 00a40004023f0000 (case 4) it seems to have problems.
Leaving out the Le field also does not help.
Here is what I tried:
./pySim-trace.py stdin-hex
INFO root: Opening source stdin-hex...
Detected UICC Add-on "SIM"
Detected UICC Add-on "GSM-R"
Detected UICC Add-on "RUIM"
Can't read AIDs from SIM -- 'list' object has no attribute 'lower'
warning: EF.DIR seems to be empty!
ADF.ECASD: a0000005591010ffffffff8900000200
ADF.ISD-R: a0000005591010ffffffff8900000100
ISIM: a0000000871004
USIM: a0000000871002
INFO root: Entering main loop...
C-APDU >00a40004023f0000
C-APDU >
(nothing happens, so I just press enter...)
Traceback (most recent call last):
File "/home/user/work/git_master/pysim/./pySim-trace.py", line 220, in
<module>
tracer.main()
File "/home/user/work/git_master/pysim/./pySim-trace.py", line 117, in main
apdu = self.source.read()
^^^^^^^^^^^^^^^^^^
File "/home/user/work/git_master/pysim/pySim/apdu_source/__init__.py", line
23, in read
r = self.read_packet()
^^^^^^^^^^^^^^^^^^
File "/home/user/work/git_master/pysim/pySim/apdu_source/stdin_hex.py", line
40, in read_packet
return ApduCommands.parse_cmd_bytes(h2b(command) + h2b(response))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/work/git_master/pysim/pySim/apdu/__init__.py", line 405, in
parse_cmd_bytes
raise ValueError('Unknown CLA=%02X INS=%02X' % (cla, ins))
ValueError: Unknown CLA=90 INS=00
I also wonder what is with the responses? Those aren't intended to be
analyzed?. Maybe I am just using it wrong. As I said, some more info in the
commit message would be helpful.
Commit Message:
https://gerrit.osmocom.org/c/pysim/+/37925/comment/81eab98c_0a6648d1?usp=email :
PS1, Line 7: pySim.apdu_source.stdin_hex
I think it would be good to write a sentence or two what this is patch is about
and how it can be useful. I can see it is for pySim-trace, but I do not get the
usecase.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37925?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5aacf13b7c27cea9efd42f01dacca61068c3aa33
Gerrit-Change-Number: 37925
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Attention: laforge <[email protected]>
Gerrit-Attention: fixeria <[email protected]>
Gerrit-Comment-Date: Tue, 20 Jan 2026 10:25:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No