[M] Change in pysim[master]: filesystem: pass total_len to construct of when encoding file contents
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38195?usp=email ) Change subject: filesystem: pass total_len to construct of when encoding file contents .. Patch Set 3: (1 comment) File pySim/filesystem.py: https://gerrit.osmocom.org/c/pysim/+/38195/comment/63d2106f_d68471e6?usp=email : PS2, Line 1338:def _decode_bin(self, raw_bin_data: bytearray): : chunks = [raw_bin_data[i:i+self.rec_len] : for i in range(0, len(raw_bin_data), self.rec_len)] : return [self.decode_record_bin(x) for x in chunks] : : def _encode_bin(self, abstract_data) -> bytes: : chunks = [self.encode_record_bin(x) for x in abstract_data] : # FIXME: pad to file size : return b''.join(chunks) > you are not passing the total_len as argument to the > self.{encode,decode}_record_bin here. […] Thanks for the explaination, I think I got my head around this now. I have now revisited the code and have added a total_len parameter to the _encode_bin and _encode_hex methods. I also thing that we should also have total_len parameters on the _encode_record_hex and _encode_record_bin methods, in case someone needs the total_len parameter in one of those custom methods. All derived classes with custom encoder methods should now accept a total_len parameters. I have put a kwargs on each method that does not use the total_len parameter. I have seen that _encode_record_bin/hex have kwargs as well, so I think that makes sense. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38195?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: I1b7a51594fbc5d9fe01132c39354a2fa88d53f9b Gerrit-Change-Number: 38195 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Mon, 23 Sep 2024 16:16:40 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge
[M] Change in pysim[master]: filesystem: pass total_len to construct of when encoding file contents
Attention is currently required from: laforge. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38195?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: filesystem: pass total_len to construct of when encoding file contents .. filesystem: pass total_len to construct of when encoding file contents In our construct models we frequently use a context parameter "total_len", we also pass this parameter to construct when we decode files, but we do not pass it when we generate files. This is a problem, because when total_len is used in the construct model, this parameter must be known also when decoding the file. Let's make sure that the total_len is properly determined and and passed to construct (via pyosmocom) Related: OS#5714 Change-Id: I1b7a51594fbc5d9fe01132c39354a2fa88d53f9b --- M pySim/filesystem.py M pySim/gsm_r.py M pySim/runtime.py M pySim/sysmocom_sja2.py M pySim/ts_31_102.py M pySim/ts_31_102_telecom.py M pySim/ts_51_011.py 7 files changed, 94 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/95/38195/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38195?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1b7a51594fbc5d9fe01132c39354a2fa88d53f9b Gerrit-Change-Number: 38195 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge
[M] Change in pysim[master]: pySim-shell_test: disable test_list_and_rm_notif
Attention is currently required from: laforge, osmith. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38271?usp=email ) Change subject: pySim-shell_test: disable test_list_and_rm_notif .. Patch Set 1: (1 comment) Patchset: PS1: This seems to be a problem with the eUICC itself. There is not much that it reports, other than error code "undefinedError". I suggest that we temporarily disable that specific testcase until we have investigated what went wrong. I will try to to reproduce the problem with another eUICC of the same type/lot locally. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38271?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: I7d0b6a998499d84f0eb4e24592ad43210ac54806 Gerrit-Change-Number: 38271 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Attention: osmith Gerrit-Attention: laforge Gerrit-Comment-Date: Mon, 23 Sep 2024 12:06:49 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No
[M] Change in pysim[master]: pySim-shell_test: disable test_list_and_rm_notif
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38271?usp=email ) Change subject: pySim-shell_test: disable test_list_and_rm_notif .. pySim-shell_test: disable test_list_and_rm_notif The testcase euicc.test_list_and_rm_notif fails due to a problem with the eUICC. The eUICC reports the following error when a delete notification attempt is made: "delete_notification_status": "undefinedError" Let's temporarily disable this testcase until the problem is resolved. Change-Id: I7d0b6a998499d84f0eb4e24592ad43210ac54806 --- M tests/pySim-shell_test/euicc/test.py 1 file changed, 28 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/71/38271/1 diff --git a/tests/pySim-shell_test/euicc/test.py b/tests/pySim-shell_test/euicc/test.py index b634f22..f7226a3 100644 --- a/tests/pySim-shell_test/euicc/test.py +++ b/tests/pySim-shell_test/euicc/test.py @@ -62,34 +62,34 @@ self.runPySimShell(cardname, "test_set_nickname.script") self.assertEqualFiles("set_nickname.tmp") -def test_list_and_rm_notif(self): -cardname = 'sysmoEUICC1-C2T' - -# Generate two (additional) notification -self.runPySimShell(cardname, "test_gen_notif.script") - -# List notifications into a file -self.runPySimShell(cardname, "test_list_notif.script") - -# Parse notifications file (JSON) -notifications_tmp = open("notifications.tmp") -notifications = json.load(notifications_tmp) -notifications_tmp.close() - -# Delete notifications one by one, we expect to see at least one notification -notification_metadata_list = notifications['notification_metadata_list'] -removed = 0 -for nm in notification_metadata_list: -seq_number = nm['notification_metadata']['seq_number'] -print("removing notification with seq_number %s:" % seq_number) -self.equipTemplate("test_rm_notif.script", SEQ_NUMBER = seq_number) -self.runPySimShell(cardname, "test_rm_notif.script") -removed = removed + 1 -self.assertTrue(removed >= 2, "we expected to remove at least two notifications, but we have removed none!") - -# List notifications again, require none to be present -self.runPySimShell(cardname, "test_list_notif.script") -self.assertEqualFiles("notifications.tmp") +#def test_list_and_rm_notif(self): +#cardname = 'sysmoEUICC1-C2T' +# +## Generate two (additional) notification +#self.runPySimShell(cardname, "test_gen_notif.script") +# +## List notifications into a file +#self.runPySimShell(cardname, "test_list_notif.script") +# +## Parse notifications file (JSON) +#notifications_tmp = open("notifications.tmp") +#notifications = json.load(notifications_tmp) +#notifications_tmp.close() +# +## Delete notifications one by one, we expect to see at least one notification +#notification_metadata_list = notifications['notification_metadata_list'] +#removed = 0 +#for nm in notification_metadata_list: +#seq_number = nm['notification_metadata']['seq_number'] +#print("removing notification with seq_number %s:" % seq_number) +#self.equipTemplate("test_rm_notif.script", SEQ_NUMBER = seq_number) +#self.runPySimShell(cardname, "test_rm_notif.script") +#removed = removed + 1 +#self.assertTrue(removed >= 2, "we expected to remove at least two notifications, but we have removed none!") +# +## List notifications again, require none to be present +#self.runPySimShell(cardname, "test_list_notif.script") +#self.assertEqualFiles("notifications.tmp") if __name__ == "__main__": unittest.main() -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38271?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I7d0b6a998499d84f0eb4e24592ad43210ac54806 Gerrit-Change-Number: 38271 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[XL] Change in pysim[master]: tests: sanitize all cards before running tests
Attention is currently required from: fixeria, laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38254?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: tests: sanitize all cards before running tests .. tests: sanitize all cards before running tests Even though our tests are written in a way that they shouldn't interfere with each other, it may happen that one testrun writes content to a file that upsets a different testrun. The resulting problems are often difficult to diagnose. To minimize the problem, let's reset the cards to a defined state before running the actual tests. This can be done using pySim-shell's export feature. We can generate a backup from a known good state and then play back the backup to reset files that have been changed. Files that didn't change will not be written thanks to the conserve_write feature of pySim-shell. Related: OS#4384 Change-Id: I42eaf61280968518164f2280245136fd30a603ce --- M contrib/jenkins.sh A tests/card_sanitizer/card_backup_3b991800118822334455667760_334455667788990.script A tests/card_sanitizer/card_backup_3b9a940092027593110001020221_1122334455667788990.script A tests/card_sanitizer/card_backup_3b9f95801fc78031e073f62113674d4516004301008f_89445310150011013678.script A tests/card_sanitizer/card_backup_3b9f96801f878031e073fe211b674a357530350265f8_894944001155314.script A tests/card_sanitizer/card_backup_3b9f96801f878031e073fe211b674a4c753034054ba9_898821100467343.script A tests/card_sanitizer/card_backup_3b9f96801fc78031a073be2113674320071801a5_898821132030028.script A tests/card_sanitizer/card_backup_3b9f96801fc78031a073be2113674422061001a9_898821900117833.script A tests/card_sanitizer/card_data.csv A tests/card_sanitizer/card_sanitizer.py 10 files changed, 18,135 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/54/38254/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38254?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I42eaf61280968518164f2280245136fd30a603ce Gerrit-Change-Number: 38254 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Attention: laforge Gerrit-Attention: fixeria
[S] Change in pysim[master]: pySim-shell: New '-e' command line argument
Attention is currently required from: laforge. dexter has uploaded a new patch set (#2) to the change originally created by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38255?usp=email ) The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: pySim-shell: New '-e' command line argument .. pySim-shell: New '-e' command line argument Using '-e' it is possible to specify *multiple* pySim-shell commands which shall be executed at startup. This extends the current ability to execute just a single command. Example: ./pySim-shell.py -p0 -e 'select ADF.USIM/EF.IMSI' -e 'read_binary_decoded' Change-Id: I74004f46105553f077c039ca0f86f75afccc7342 --- M pySim-shell.py 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/55/38255/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38255?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I74004f46105553f077c039ca0f86f75afccc7342 Gerrit-Change-Number: 38255 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: dexter Gerrit-Attention: laforge
[XL] Change in pysim[master]: tests: sanitize all cards before running tests
Attention is currently required from: fixeria, laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38254?usp=email ) Change subject: tests: sanitize all cards before running tests .. Patch Set 2: (3 comments) Patchset: PS1: > Do we have some information how much time the restore of all cards takes? I now did a test run with a stopwatch to measure this. It takes 7:31 for all 7 cards. I wonder if there is any logic that would allow us to run the sanitizer only on the first patch (the one closest to master) of a patch set. File tests/card_sanitizer/card_sanitizer.py: https://gerrit.osmocom.org/c/pysim/+/38254/comment/b82378c6_30570f01?usp=email : PS1, Line 33: from smartcard.CardType import ATRCardType : from smartcard.CardRequest import CardRequest : fr > unused imports Done File tests/card_sanitizer/restore.script: https://gerrit.osmocom.org/c/pysim/+/38254/comment/418e4c78_e9bbb182?usp=email : PS1, Line 3: ru > I don't like this approach with a global file in /var/tmp. […] That was a good idea, it simplifies things a lot. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38254?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: I42eaf61280968518164f2280245136fd30a603ce Gerrit-Change-Number: 38254 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-Comment-Date: Mon, 23 Sep 2024 11:03:05 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Comment-In-Reply-To: fixeria
[S] Change in pysim[master]: pySim-shell: New '-e' command line argument
Attention is currently required from: laforge. dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38255?usp=email ) Change subject: pySim-shell: New '-e' command line argument .. Patch Set 2: (1 comment) File pySim-shell.py: https://gerrit.osmocom.org/c/pysim/+/38255/comment/e8e42ac1_a6439155?usp=email : PS1, Line 1128: for c in opts.execute_command: > I think when -e is not used opts.execute_command is none, then the for > refuses to iterate. Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38255?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: I74004f46105553f077c039ca0f86f75afccc7342 Gerrit-Change-Number: 38255 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: dexter Gerrit-Attention: laforge Gerrit-Comment-Date: Mon, 23 Sep 2024 11:03:05 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: dexter
[XS] Change in pysim[master]: pySim-shell: New '-e' command line argument
Attention is currently required from: laforge. dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38255?usp=email ) Change subject: pySim-shell: New '-e' command line argument .. Patch Set 1: (1 comment) File pySim-shell.py: https://gerrit.osmocom.org/c/pysim/+/38255/comment/80b8492b_253b1912?usp=email : PS1, Line 1128: for c in opts.execute_command: > I gave it a quick try, for some reason I get: […] I think when -e is not used opts.execute_command is none, then the for refuses to iterate. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38255?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: I74004f46105553f077c039ca0f86f75afccc7342 Gerrit-Change-Number: 38255 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: dexter Gerrit-Attention: laforge Gerrit-Comment-Date: Mon, 23 Sep 2024 10:07:41 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: dexter
[XS] Change in pysim[master]: pySim-shell: New '-e' command line argument
Attention is currently required from: laforge. dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38255?usp=email ) Change subject: pySim-shell: New '-e' command line argument .. Patch Set 1: (2 comments) Patchset: PS1: I think this is very useful. File pySim-shell.py: https://gerrit.osmocom.org/c/pysim/+/38255/comment/d9acbe67_cd57baba?usp=email : PS1, Line 1128: for c in opts.execute_command: I gave it a quick try, for some reason I get: TypeError: 'NoneType' object is not iterable when there is no -e option used. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38255?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: I74004f46105553f077c039ca0f86f75afccc7342 Gerrit-Change-Number: 38255 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: dexter Gerrit-Attention: laforge Gerrit-Comment-Date: Mon, 23 Sep 2024 10:05:34 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No
[XL] Change in pysim[master]: tests: sanitize all cards before running tests
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38254?usp=email ) Change subject: tests: sanitize all cards before running tests .. tests: sanitize all cards before running tests Even though our tests are written in a way that they shouldn't interfere with each other, it may happen that one testrun writes content to a file that upsets a different testrun. The resulting problems are often difficult to diagnose. To minimize the problem, let's reset the cards to a defined state before running the actual tests. This can be done using pySim-shell's export feature. We can generate a backup from a known good state and then play back the backup to reset files that have been changed. Files that didn't change will not be written thanks to the conserve_write feature of pySim-shell. Related: OS#4384 Change-Id: I42eaf61280968518164f2280245136fd30a603ce --- M contrib/jenkins.sh A tests/card_sanitizer/backup.script A tests/card_sanitizer/card_backup_3b991800118822334455667760_334455667788990.script A tests/card_sanitizer/card_backup_3b9a940092027593110001020221_1122334455667788990.script A tests/card_sanitizer/card_backup_3b9f95801fc78031e073f62113674d4516004301008f_89445310150011013678.script A tests/card_sanitizer/card_backup_3b9f96801f878031e073fe211b674a357530350265f8_894944001155314.script A tests/card_sanitizer/card_backup_3b9f96801f878031e073fe211b674a4c753034054ba9_898821100467343.script A tests/card_sanitizer/card_backup_3b9f96801fc78031a073be2113674320071801a5_898821132030028.script A tests/card_sanitizer/card_backup_3b9f96801fc78031a073be2113674422061001a9_898821900117833.script A tests/card_sanitizer/card_data.csv A tests/card_sanitizer/card_sanitizer.py A tests/card_sanitizer/restore.script 12 files changed, 18,152 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/54/38254/1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38254?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I42eaf61280968518164f2280245136fd30a603ce Gerrit-Change-Number: 38254 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[XL] Change in pysim[master]: Add testsuite for pySim-shell with real cards
Attention is currently required from: dexter, fixeria, laforge. Hello Jenkins Builder, fixeria, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/37819?usp=email to look at the new patch set (#23). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: Add testsuite for pySim-shell with real cards .. Add testsuite for pySim-shell with real cards This patch adds a comprehensive testsuite for pySim-shell. The testsuite is based on python's unittest framework in combination with pySim-shell scripts. Related: OS#6531 Change-Id: Ieae1330767a6e55e62437f5f988a0d33b727b5de --- M contrib/jenkins.sh A tests/pySim-shell_test/README.txt A tests/pySim-shell_test/__init__.py A tests/pySim-shell_test/ara_m/__init__.py A tests/pySim-shell_test/ara_m/adf_ara-m.cfg.ok A tests/pySim-shell_test/ara_m/adf_ara-m.script.ok A tests/pySim-shell_test/ara_m/adf_ara-m_empty.cfg.ok A tests/pySim-shell_test/ara_m/test.py A tests/pySim-shell_test/ara_m/test.script A tests/pySim-shell_test/authenticate/__init__.py A tests/pySim-shell_test/authenticate/auth_result.ok A tests/pySim-shell_test/authenticate/test.py A tests/pySim-shell_test/authenticate/test.script A tests/pySim-shell_test/card_data.csv A tests/pySim-shell_test/cardinfo/__init__.py A tests/pySim-shell_test/cardinfo/sysmoEUICC1-C2T-cardinfo.ok A tests/pySim-shell_test/cardinfo/sysmoISIM-SJA2-cardinfo.ok A tests/pySim-shell_test/cardinfo/sysmoISIM-SJA5-S17-cardinfo.ok A tests/pySim-shell_test/cardinfo/sysmoSIM-GR1-cardinfo.ok A tests/pySim-shell_test/cardinfo/test.py A tests/pySim-shell_test/cardinfo/test.template A tests/pySim-shell_test/chv/__init__.py A tests/pySim-shell_test/chv/test.py A tests/pySim-shell_test/chv/test_manage_csv.ok A tests/pySim-shell_test/chv/test_manage_csv.template A tests/pySim-shell_test/chv/test_manage_direct.ok A tests/pySim-shell_test/chv/test_manage_direct.template A tests/pySim-shell_test/chv/test_unblock_csv.ok A tests/pySim-shell_test/chv/test_unblock_csv.script A tests/pySim-shell_test/chv/test_unblock_direct.ok A tests/pySim-shell_test/chv/test_unblock_direct.template A tests/pySim-shell_test/config.yaml A tests/pySim-shell_test/euicc/__init__.py A tests/pySim-shell_test/euicc/enable_disable_profile.ok A tests/pySim-shell_test/euicc/euicc_info1.ok A tests/pySim-shell_test/euicc/euicc_info2.ok A tests/pySim-shell_test/euicc/get_eid.ok A tests/pySim-shell_test/euicc/get_profiles_info.ok A tests/pySim-shell_test/euicc/notifications.ok A tests/pySim-shell_test/euicc/set_nickname.ok A tests/pySim-shell_test/euicc/test.py A tests/pySim-shell_test/euicc/test_enable_disable_profile.script A tests/pySim-shell_test/euicc/test_gen_notif.script A tests/pySim-shell_test/euicc/test_get_eid.script A tests/pySim-shell_test/euicc/test_get_euicc_info.script A tests/pySim-shell_test/euicc/test_get_profiles_info.script A tests/pySim-shell_test/euicc/test_list_notif.script A tests/pySim-shell_test/euicc/test_rm_notif.template A tests/pySim-shell_test/euicc/test_set_nickname.script A tests/pySim-shell_test/export/__init__.py A tests/pySim-shell_test/export/export.script.ok A tests/pySim-shell_test/export/test.py A tests/pySim-shell_test/export/test_export.script A tests/pySim-shell_test/export/test_import.script A tests/pySim-shell_test/file_admin/__init__.py A tests/pySim-shell_test/file_admin/activate_deactivate_file.ok A tests/pySim-shell_test/file_admin/test.py A tests/pySim-shell_test/file_admin/test_activate_deactivate_file.script A tests/pySim-shell_test/file_admin/test_create_delete_df.script A tests/pySim-shell_test/file_admin/test_create_resize_delete_linear_fixed_ef.script A tests/pySim-shell_test/file_admin/test_create_resize_delete_transparent_ef.script A tests/pySim-shell_test/file_content/__init__.py A tests/pySim-shell_test/file_content/test.py A tests/pySim-shell_test/file_content/test_ber_tlv_uicc.ok A tests/pySim-shell_test/file_content/test_ber_tlv_uicc.script A tests/pySim-shell_test/file_content/test_binary_sim.ok A tests/pySim-shell_test/file_content/test_binary_sim.script A tests/pySim-shell_test/file_content/test_binary_uicc.ok A tests/pySim-shell_test/file_content/test_binary_uicc.script A tests/pySim-shell_test/file_content/test_record_sim.ok A tests/pySim-shell_test/file_content/test_record_sim.script A tests/pySim-shell_test/file_content/test_record_uicc.ok A tests/pySim-shell_test/file_content/test_record_uicc.script A tests/pySim-shell_test/file_specific/__init__.py A tests/pySim-shell_test/file_specific/ef_imsi.ok A tests/pySim-shell_test/file_specific/test.py A tests/pySim-shell_test/file_specific/test_ef_ist.ok A tests/pySim-shell_test/file_specific/test_ef_ist.script A tests/pySim-shell_test/file_specific/test_ef_ust.ok A tests/pySim-shell_test/file_specific/test_ef_ust.script A tests/pySim-shell_test/file_specific/test_update_imsi_plmn.scri
[M] Change in pysim[master]: pySim-prog_test: add test vectors for sysmoISIM-SJA5
Attention is currently required from: dexter. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38232?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: pySim-prog_test: add test vectors for sysmoISIM-SJA5 .. pySim-prog_test: add test vectors for sysmoISIM-SJA5 The sysmoISIM-SJA5 has no testvectors yet Change-Id: Ia6684ab3ee6c85cfe7bc0ab80d34a26e3499907a --- A tests/pySim-prog_test/sysmoISIM-SJA5.data A tests/pySim-prog_test/sysmoISIM-SJA5.ok 2 files changed, 220 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/32/38232/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38232?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ia6684ab3ee6c85cfe7bc0ab80d34a26e3499907a Gerrit-Change-Number: 38232 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: dexter
[M] Change in pysim[master]: pySim-prog_test: add test vectors for sysmoISIM-SJA5
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38232?usp=email ) Change subject: pySim-prog_test: add test vectors for sysmoISIM-SJA5 .. pySim-prog_test: add test vectors for sysmoISIM-SJA5 The sysmoISIM-SJA5 has no testvectors yet Change-Id: Ia6684ab3ee6c85cfe7bc0ab80d34a26e3499907a --- A tests/pySim-prog_test/sysmoISIM-SJA5.data A tests/pySim-prog_test/sysmoISIM-SJA5.ok 2 files changed, 220 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/32/38232/1 diff --git a/tests/pySim-prog_test/sysmoISIM-SJA5.data b/tests/pySim-prog_test/sysmoISIM-SJA5.data new file mode 100644 index 000..8bbf7d7 --- /dev/null +++ b/tests/pySim-prog_test/sysmoISIM-SJA5.data @@ -0,0 +1,6 @@ +MCC=001 +MNC=01 +KI=AABBCCDDEEFFAABBCCDDEEFFAABBCCDD +OPC=12345678901234567890123456789012 +IMSI=00101000102 +ADM=34173960 diff --git a/tests/pySim-prog_test/sysmoISIM-SJA5.ok b/tests/pySim-prog_test/sysmoISIM-SJA5.ok new file mode 100644 index 000..e05dbf3 --- /dev/null +++ b/tests/pySim-prog_test/sysmoISIM-SJA5.ok @@ -0,0 +1,214 @@ +Using PC/SC reader interface +Reading ... +Autodetected card type: sysmoISIM-SJA5 +ICCID: 894944001155314 +IMSI: 00101000102 +GID1: +GID2: +SMSP: e10581005155f500 +SPN: Magic +Show in HPLMN: True +Hide in OPLMN: True +PLMNsel: 00f110ff +PLMNwAcT: + 00f110 # MCC: 001 MNC: 01 AcT: E-UTRAN NB-S1, E-UTRAN WB-S1, EC-GSM-IoT, GSM, GSM COMPACT, NG-RAN, UTRAN, cdma2000 1xRTT, cdma2000 HRPD + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + +OPLMNwAcT: + 00f110 # MCC: 001 MNC: 01 AcT: E-UTRAN NB-S1, E-UTRAN WB-S1, EC-GSM-IoT, GSM, GSM COMPACT, NG-RAN, UTRAN, cdma2000 1xRTT, cdma2000 HRPD + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + +HPLMNAcT: + 00f110 # MCC: 001 MNC: 01 AcT: E-UTRAN NB-S1, E-UTRAN WB-S1, EC-GSM-IoT, GSM, GSM COMPACT, NG-RAN, UTRAN, cdma2000 1xRTT, cdma2000 HRPD + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + ff # unused + +ACC: 0001 +MSISDN (NPI=1 ToN=3): 6766266 +Administrative data: 0002 + MS operation mode: normal + Ciphering Indicator: disabled +SIM Service Table: ff333f003f0f300cf0c3f0 + Service 1 - CHV1 disable function + Service 2 - Abbreviated Dialling Numbers (ADN) + Service 3 - Fixed Dialling Numbers (FDN) + Service 4 - Short Message Storage (SMS) + Service 5 - Advice of Charge (AoC) + Service 6 - Capability Configuration Parameters (CCP) + Service 7 - PLMN selector + Service 8 - RFU + Service 9 - MSISDN + Service 10 - Extension1 + Service 13 - Last Number Dialled (LND) + Service 14 - Cell Broadcast Message Identifier + Service 17 - Service Provider Name + Service 18 - Service Dialling Numbers (SDN) + Service 19 - Extension3 + Service 20 - RFU + Service 21 - VGCS Group Identifier List (EFVGCS and EFVGCSS) + Service 22 - VBS Group Identifier List (EFVBS and EFVBSS) + Service 23 - enhanced Multi-Level Precedence and Pre-emption Service + Service 24 - Automatic Answer for eMLPP + Service 25 - Data download via SMS-CB + Service 26 - Data download via SMS-PP + Service 27 - Menu selection + Service 28 - Call control + Service 29 - Proactive SIM + Service 30 - Cell Broadcast Message Identifier Ranges + Service 31 - Barred Dialling Numbers (BDN) + Service 32 - Extension4 + Service 33 - De-personalization Control Keys + Service 34 - Co-operative Network List + Service 35 - Short Message Status Reports + Service 36 - Network's indication of alerting in the MS + Service 37 - Mobile Originated Short Message control by SIM + Service 38 - GPRS + Service 49 - MExE + Service 50 - Reserved and shall be ignored + Service 51 - PLMN Network Name + Servi
[XS] Change in pysim[master]: pySim-shell: recognize ADP pins longer than 8 digits as hexadecimal
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38231?usp=email ) Change subject: pySim-shell: recognize ADP pins longer than 8 digits as hexadecimal .. pySim-shell: recognize ADP pins longer than 8 digits as hexadecimal When a hexadecimal formatted ADM pin is retrieved via the card_key_provider, it still requires the --pin-is-hex parameter so that sanitize_pin_adm knows the correct format. This unfortunately ruins the card_key_provider feature for all cards that use hexadecimal pins, because the --pin-is-hex would also be required in scripts, which makes a script either useable for cards with hexadecimal ADM or for for cards with ASCII ADM. To minimize the problem, let's recognize all ADM pins longer than 8 digits as hexadecimal in case --pin-is-hex is not set. Related: OS#4348 Change-Id: Iad9398365d448946c499ce89e3cfb2c3af5d525e --- M pySim-shell.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/31/38231/1 diff --git a/pySim-shell.py b/pySim-shell.py index d3f0d87..8c260aa 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -819,7 +819,7 @@ adm_type = opts.adm_type or 'ADM1' # try to find an ADM-PIN if none is specified result = card_key_provider_get_field(adm_type, key='ICCID', value=iccid) -if opts.pin_is_hex: +if opts.pin_is_hex or (result and len(result) > 8): pin_adm = sanitize_pin_adm(None, result) else: pin_adm = sanitize_pin_adm(result) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38231?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Iad9398365d448946c499ce89e3cfb2c3af5d525e Gerrit-Change-Number: 38231 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[XS] Change in pysim[master]: pySim-prog_test: individual ICCIDs for all cards
Attention is currently required from: dexter. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38224?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: pySim-prog_test: individual ICCIDs for all cards .. pySim-prog_test: individual ICCIDs for all cards Our test cards need to stay recognizable, so it is important that each card has a unique ICCID. This means we must write an individual ICCID, when we test writing the ICCID. Related: OS#4384 Change-Id: I858a35e526e7b4868e901222d587258412779f41 --- M tests/pySim-prog_test/sysmoUSIM-SJS1.data M tests/pySim-prog_test/sysmoUSIM-SJS1.ok M tests/pySim-prog_test/sysmosim-gr1.data M tests/pySim-prog_test/sysmosim-gr1.ok 4 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/24/38224/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38224?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I858a35e526e7b4868e901222d587258412779f41 Gerrit-Change-Number: 38224 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: dexter
[XS] Change in pysim[master]: pySim-prog_test: individual ICCIDs for all cards
Attention is currently required from: dexter. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38224?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: pySim-prog_test: individual ICCIDs for all cards .. pySim-prog_test: individual ICCIDs for all cards Our test cards need to stay recognizable, so it is important that each card has a unique ICCID. This means we must write an individual ICCID, when we test writing the ICCID. Related: OS#4384 Change-Id: I858a35e526e7b4868e901222d587258412779f41 --- M tests/pySim-prog_test/sysmoUSIM-SJS1.data M tests/pySim-prog_test/sysmoUSIM-SJS1.ok M tests/pySim-prog_test/sysmosim-gr1.data M tests/pySim-prog_test/sysmosim-gr1.ok 4 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/24/38224/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38224?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I858a35e526e7b4868e901222d587258412779f41 Gerrit-Change-Number: 38224 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: dexter
[S] Change in pysim[master]: pySim-prog_test: individual ICCIDs for all cards
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38224?usp=email ) Change subject: pySim-prog_test: individual ICCIDs for all cards .. pySim-prog_test: individual ICCIDs for all cards Our test cards need to stay recognizable, so it is important that each card has a unique ICCID. This means we must write an individual ICCID, when we test writing the ICCID. Related: OS#4384 Change-Id: I858a35e526e7b4868e901222d587258412779f41 --- M tests/pySim-prog_test/fakemagicsim.data M tests/pySim-prog_test/fakemagicsim.ok M tests/pySim-prog_test/sysmoUSIM-SJS1.data M tests/pySim-prog_test/sysmoUSIM-SJS1.ok M tests/pySim-prog_test/sysmosim-gr1.data M tests/pySim-prog_test/sysmosim-gr1.ok 6 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/24/38224/1 diff --git a/tests/pySim-prog_test/fakemagicsim.data b/tests/pySim-prog_test/fakemagicsim.data index deab2f7..c3649d7 100644 --- a/tests/pySim-prog_test/fakemagicsim.data +++ b/tests/pySim-prog_test/fakemagicsim.data @@ -1,6 +1,6 @@ MCC=001 MNC=01 -ICCID=1122334455667788990 +ICCID=AA22334455667788990 KI= OPC= IMSI=00101000102 \ No newline at end of file diff --git a/tests/pySim-prog_test/fakemagicsim.ok b/tests/pySim-prog_test/fakemagicsim.ok index 4c366f9..59f5104 100644 --- a/tests/pySim-prog_test/fakemagicsim.ok +++ b/tests/pySim-prog_test/fakemagicsim.ok @@ -1,7 +1,7 @@ Using PC/SC reader interface Reading ... Autodetected card type: fakemagicsim -ICCID: 1122334455667788990 +ICCID: AA22334455667788990 IMSI: 00101000102 GID1: Can't read file -- SW match failed! Expected 9000 and got 9404. GID2: Can't read file -- SW match failed! Expected 9000 and got 9404. diff --git a/tests/pySim-prog_test/sysmoUSIM-SJS1.data b/tests/pySim-prog_test/sysmoUSIM-SJS1.data index c23f9f1..997c7f8 100644 --- a/tests/pySim-prog_test/sysmoUSIM-SJS1.data +++ b/tests/pySim-prog_test/sysmoUSIM-SJS1.data @@ -1,6 +1,6 @@ MCC=001 MNC=01 -ICCID=1122334455667788990 +ICCID=CC22334455667788990 KI= OPC= IMSI=00101000102 diff --git a/tests/pySim-prog_test/sysmoUSIM-SJS1.ok b/tests/pySim-prog_test/sysmoUSIM-SJS1.ok index c909a89..f2efb7f 100644 --- a/tests/pySim-prog_test/sysmoUSIM-SJS1.ok +++ b/tests/pySim-prog_test/sysmoUSIM-SJS1.ok @@ -1,7 +1,7 @@ Using PC/SC reader interface Reading ... Autodetected card type: sysmoUSIM-SJS1 -ICCID: 1122334455667788990 +ICCID: CC22334455667788990 IMSI: 00101000102 GID1: GID2: diff --git a/tests/pySim-prog_test/sysmosim-gr1.data b/tests/pySim-prog_test/sysmosim-gr1.data index 90d23f8..c701868 100644 --- a/tests/pySim-prog_test/sysmosim-gr1.data +++ b/tests/pySim-prog_test/sysmosim-gr1.data @@ -1,6 +1,6 @@ MCC=001 MNC=01 -ICCID=1122334455667788990 +ICCID=BB22334455667788990 KI= OPC= IMSI=00101000102 diff --git a/tests/pySim-prog_test/sysmosim-gr1.ok b/tests/pySim-prog_test/sysmosim-gr1.ok index 70ac763..c3bd301 100644 --- a/tests/pySim-prog_test/sysmosim-gr1.ok +++ b/tests/pySim-prog_test/sysmosim-gr1.ok @@ -1,7 +1,7 @@ Using PC/SC reader interface Reading ... Autodetected card type: sysmosim-gr1 -ICCID: 1122334455667788990 +ICCID: BB22334455667788990 IMSI: 00101000102 GID1: Can't read file -- SW match failed! Expected 9000 and got 9404. GID2: Can't read file -- SW match failed! Expected 9000 and got 9404. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38224?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I858a35e526e7b4868e901222d587258412779f41 Gerrit-Change-Number: 38224 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[XS] Change in pysim[master]: pySim-prog_test: do not set an ICCID parameter for sysmoISIM-SJA2
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38223?usp=email ) Change subject: pySim-prog_test: do not set an ICCID parameter for sysmoISIM-SJA2 .. pySim-prog_test: do not set an ICCID parameter for sysmoISIM-SJA2 The sysmoISIM-SJA2 does not support changing of the ICCID. pySim-prog will also reject this, so let's remove the ICCID from the parameter list. Related: OS#4384 Change-Id: I89571f2bf7c4cec4d621c322a58687b7781b0ed2 --- M tests/pySim-prog_test/sysmoISIM-SJA2.data 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/23/38223/1 diff --git a/tests/pySim-prog_test/sysmoISIM-SJA2.data b/tests/pySim-prog_test/sysmoISIM-SJA2.data index 748f3ee..9f931cc 100644 --- a/tests/pySim-prog_test/sysmoISIM-SJA2.data +++ b/tests/pySim-prog_test/sysmoISIM-SJA2.data @@ -1,6 +1,5 @@ MCC=001 MNC=01 -ICCID=1122334455667788990 KI=AABBCCDDEEFFAABBCCDDEEFFAABBCCDD OPC=12345678901234567890123456789012 IMSI=00101000102 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38223?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I89571f2bf7c4cec4d621c322a58687b7781b0ed2 Gerrit-Change-Number: 38223 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[M] Change in pysim[master]: filesystem: pass total_len to construct of when encoding file contents
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38195?usp=email ) Change subject: filesystem: pass total_len to construct of when encoding file contents .. Patch Set 2: (2 comments) File pySim/filesystem.py: https://gerrit.osmocom.org/c/pysim/+/38195/comment/8217c92e_3554c5d8?usp=email : PS1, Line 1043: __get_rec_len > I'm not following your argument here. […] I have put the double underscore to make the method as private. Also I don't think that the double underscore is exclusively reserved for python internal stuff. At least I haven't read that anywhere yet. I found an interesting article about the underscore topic: https://medium.com/python-explainers/single-and-double-underscores-in-python-explained-63a805ef34db https://gerrit.osmocom.org/c/pysim/+/38195/comment/ca762fc4_fa7dd7f5?usp=email : PS1, Line 1266: return b2h(filter_dict(build_construct(self._construct, abstract_data, self._get_size(total_len > TransRecEF registeres the cdm2 command-set form TransparentEF, yes. It will > call lchan. […] I still not seeing entirely through here. I thought TransRecEF were transparent files with multiple fixed length records. But its actually the other way around? I was expected to get the record oriented command set but I get the command set for transparent files but with multiple records in the JSON struct. In any case, I have tested it and it seems to work fine. The files get updated properly. Also the unittests seem to have coverage, so I think everything should be ok here. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38195?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: I1b7a51594fbc5d9fe01132c39354a2fa88d53f9b Gerrit-Change-Number: 38195 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Thu, 19 Sep 2024 09:51:48 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Comment-In-Reply-To: dexter
[XS] Change in pysim[master]: ts_102_221: se _test_de_encode instead of _test_decode in EF.DIR unit...
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38201?usp=email ) Change subject: ts_102_221: se _test_de_encode instead of _test_decode in EF.DIR unittest .. ts_102_221: se _test_de_encode instead of _test_decode in EF.DIR unittest The unittest for EF.DIR only runs with _test_decode, but it also runs with _test_de_encode without any problems Related: OS#5714 Change-Id: If459073c6ff927c1cc1790d506e3979243b1fb4c --- M pySim/ts_102_221.py 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/01/38201/1 diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py index f09b1e3..35fed28 100644 --- a/pySim/ts_102_221.py +++ b/pySim/ts_102_221.py @@ -637,8 +637,7 @@ # TS 102 221 Section 13.1 class EF_DIR(LinFixedEF): -# FIXME: re-encode failure when changing to _test_de_encode -_test_decode = [ +_test_de_encode = [ ( '61294f10a0008710028907095003696d31730ea00c80011781025f608203454150', { "application_template": [ { "application_id": h2b("a000871002890709") }, { "application_label": "USim1" }, -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38201?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: If459073c6ff927c1cc1790d506e3979243b1fb4c Gerrit-Change-Number: 38201 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[XS] Change in pysim[master]: ts_51_011: use _test_de_encode instead of _test_decode in EF.CFIS uni...
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38200?usp=email ) Change subject: ts_51_011: use _test_de_encode instead of _test_decode in EF.CFIS unittest .. ts_51_011: use _test_de_encode instead of _test_decode in EF.CFIS unittest The unittest for EF.CFIS only runs with _test_decode, but it also runs with _test_de_encode without any problems Related: OS#5714 Change-Id: Ib876fd799f871fe64ced2a7b64847ffd09e16ed9 --- M pySim/ts_51_011.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/00/38200/1 diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index 69e20e4..2dac55e 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -812,7 +812,7 @@ # TS 51.011 Section 10.3.46 class EF_CFIS(LinFixedEF): -_test_decode = [ +_test_de_encode = [ ( '0100', {"msp_number": 1, "cfu_indicator_status": { "voice": False, "fax": False, "data": False, "rfu": 0 }, "len_of_bcd": 255, "ton_npi": {"ext": True, -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38200?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ib876fd799f871fe64ced2a7b64847ffd09e16ed9 Gerrit-Change-Number: 38200 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[XS] Change in pysim[master]: ts_51_011: fix unittest for EF.ADN
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38199?usp=email ) Change subject: ts_51_011: fix unittest for EF.ADN .. ts_51_011: fix unittest for EF.ADN The unittest for EF.ADN can run with _test_de_encode. However, the original test vectors seem to be from a card with a slightly larger record size, so they need a bit of re-alignment Related: OS#5714 Change-Id: I241792e66ee6167be6ddc076453344b6307d6265 --- M pySim/ts_51_011.py 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/99/38199/1 diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index 65195fd..69e20e4 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -131,13 +131,13 @@ # TS 51.011 Section 10.5.1 class EF_ADN(LinFixedEF): -_test_decode = [ -( '4220484120312053696306810628560810ff', +_test_de_encode = [ +( '4220484120312053696306810628560810FF', { "alpha_id": "B HA 1 Sic", "len_of_bcd": 6, "ton_npi": { "ext": True, "type_of_number": "unknown", "numbering_plan_id": "isdn_e164" }, "dialing_nr": "6082658001", "cap_conf_id": 255, "ext1_record_id": 255 }), -( '4B756E64656E626574726575756E67FF0791947112122721', +( '4B756E64656E626574726575756E67FF0791947112122721', {"alpha_id": "Kundenbetreuung", "len_of_bcd": 7, "ton_npi": {"ext": True, "type_of_number": "international", "numbering_plan_id": "isdn_e164"}, -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38199?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I241792e66ee6167be6ddc076453344b6307d6265 Gerrit-Change-Number: 38199 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[S] Change in pysim[master]: ts_51_011: replace encoding of EF.MSISDN with construct model
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38117?usp=email to look at the new patch set (#7). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: ts_51_011: replace encoding of EF.MSISDN with construct model .. ts_51_011: replace encoding of EF.MSISDN with construct model The encoding of EF.MSISDN is currently done with enc_msisdn and dec_msisdn from utils.py. Let's replace this with a construct based model, similar to the one we already use with EF.ADN Related: OS#5714 Change-Id: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a --- M pySim/ts_51_011.py M tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok 2 files changed, 20 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/17/38117/7 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38117?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a Gerrit-Change-Number: 38117 Gerrit-PatchSet: 7 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Attention: laforge
[M] Change in pysim[master]: utils: get rid of enc_msisdn and dec_msisdn
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38118?usp=email ) Change subject: utils: get rid of enc_msisdn and dec_msisdn .. Patch Set 8: (1 comment) Patchset: PS1: > do we really want to continue to use those functions if we have proper > construct encoder/decoder in […] Acknowledged -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38118?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: I19ec8ba14551ec282fc0cc12ae2f6d528bdfc527 Gerrit-Change-Number: 38118 Gerrit-PatchSet: 8 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Wed, 18 Sep 2024 14:59:16 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge
[M] Change in pysim[master]: utils: get rid of enc_msisdn and dec_msisdn
Attention is currently required from: laforge. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38118?usp=email to look at the new patch set (#8). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: utils: get rid of enc_msisdn and dec_msisdn .. utils: get rid of enc_msisdn and dec_msisdn We now have a construct based encoder/decoder for the record content of EF.MSISDN. This means we can now replace enc/dec_msisdn, which is still used by pySim-read and pySim-prog with with that encoder/decoder. Related: OS#5714 Change-Id: I19ec8ba14551ec282fc0cc12ae2f6d528bdfc527 --- M pySim-read.py M pySim/legacy/cards.py M pySim/utils.py M tests/unittests/test_utils.py 4 files changed, 37 insertions(+), 120 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/18/38118/8 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38118?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I19ec8ba14551ec282fc0cc12ae2f6d528bdfc527 Gerrit-Change-Number: 38118 Gerrit-PatchSet: 8 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge
[M] Change in pysim[master]: utils: support alpha identifier in enc/dec_msisdn
Attention is currently required from: dexter, laforge. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38118?usp=email to look at the new patch set (#7). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: utils: support alpha identifier in enc/dec_msisdn .. utils: support alpha identifier in enc/dec_msisdn The functions enc_msisdn and dec_msisdn do not support encoding and decoding of the alpha identifier. Let's extend the functions accordingly. Related: OS#5714 Change-Id: I19ec8ba14551ec282fc0cc12ae2f6d528bdfc527 --- M pySim-read.py M pySim/utils.py M tests/unittests/test_utils.py 3 files changed, 43 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/18/38118/7 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38118?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I19ec8ba14551ec282fc0cc12ae2f6d528bdfc527 Gerrit-Change-Number: 38118 Gerrit-PatchSet: 7 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Attention: dexter
[M] Change in pysim[master]: utils: support alpha identifier in enc/dec_msisdn
Attention is currently required from: dexter, laforge. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38118?usp=email to look at the new patch set (#6). The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified-1 by Jenkins Builder Change subject: utils: support alpha identifier in enc/dec_msisdn .. utils: support alpha identifier in enc/dec_msisdn The functions enc_msisdn and dec_msisdn do not support encoding and decoding of the alpha identifier. Let's extend the functions accordingly. Related: OS#5714 Change-Id: I19ec8ba14551ec282fc0cc12ae2f6d528bdfc527 --- M pySim-read.py M pySim/utils.py M tests/unittests/test_utils.py 3 files changed, 41 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/18/38118/6 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38118?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I19ec8ba14551ec282fc0cc12ae2f6d528bdfc527 Gerrit-Change-Number: 38118 Gerrit-PatchSet: 6 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Attention: dexter
[XS] Change in pysim[master]: requirements: require at least construct version 2.10.70
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38198?usp=email ) Change subject: requirements: require at least construct version 2.10.70 .. requirements: require at least construct version 2.10.70 Older construct versions seem to have problems, in particular with evaluating COptional() correctly. With 2.10.70 no such problems were observed. Related: OS#5714 Change-Id: If59dc708a7194649d1f42c4cf33f6328edcb80d2 --- M requirements.txt M setup.py 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/98/38198/1 diff --git a/requirements.txt b/requirements.txt index 25e3654..2251a0a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ pytlv cmd2>=1.5 jsonpath-ng -construct>=2.9.51 +construct>=2.10.70 bidict pyosmocom>=0.0.3 pyyaml>=5.1 diff --git a/setup.py b/setup.py index 10500d3..aa92f17 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ "pytlv", "cmd2 >= 1.5.0", "jsonpath-ng", -"construct >= 2.9.51", +"construct >= 2.10.70", "bidict", "pyosmocom >= 0.0.3", "pyyaml >= 5.1", -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38198?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: If59dc708a7194649d1f42c4cf33f6328edcb80d2 Gerrit-Change-Number: 38198 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[S] Change in pysim[master]: ts_51_011: replace encoding of EF.MSISDN with construct model
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38117?usp=email ) Change subject: ts_51_011: replace encoding of EF.MSISDN with construct model .. Patch Set 5: (1 comment) Patchset: PS5: Interesting: The construct version on the tester was 2.10.68, on my workstation where the pySim-trace test is passing it was 2.10.70. Presumably this older version has problems to evaluate the COptional correctly and was letting 0xFF bytes into the GSM0338 decoder. Also the file contents in the trace look wild: ff0791942143658709ff In any case, the decoding works now! -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38117?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: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a Gerrit-Change-Number: 38117 Gerrit-PatchSet: 5 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Wed, 18 Sep 2024 12:52:14 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No
[M] Change in pysim[master]: filesystem: pass total_len to construct of when encoding file contents
Attention is currently required from: laforge. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38195?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review-1 by laforge, Verified+1 by Jenkins Builder Change subject: filesystem: pass total_len to construct of when encoding file contents .. filesystem: pass total_len to construct of when encoding file contents In our construct models we frequently use a context parameter "total_len", we also pass this parameter to construct when we decode files, but we do not pass it when we generate files. This is a problem, because when total_len is used in the construct model, this parameter must be known also when decoding the file. Let's make sure that the total_len is properly determined and and passed to construct (via pyosmocom) Related: OS#5714 Change-Id: I1b7a51594fbc5d9fe01132c39354a2fa88d53f9b --- M pySim/filesystem.py M pySim/runtime.py 2 files changed, 71 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/95/38195/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38195?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1b7a51594fbc5d9fe01132c39354a2fa88d53f9b Gerrit-Change-Number: 38195 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge
[M] Change in pysim[master]: filesystem: pass total_len to construct of when encoding file contents
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38195?usp=email ) Change subject: filesystem: pass total_len to construct of when encoding file contents .. Patch Set 2: (4 comments) File pySim/filesystem.py: https://gerrit.osmocom.org/c/pysim/+/38195/comment/590b1234_be0b47ef?usp=email : PS1, Line 182: ' > unrelated cosmetic change. […] Done https://gerrit.osmocom.org/c/pysim/+/38195/comment/b190bb7d_3d5269df?usp=email : PS1, Line 747: if total_len is not None: > this could deserve some documentation (doc-string or comment). […] In case the size is not specified, the default value of the parameter in the constructor should ensure size is present. Unless the constructor is called explicitly with size = None, there should be no problem. In any case, lets put a check to be 100% sure. https://gerrit.osmocom.org/c/pysim/+/38195/comment/dc4c591c_8901a3cc?usp=email : PS1, Line 1043: __get_rec_len > why do we have double-underscores here but single-underscore for _get_size() > above? Also: please ad […] I thought I could re-use _get_size() in TransRecEf, that is why _get_size only has one underscore. https://gerrit.osmocom.org/c/pysim/+/38195/comment/e04af2b8_86fc99d6?usp=email : PS1, Line 1266: return b2h(filter_dict(build_construct(self._construct, abstract_data, self._get_size(total_len > Did you test that? I think a _get_rec_len() would actually be required here. > […] I see, we can not use _get_size here. As far as I understand now I would have to use the rec_len as an alternative value. I wonder how to test this. As it seems TransRecEF registers the command set from TransparentEF, so I only get the normal update_binary commands. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38195?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: I1b7a51594fbc5d9fe01132c39354a2fa88d53f9b Gerrit-Change-Number: 38195 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Wed, 18 Sep 2024 10:12:35 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge
[S] Change in pysim[master]: ts_51_011: replace encoding of EF.MSISDN with construct model
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38117?usp=email ) Change subject: ts_51_011: replace encoding of EF.MSISDN with construct model .. Patch Set 5: (1 comment) Patchset: PS1: > We can try that, but before we must resolve some issues with construct. […] I wonder how the compatibility layer should be implemented. What I could think of is a function that we define a method inside the file object definition (similar to the _encode_record_hex() function). This method would recognize if there is an old format pass and transform it. The encode_record_hex in filesystem.py would then check if the method exists and call it to transform the abstract_data to the recent format. Then things would continue normally. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38117?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: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a Gerrit-Change-Number: 38117 Gerrit-PatchSet: 5 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Wed, 18 Sep 2024 10:12:35 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Comment-In-Reply-To: dexter
[S] Change in pysim[master]: pySim-shell: improve command "desc"
Attention is currently required from: laforge. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38194?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified+1 by Jenkins Builder Change subject: pySim-shell: improve command "desc" .. pySim-shell: improve command "desc" The "desc" command displays a string with a file description, let's also display some size information as part of the description as well. Related: OS#5714 Change-Id: I98e139ba2bf35df5524245cdd96f5c52cf09b986 --- M pySim-shell.py M pySim/runtime.py 2 files changed, 28 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/94/38194/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38194?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I98e139ba2bf35df5524245cdd96f5c52cf09b986 Gerrit-Change-Number: 38194 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge
[S] Change in pysim[master]: ts_51_011: replace encoding of EF.MSISDN with construct model
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38117?usp=email to look at the new patch set (#5). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: ts_51_011: replace encoding of EF.MSISDN with construct model .. ts_51_011: replace encoding of EF.MSISDN with construct model The encoding of EF.MSISDN is currently done with enc_msisdn and dec_msisdn from utils.py. Let's replace this with a construct based model, similar to the one we already use with EF.ADN Related: OS#5714 Change-Id: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a --- M pySim/ts_51_011.py M tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok 2 files changed, 20 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/17/38117/5 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38117?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a Gerrit-Change-Number: 38117 Gerrit-PatchSet: 5 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Attention: laforge
[S] Change in pysim[master]: pySim-shell: improve command "desc"
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38194?usp=email ) Change subject: pySim-shell: improve command "desc" .. Patch Set 2: (1 comment) File pySim-shell.py: https://gerrit.osmocom.org/c/pysim/+/38194/comment/2549e1f6_9cbd5a52?usp=email : PS1, Line 783: self._cmd.poutput(" actual_size: %s" % str(self._cmd.lchan.selected_file_size())) > one might also add the total/max file size of a BerTlvEF here. […] Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38194?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: I98e139ba2bf35df5524245cdd96f5c52cf09b986 Gerrit-Change-Number: 38194 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Wed, 18 Sep 2024 10:12:35 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge
[XS] Change in pysim[master]: filesystem, cosmetic: remove excess whitespace
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38196?usp=email ) Change subject: filesystem, cosmetic: remove excess whitespace .. filesystem, cosmetic: remove excess whitespace Change-Id: I902670590ae75a5d197616ae37d8268a60125121 --- M pySim/filesystem.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim/filesystem.py b/pySim/filesystem.py index 43a72f2..c55bcbe 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -179,7 +179,7 @@ """Return a dict of {'identifier': self} tuples. Args: -alias : Add an alias with given name to 'self' +alias : Add an alias with given name to 'self' flags : Specify which selectables to return 'FIDS' and/or 'NAMES'; If not specified, all selectables will be returned. Returns: -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38196?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I902670590ae75a5d197616ae37d8268a60125121 Gerrit-Change-Number: 38196 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: pespin
[XS] Change in pysim[master]: filesystem, cosmetic: remove excess whitespace
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38196?usp=email ) Change subject: filesystem, cosmetic: remove excess whitespace .. filesystem, cosmetic: remove excess whitespace Change-Id: I902670590ae75a5d197616ae37d8268a60125121 --- M pySim/filesystem.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/96/38196/1 diff --git a/pySim/filesystem.py b/pySim/filesystem.py index 43a72f2..c55bcbe 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -179,7 +179,7 @@ """Return a dict of {'identifier': self} tuples. Args: -alias : Add an alias with given name to 'self' +alias : Add an alias with given name to 'self' flags : Specify which selectables to return 'FIDS' and/or 'NAMES'; If not specified, all selectables will be returned. Returns: -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38196?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I902670590ae75a5d197616ae37d8268a60125121 Gerrit-Change-Number: 38196 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[XS] Change in pysim[master]: runtime: add new API functions to get the record len and file size
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38193?usp=email ) Change subject: runtime: add new API functions to get the record len and file size .. runtime: add new API functions to get the record len and file size We have an API function to get the number of records, let's now also add API functions to get the record length and the overall size of the currently selected file. Related: OS#5714 Change-Id: Ica7811c04161d8098b40c7219ed6b939df716cfd --- M pySim/runtime.py 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/93/38193/1 diff --git a/pySim/runtime.py b/pySim/runtime.py index b903ccb..898008e 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -211,6 +211,12 @@ def selected_file_num_of_rec(self) -> Optional[int]: return self.selected_file_fcp['file_descriptor'].get('num_of_rec') +def selected_file_record_len(self) -> Optional[int]: +return self.selected_file_fcp['file_descriptor'].get('record_len') + +def selected_file_size(self) -> Optional[int]: +return self.selected_file_fcp.get('file_size') + def get_cwd(self) -> CardDF: """Obtain the current working directory. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38193?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ica7811c04161d8098b40c7219ed6b939df716cfd Gerrit-Change-Number: 38193 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[M] Change in pysim[master]: filesystem: pass total_len to construct of when encoding file contents
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38195?usp=email ) Change subject: filesystem: pass total_len to construct of when encoding file contents .. filesystem: pass total_len to construct of when encoding file contents In our construct models we frequently use a context parameter "total_len", we also pass this parameter to construct when we decode files, but we do not pass it when we generate files. This is a problem, because when total_len is used in the construct model, this parameter must be known also when decoding the file. Let's make sure that the total_len is properly determined and and passed to construct (via pyosmocom) Related: OS#5714 Change-Id: I1b7a51594fbc5d9fe01132c39354a2fa88d53f9b --- M pySim/filesystem.py M pySim/runtime.py M requirements.txt 3 files changed, 36 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/95/38195/1 diff --git a/pySim/filesystem.py b/pySim/filesystem.py index 43a72f2..5258569 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -179,7 +179,7 @@ """Return a dict of {'identifier': self} tuples. Args: -alias : Add an alias with given name to 'self' +alias : Add an alias with given name to 'self' flags : Specify which selectables to return 'FIDS' and/or 'NAMES'; If not specified, all selectables will be returned. Returns: @@ -743,7 +743,17 @@ return t.to_dict() return {'raw': raw_bin_data.hex()} -def encode_bin(self, abstract_data: dict) -> bytearray: +def _get_size(self, total_len : int = None): +if total_len is not None: +return {"total_len" : total_len} +elif self.size[1] is not None: +return {"total_len" : self.size[1]} +elif self.size[0] is not None: +return {"total_len" : self.size[0]} +else: +return {"total_len" : None} + +def encode_bin(self, abstract_data: dict, total_len : int = None) -> bytearray: """Encode abstract representation into raw (binary) data. A derived class would typically provide an _encode_bin() or _encode_hex() method @@ -762,7 +772,7 @@ if callable(method): return h2b(method(abstract_data)) if self._construct: -return build_construct(self._construct, abstract_data) +return build_construct(self._construct, abstract_data, self._get_size(total_len)) if self._tlv: t = self._tlv() if inspect.isclass(self._tlv) else self._tlv t.from_dict(abstract_data) @@ -770,7 +780,7 @@ raise NotImplementedError( "%s encoder not yet implemented. Patches welcome." % self) -def encode_hex(self, abstract_data: dict) -> str: +def encode_hex(self, abstract_data: dict, total_len : int = None) -> str: """Encode abstract representation into raw (hex string) data. A derived class would typically provide an _encode_bin() or _encode_hex() method @@ -790,7 +800,7 @@ raw_bin_data = method(abstract_data) return b2h(raw_bin_data) if self._construct: -return b2h(build_construct(self._construct, abstract_data)) +return b2h(build_construct(self._construct, abstract_data, self._get_size(total_len))) if self._tlv: t = self._tlv() if inspect.isclass(self._tlv) else self._tlv t.from_dict(abstract_data) @@ -1030,7 +1040,17 @@ return t.to_dict() return {'raw': raw_hex_data} -def encode_record_hex(self, abstract_data: dict, record_nr: int) -> str: +def __get_rec_len(self, total_len : int = None): +if total_len is not None: +return {"total_len" : total_len} +elif self.rec_len[1] is not None: +return {"total_len" : self.rec_len[1]} +elif self.rec_len[0] is not None: +return {"total_len" : self.rec_len[0]} +else: +return {"total_len" : None} + +def encode_record_hex(self, abstract_data: dict, record_nr: int, total_len: int = None) -> str: """Encode abstract representation into raw (hex string) data. A derived class would typically provide an _encode_record_bin() or _encode_record_hex() @@ -1051,7 +1071,7 @@ raw_bin_data = method(abstract_data, record_nr=record_nr) return b2h(raw_bin_data) if self._construct: -return b2h(build_construct(self._construct, abstract_data)) +return b2h(build_construct(self._construct, abstract_data,
[S] Change in pysim[master]: pySim-shell: improve command "desc"
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38194?usp=email ) Change subject: pySim-shell: improve command "desc" .. pySim-shell: improve command "desc" The "desc" command displays a string with a file description, let's also display some size information as part of the description as well. Related: OS#5714 Change-Id: I98e139ba2bf35df5524245cdd96f5c52cf09b986 --- M pySim-shell.py 1 file changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/94/38194/1 diff --git a/pySim-shell.py b/pySim-shell.py index 7db77f0..cabe2aa 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -56,7 +56,7 @@ from pySim.utils import sanitize_pin_adm, tabulate_str_list, boxed_heading_str, dec_iccid, sw_match from pySim.card_handler import CardHandler, CardHandlerAuto -from pySim.filesystem import CardMF, CardEF, CardDF, CardADF +from pySim.filesystem import CardMF, CardEF, CardDF, CardADF, LinFixedEF, TransparentEF from pySim.ts_102_221 import pin_names from pySim.ts_102_222 import Ts10Commands from pySim.gsm_r import DF_EIRENE @@ -766,9 +766,21 @@ """Display human readable file description for the currently selected file""" desc = self._cmd.lchan.selected_file.desc if desc: -self._cmd.poutput(desc) +self._cmd.poutput("%s: %s" % (self._cmd.lchan.selected_file, desc)) else: -self._cmd.poutput("no description available") +self._cmd.poutput("%s: no description available" % self._cmd.lchan.selected_file) +self._cmd.poutput(" file structure: %s" % self._cmd.lchan.selected_file_structure()) +if isinstance(self._cmd.lchan.selected_file, LinFixedEF): +self._cmd.poutput(" record length:") +self._cmd.poutput(" minimum_length: %s" % str(self._cmd.lchan.selected_file.rec_len[0])) +self._cmd.poutput(" recommended_length: %s" % str(self._cmd.lchan.selected_file.rec_len[1])) +self._cmd.poutput(" actual_length: %s" % str(self._cmd.lchan.selected_file_record_len())) +self._cmd.poutput(" number of records: %s" % str(self._cmd.lchan.selected_file_num_of_rec())) +elif isinstance(self._cmd.lchan.selected_file, TransparentEF): +self._cmd.poutput(" file size:") +self._cmd.poutput(" minimum_size: %s" % str(self._cmd.lchan.selected_file.size[0])) +self._cmd.poutput(" recommended_size: %s" % str(self._cmd.lchan.selected_file.size[1])) +self._cmd.poutput(" actual_size: %s" % str(self._cmd.lchan.selected_file_size())) verify_adm_parser = argparse.ArgumentParser() verify_adm_parser.add_argument('--pin-is-hex', action='store_true', -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38194?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I98e139ba2bf35df5524245cdd96f5c52cf09b986 Gerrit-Change-Number: 38194 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[S] Change in pysim[master]: ts_51_011: replace encoding of EF.MSISDN with construct model
Attention is currently required from: dexter, laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38117?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: ts_51_011: replace encoding of EF.MSISDN with construct model .. ts_51_011: replace encoding of EF.MSISDN with construct model The encoding of EF.MSISDN is currently done with enc_msisdn and dec_msisdn from utils.py. Let's replace this with a construct based model, similar to the one we already use with EF.ADN Related: OS#5714 Change-Id: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a --- M pySim/ts_51_011.py 1 file changed, 17 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/17/38117/4 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38117?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a Gerrit-Change-Number: 38117 Gerrit-PatchSet: 4 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Attention: laforge Gerrit-Attention: dexter
[XS] Change in ...pyosmocom[master]: Allow caller to pass total_len in context of osmocom.construct.build_...
Attention is currently required from: laforge. dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/38187?usp=email ) Change subject: Allow caller to pass total_len in context of osmocom.construct.build_construct .. Patch Set 1: Code-Review+2 Verified+1 (2 comments) Patchset: PS1: I have tested it now, seems to work fine. File src/osmocom/construct.py: https://gerrit.osmocom.org/c/python/pyosmocom/+/38187/comment/e5872387_a4cabbf4?usp=email : PS1, Line 496: return c.build(decoded_data, **context) > This is probably the safest way in terms of API stability. […] Done -- To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/38187?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: python/pyosmocom Gerrit-Branch: master Gerrit-Change-Id: I7c4eab60274bcb0dd95e7bc21867a37ad70e4fc0 Gerrit-Change-Number: 38187 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Attention: laforge Gerrit-Comment-Date: Tue, 17 Sep 2024 13:37:36 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: dexter
[XS] Change in ...pyosmocom[master]: Allow caller to pass total_len in context of osmocom.construct.build_...
Attention is currently required from: laforge. dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/38187?usp=email ) Change subject: Allow caller to pass total_len in context of osmocom.construct.build_construct .. Patch Set 1: Code-Review+1 (1 comment) File src/osmocom/construct.py: https://gerrit.osmocom.org/c/python/pyosmocom/+/38187/comment/4c2ee6ed_974284c8?usp=email : PS1, Line 496: return c.build(decoded_data, **context) This is probably the safest way in terms of API stability. I solved it with an extra parameter to make it look more uniform to parse_construct: def build_construct(c, decoded_data, length: typing.Optional[int] = None, context: dict = {}): -- To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/38187?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: python/pyosmocom Gerrit-Branch: master Gerrit-Change-Id: I7c4eab60274bcb0dd95e7bc21867a37ad70e4fc0 Gerrit-Change-Number: 38187 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Attention: laforge Gerrit-Comment-Date: Tue, 17 Sep 2024 13:29:36 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
[XS] Change in ...pyosmocom[master]: osmocom.construct: Don't forget context when calling sizeof in Rpad
Attention is currently required from: dexter, laforge. dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/38186?usp=email ) Change subject: osmocom.construct: Don't forget context when calling sizeof in Rpad .. Patch Set 1: Code-Review+2 Verified+1 (1 comment) Patchset: PS1: Tested it and it seems to work as expected. -- To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/38186?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: python/pyosmocom Gerrit-Branch: master Gerrit-Change-Id: I97e4b8fffcccba0b9d0ecb18c76a2a30fd990fd2 Gerrit-Change-Number: 38186 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Attention: laforge Gerrit-Attention: dexter Gerrit-Comment-Date: Tue, 17 Sep 2024 13:26:07 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
[S] Change in pysim[master]: pySim-prog: generate Ki and OPc value using _digits() function
dexter has abandoned this change. ( https://gerrit.osmocom.org/c/pysim/+/38164?usp=email ) Change subject: pySim-prog: generate Ki and OPc value using _digits() function .. Abandoned unfortunately this is not secure, so we cannot solve the problem this way. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38164?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: abandon Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ib53d9d04a2073dafcca7cd21b0324bee5a23c540 Gerrit-Change-Number: 38164 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge
[XS] Change in pysim[master]: pySim-prog: add FIXME note to tell that writing hlr.db files is broken
Attention is currently required from: laforge. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38162?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified+1 by Jenkins Builder Change subject: pySim-prog: add FIXME note to tell that writing hlr.db files is broken .. pySim-prog: add FIXME note to tell that writing hlr.db files is broken The writing to osmo-hlr SQLITE files is broken since the SQLITE format has evolved over time. Let's add a FIXME note to tell that this needs fixing. Related: SYS#4120 Change-Id: I2b23f8bb9f3c2adeb48b010834057f5b4fb1e626 --- M pySim-prog.py 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/62/38162/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38162?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2b23f8bb9f3c2adeb48b010834057f5b4fb1e626 Gerrit-Change-Number: 38162 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge
[M] Change in pysim[master]: pySim-prog: rework documentation
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38166?usp=email ) Change subject: pySim-prog: rework documentation .. Patch Set 3: (1 comment) File docs/legacy.rst: https://gerrit.osmocom.org/c/pysim/+/38166/comment/bc2e1501_9f41473b?usp=email : PS1, Line 46: KI, OPc > Let's keep this one open until we made a decision. Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38166?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: I1d1a65154cea7fa77428b412fcf8c7b4cba629b1 Gerrit-Change-Number: 38166 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Tue, 17 Sep 2024 08:40:53 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Comment-In-Reply-To: dexter
[M] Change in pysim[master]: pySim-prog: rework documentation
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38166?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: pySim-prog: rework documentation .. pySim-prog: rework documentation The documentation for the classic pySim-prog application is a bit sparse. Let's rework it so that it includes the most important information that is required to operate pySim-prog. Let's also add a section about how the batch mode and CSV files are used. Related: SYS#4120 Change-Id: I1d1a65154cea7fa77428b412fcf8c7b4cba629b1 --- M docs/legacy.rst 1 file changed, 171 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/66/38166/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38166?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1d1a65154cea7fa77428b412fcf8c7b4cba629b1 Gerrit-Change-Number: 38166 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Attention: laforge
[XS] Change in pysim[master]: pySim-prog: add FIXME note to tell that writing hlr.db files is broken
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38162?usp=email ) Change subject: pySim-prog: add FIXME note to tell that writing hlr.db files is broken .. Patch Set 3: (1 comment) File pySim-prog.py: https://gerrit.osmocom.org/c/pysim/+/38162/comment/aab5c7fd_92eb1560?usp=email : PS2, Line 627: dabase > database Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38162?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: I2b23f8bb9f3c2adeb48b010834057f5b4fb1e626 Gerrit-Change-Number: 38162 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Tue, 17 Sep 2024 08:40:53 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge
[XS] Change in pysim[master]: pySim-prog: add FIXME note to tell that writing hlr.db files is broken
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38162?usp=email ) Change subject: pySim-prog: add FIXME note to tell that writing hlr.db files is broken .. Patch Set 2: (1 comment) Patchset: PS1: > I would actually even print a warning/error message in case somebody uses it. > […] Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38162?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: I2b23f8bb9f3c2adeb48b010834057f5b4fb1e626 Gerrit-Change-Number: 38162 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Mon, 16 Sep 2024 13:22:28 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge
[XS] Change in pysim[master]: pySim-prog: add FIXME note to tell that writing hlr.db files is broken
Attention is currently required from: dexter, laforge. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38162?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified+1 by Jenkins Builder Change subject: pySim-prog: add FIXME note to tell that writing hlr.db files is broken .. pySim-prog: add FIXME note to tell that writing hlr.db files is broken The writing to osmo-hlr SQLITE files is broken since the SQLITE format has evolved over time. Let's add a FIXME note to tell that this needs fixing. Related: SYS#4120 Change-Id: I2b23f8bb9f3c2adeb48b010834057f5b4fb1e626 --- M pySim-prog.py 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/62/38162/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38162?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2b23f8bb9f3c2adeb48b010834057f5b4fb1e626 Gerrit-Change-Number: 38162 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Attention: dexter
[M] Change in pysim[master]: pySim-prog: rework documentation
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38166?usp=email ) Change subject: pySim-prog: rework documentation .. Patch Set 2: (3 comments) File docs/legacy.rst: https://gerrit.osmocom.org/c/pysim/+/38166/comment/690b09de_c821043e?usp=email : PS1, Line 46: KI, OPc > depends on whether we merge the patch you just added to derive those from the > 'secret'... Let's keep this one open until we made a decision. https://gerrit.osmocom.org/c/pysim/+/38166/comment/2c40e4be_2e7f0c14?usp=email : PS1, Line 62: * supersim : * magicsim : * fakemagicsim : * grcardsim : * sysmosim-gr1 : * sysmoSIM-GR2 : * sysmoUSIM-SJS1 : * Fairwaves-SIM : * OpenCells-SIM : * Wavemobile-SIM : * sysmoISIM-SJA2 : * sysmoISIM-SJA5 : * gialersim > I guess those should be alphabetically sorted? Done https://gerrit.osmocom.org/c/pysim/+/38166/comment/f4682013_0dc218cf?usp=email : PS1, Line 110: , > extra comma should probably be removed Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38166?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: I1d1a65154cea7fa77428b412fcf8c7b4cba629b1 Gerrit-Change-Number: 38166 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Mon, 16 Sep 2024 11:55:25 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge
[S] Change in pysim[master]: pySim-prog: generate Ki and OPc value using _digits() function
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38164?usp=email ) Change subject: pySim-prog: generate Ki and OPc value using _digits() function .. Patch Set 2: (1 comment) Patchset: PS1: > the question is whether this wasn't intended as a security mechansim (keys > should always be random)? When we use the the _digits function, then we have the advantage that we can identify the entire dataset via the num parameter. Otherweise the dataset basically lacks the key material. Each programming cycle will generate new keys. However, I also see that there may be security concerns. I can not say how easy it is to restore the secret random seed from let's say a few IMSIs, which were also generated with the same seed. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38164?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: Ib53d9d04a2073dafcca7cd21b0324bee5a23c540 Gerrit-Change-Number: 38164 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Mon, 16 Sep 2024 11:55:25 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge
[M] Change in pysim[master]: pySim-prog: rework documentation
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38166?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: pySim-prog: rework documentation .. pySim-prog: rework documentation The documentation for the classic pySim-prog application is a bit sparse. Let's rework it so that it includes the most important information that is required to operate pySim-prog. Let's also add a section about how the batch mode and CSV files are used. Related: SYS#4120 Change-Id: I1d1a65154cea7fa77428b412fcf8c7b4cba629b1 --- M docs/legacy.rst 1 file changed, 169 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/66/38166/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38166?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1d1a65154cea7fa77428b412fcf8c7b4cba629b1 Gerrit-Change-Number: 38166 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Attention: laforge
[XS] Change in pysim[master]: pySim-prog: fix sourcecode formatting
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38161?usp=email ) Change subject: pySim-prog: fix sourcecode formatting .. pySim-prog: fix sourcecode formatting Change-Id: Ie4d4ec6d1752013fa8aa39912aa600c2b4afac74 --- M pySim-prog.py 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim-prog.py b/pySim-prog.py index b15a2dc..8d330cb 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -204,8 +204,7 @@ parser.error("CSV mode requires a CSV input file") elif options.source == 'cmdline': if ((options.imsi is None) or (options.iccid is None)) and (options.num is None): -parser.error( -"If either IMSI or ICCID isn't specified, num is required") +parser.error("If either IMSI or ICCID isn't specified, num is required") else: parser.error("Only `cmdline' and `csv' sources supported") -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38161?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie4d4ec6d1752013fa8aa39912aa600c2b4afac74 Gerrit-Change-Number: 38161 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: laforge
[XS] Change in pysim[master]: pySim-prog: fix sourcecode formatting
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38160?usp=email ) Change subject: pySim-prog: fix sourcecode formatting .. pySim-prog: fix sourcecode formatting Change-Id: I0e567a1a681891f33f170c5df50c691b20b6a978 --- M pySim-prog.py 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim-prog.py b/pySim-prog.py index 6d1deb1..b15a2dc 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -725,6 +725,7 @@ card.reset() cp = None + # Generate parameters if opts.source == 'cmdline': cp = gen_parameters(opts) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38160?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I0e567a1a681891f33f170c5df50c691b20b6a978 Gerrit-Change-Number: 38160 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: laforge
[XS] Change in pysim[master]: pySim-prog: treat --imsi and --iccid equally
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38163?usp=email ) Change subject: pySim-prog: treat --imsi and --iccid equally .. pySim-prog: treat --imsi and --iccid equally When using a CSV file, we can either read the IMSI or ICCID from the CSV file before programming. However, should also be possible to supply both manually to identify the CSV file entry using the --imsi or --iccid option. This currently only works for the IMSI, but not for the ICCID. Related: SYS#4120 Change-Id: Id3083c7794a7bd59501997f22afdc23bad3069e6 --- M pySim-prog.py 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/63/38163/1 diff --git a/pySim-prog.py b/pySim-prog.py index 2e299a6..3470c98 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -730,12 +730,12 @@ if opts.source == 'cmdline': cp = gen_parameters(opts) elif opts.source == 'csv': -imsi = None -iccid = None if opts.read_iccid: (res, _) = scc.read_binary(['3f00', '2fe2'], length=10) iccid = dec_iccid(res) -elif opts.read_imsi: +else: +iccid = opts.iccid +if opts.read_imsi: (res, _) = scc.read_binary(EF['IMSI']) imsi = swap_nibbles(res)[3:] else: -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38163?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Id3083c7794a7bd59501997f22afdc23bad3069e6 Gerrit-Change-Number: 38163 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[M] Change in pysim[master]: pySim-prog: rework documentation
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38166?usp=email ) Change subject: pySim-prog: rework documentation .. pySim-prog: rework documentation The documentation for the classic pySim-prog application is a bit sparse. Let's rework it so that it includes the most important information that is required to operate pySim-prog. Let's also add a section about how the batch mode and CSV files are used. Related: SYS#4120 Change-Id: I1d1a65154cea7fa77428b412fcf8c7b4cba629b1 --- M docs/legacy.rst 1 file changed, 169 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/66/38166/1 diff --git a/docs/legacy.rst b/docs/legacy.rst index 0961d17..e8b457e 100644 --- a/docs/legacy.rst +++ b/docs/legacy.rst @@ -1,20 +1,20 @@ -Legacy tools +Legacy tools *legacy tools* are the classic ``pySim-prog`` and ``pySim-read`` programs that existed long before ``pySim-shell``. -These days, you should primarily use ``pySim-shell`` instead of these +These days, it is highly recommended to use ``pySim-shell`` instead of these legacy tools. pySim-prog -- -``pySim-prog`` was the first part of the pySim software suite. It started as -a tool to write ICCID, IMSI, MSISDN and Ki to very simplistic SIM cards, and -was later extended to a variety of other cards. As the number of features supported -became no longer bearable to express with command-line arguments, `pySim-shell` was -created. +``pySim-prog`` was the first part of the pySim software suite. It started as a +tool to write ICCID, IMSI, MSISDN and Ki to very simplistic SIM cards, and was +later extended to a variety of other cards. As the number of features supported +became no longer bearable to express with command-line arguments, `pySim-shell` +was created. Basic use cases can still use `pySim-prog`. @@ -22,36 +22,180 @@ ~ Two modes are possible: - - one where you specify every parameter manually : + - one where the user specifies every parameter manually: -``./pySim-prog.py -n 26C3 -c 49 -x 262 -y 42 -i -s `` +This is the most common way to use ``pySim-prog``. The user will specify all relevent parameters directly via the +commandline. A typical commandline would look like this: + +``pySim-prog.py -p --ki --opc --mcc --mnc +--country --imsi --iccid --pin-adm `` + +Please note, that this already lengthy commandline still only contains the most common card parameters. For a full +list of all possible parameters, use the ``--help`` option of ``pySim-prog``. It is also important to mention +that not all parameters are supported by all card types. In particular, very simple programmable SIM cards will only +support a very basic set of parameters, such as MCC, MNC, IMSI and KI values. + + - one where the parameters are generated from a minimal set: + +It is also possible to leave the generation of certain parameters to ``pySim-prog``. This is in particular helpful +when a large number of cards should be initialized with randomly generated key material. + +``pySim-prog.py -p --mcc --mnc --secret --num --pin-adm `` + +The parameter ``--secret`` specifies a random seed that is used to generate the card individual parameters (IMSI, +KI, OPc, etc.). Since the secret is used to derive the key material, it should be kept private. It should also be +stored safely, in case cards have to be re-generated or the current card batch has to be extended later. Also the +secret should contain enough randomness to avoid conflicts. + +The parameter ``--num`` specifies a card individual number. This number will be manged into the random seed so that +it serves as an identifier for a particular set of randomly generated parameters. + +In the example above the parameters ``--mcc``, and ``--mnc`` are specified as well, since they identify the GSM +network where the cards should operate in, it is absolutely required to keep them static. ``pySim-prog`` will use +those parameters to generate a valid IMSI that thas the specified MCC/MNC at the beginning and a random tail. + +Specifying the card type: + +``pySim-prog`` usually autodetects the card type. In case auto detection does not work, it is possible to specify +the parameter ``--type``. The following card types are supported: + + * supersim + * magicsim + * fakemagicsim + * grcardsim + * sysmosim-gr1 + * sysmoSIM-GR2 + * sysmoUSIM-SJS1 + * Fairwaves-SIM + * OpenCells-SIM + * Wavemobile-SIM + * sysmoISIM-SJA2 + * sysmoISIM-SJA5 + * gialersim + +Specifying the card reader: + +It is most common to use ``pySim-prog`` together whith a PCSC reader. The PCSC reader number is specified via the +``--pcsc-device`` or ``-p`` option. However, other reader types (such as serial readers and modems) are supported. Use +th
[S] Change in pysim[master]: pySim-prog: generate Ki and OPc value using _digits() function
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38164?usp=email ) Change subject: pySim-prog: generate Ki and OPc value using _digits() function .. pySim-prog: generate Ki and OPc value using _digits() function The _digits() function is used in the context of auto generating the card individual data using a random seed (--secret) and a card number. (--num). Unfortunately the Ki and the OPc value are not covered by this mechanism, which means that even when the card number and the random seed remain static, the Ki and the OPc value are always changing. Related: SYS#4120 Change-Id: Ib53d9d04a2073dafcca7cd21b0324bee5a23c540 --- M pySim-prog.py 1 file changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/64/38164/1 diff --git a/pySim-prog.py b/pySim-prog.py index 3470c98..3ab644e 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -219,13 +219,21 @@ parser.error( "Can't give ICCID/IMSI for batch mode, need to use automatic parameters ! see --num and --secret for more information") +if options.secret is None: +options.secret = ''.join(random.choices(string.ascii_letters + string.digits, k=32)) +if options.num is None: +options.num = random.randrange(100) + return options -def _digits(secret, usage, len, num): +def _digits(secret, usage, len, num, hex = False): seed = secret + usage + '%d' % num s = hashlib.sha1(seed.encode()) -d = ''.join(['%02d' % x for x in s.digest()]) +if hex: +d = ''.join(['%02x' % x for x in s.digest()]) +else: +d = ''.join(['%02d' % x for x in s.digest()]) return d[0:len] @@ -431,7 +439,7 @@ if not re.match('^[0-9a-fA-F]{32}$', ki): raise ValueError('Ki needs to be 128 bits, in hex format') else: -ki = ''.join(['%02x' % random.randrange(0, 256) for i in range(16)]) +ki = _digits(opts.secret, 'ki', 32, opts.num, hex = True) # OPC (random) if opts.opc is not None: @@ -442,7 +450,7 @@ elif opts.op is not None: opc = derive_milenage_opc(ki, opts.op) else: -opc = ''.join(['%02x' % random.randrange(0, 256) for i in range(16)]) +opc = _digits(opts.secret, 'opc', 32, opts.num, hex = True) pin_adm = sanitize_pin_adm(opts.pin_adm, opts.pin_adm_hex) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38164?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ib53d9d04a2073dafcca7cd21b0324bee5a23c540 Gerrit-Change-Number: 38164 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[XS] Change in pysim[master]: pySim-prog: fix commandline parameter check for CSV mode
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38165?usp=email ) Change subject: pySim-prog: fix commandline parameter check for CSV mode .. pySim-prog: fix commandline parameter check for CSV mode The CSV mode needs one of the four additional parameters: --imsi --iccid, --read-iccid or --read-imsi. Also this check is unrelated to the batch mode. The CSV file parameter reading works independently from the batch mode. Related: SYS#4120 Change-Id: I1292afb85122ed2b7944d02ede69c928a453866f --- M pySim-prog.py 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/65/38165/1 diff --git a/pySim-prog.py b/pySim-prog.py index 3ab644e..b4221fb 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -197,9 +197,8 @@ return options if options.source == 'csv': -if (options.imsi is None) and (options.batch_mode is False) and (options.read_imsi is False) and (options.read_iccid is False): -parser.error( -"CSV mode needs either an IMSI, --read-imsi, --read-iccid or batch mode") +if (options.imsi is None) and (options.iccid is None) and (options.read_imsi is False) and (options.read_iccid is False): + parser.error("CSV mode requires one additional parameter: --read-iccid, --read-imsi, --iccid or --imsi") if options.read_csv is None: parser.error("CSV mode requires a CSV input file") elif options.source == 'cmdline': -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38165?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1292afb85122ed2b7944d02ede69c928a453866f Gerrit-Change-Number: 38165 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[XS] Change in pysim[master]: pySim-prog: add FIXME note to tell that writing hlr.db files is broken
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38162?usp=email ) Change subject: pySim-prog: add FIXME note to tell that writing hlr.db files is broken .. pySim-prog: add FIXME note to tell that writing hlr.db files is broken The writing to osmo-hlr SQLITE files is broken since the SQLITE format has evolved over time. Let's add a FIXME note to tell that this needs fixing. Related: SYS#4120 Change-Id: I2b23f8bb9f3c2adeb48b010834057f5b4fb1e626 --- M pySim-prog.py 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/62/38162/1 diff --git a/pySim-prog.py b/pySim-prog.py index 8d330cb..2e299a6 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -622,6 +622,7 @@ def write_params_hlr(opts, params): +# FIXME: The format of the osmo-hlr database has evolved, so that the code below will no longer work. # SQLite3 OpenBSC HLR if opts.write_hlr: import sqlite3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38162?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2b23f8bb9f3c2adeb48b010834057f5b4fb1e626 Gerrit-Change-Number: 38162 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[XS] Change in pysim[master]: pySim-prog: fix sourcecode formatting
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38161?usp=email ) Change subject: pySim-prog: fix sourcecode formatting .. pySim-prog: fix sourcecode formatting Change-Id: Ie4d4ec6d1752013fa8aa39912aa600c2b4afac74 --- M pySim-prog.py 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/61/38161/1 diff --git a/pySim-prog.py b/pySim-prog.py index b15a2dc..8d330cb 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -204,8 +204,7 @@ parser.error("CSV mode requires a CSV input file") elif options.source == 'cmdline': if ((options.imsi is None) or (options.iccid is None)) and (options.num is None): -parser.error( -"If either IMSI or ICCID isn't specified, num is required") +parser.error("If either IMSI or ICCID isn't specified, num is required") else: parser.error("Only `cmdline' and `csv' sources supported") -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38161?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie4d4ec6d1752013fa8aa39912aa600c2b4afac74 Gerrit-Change-Number: 38161 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[XS] Change in pysim[master]: pySim-prog: fix sourcecode formatting
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38160?usp=email ) Change subject: pySim-prog: fix sourcecode formatting .. pySim-prog: fix sourcecode formatting Change-Id: I0e567a1a681891f33f170c5df50c691b20b6a978 --- M pySim-prog.py 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/60/38160/1 diff --git a/pySim-prog.py b/pySim-prog.py index 6d1deb1..b15a2dc 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -725,6 +725,7 @@ card.reset() cp = None + # Generate parameters if opts.source == 'cmdline': cp = gen_parameters(opts) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38160?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I0e567a1a681891f33f170c5df50c691b20b6a978 Gerrit-Change-Number: 38160 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[S] Change in osmo-mgw[master]: Bump version: 1.13.0.3-227a → 1.13.1
Attention is currently required from: fixeria, osmith. dexter has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-mgw/+/38119?usp=email ) Change subject: Bump version: 1.13.0.3-227a → 1.13.1 .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/38119?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I8ebbaf6bff440cb233088f4bc226b80db0fd3922 Gerrit-Change-Number: 38119 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Attention: osmith Gerrit-Attention: fixeria Gerrit-Comment-Date: Thu, 12 Sep 2024 15:24:08 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes
[S] Change in pysim[master]: ts_51_011: replace encoding of EF.MSISDN with construct model
Attention is currently required from: laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38117?usp=email ) Change subject: ts_51_011: replace encoding of EF.MSISDN with construct model .. Patch Set 2: (1 comment) Patchset: PS1: > I think this is incompatible with earlier versions of pySim, right? So if > somebody has existing scr […] We can try that, but before we must resolve some issues with construct. (see ticket) I will keep this suggestion in mind. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38117?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: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a Gerrit-Change-Number: 38117 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Attention: laforge Gerrit-Comment-Date: Thu, 12 Sep 2024 15:21:42 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge
[S] Change in pysim[master]: ts_51_011: replace encoding of EF.MSISDN with construct model
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38117?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: ts_51_011: replace encoding of EF.MSISDN with construct model .. ts_51_011: replace encoding of EF.MSISDN with construct model The encoding of EF.MSISDN is currently done with enc_msisdn and dec_msisdn from utils.py. Let's replace this with a construct based model, similar to the one we already use with EF.ADN Related: OS#5714 Change-Id: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a --- M pySim/ts_51_011.py 1 file changed, 17 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/17/38117/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38117?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a Gerrit-Change-Number: 38117 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Attention: laforge
[S] Change in pysim[master]: ts_51_011: replace encoding of EF.MSISDN with construct model
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38117?usp=email ) Change subject: ts_51_011: replace encoding of EF.MSISDN with construct model .. ts_51_011: replace encoding of EF.MSISDN with construct model The encoding of EF.MSISDN is currently done with enc_msisdn and dec_msisdn from utils.py. Let's replace this with a construct based model, similar to the one we already use with EF.ADN Related: OS#5714 Change-Id: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a --- M pySim/ts_51_011.py 1 file changed, 16 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/17/38117/1 diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index c6720fe..401db9e 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -190,20 +190,24 @@ # TS 51.011 Section 10.5.5 class EF_MSISDN(LinFixedEF): +_test_decode = [ +( '04b12143f5ff', +{"alpha_id": "", "len_of_bcd": 4, "ton_npi": {"ext": True, "type_of_number": "network_specific", + "numbering_plan_id": "isdn_e164"}, + "dialing_nr": "12345f"}), +( '456967656e65205275666e756d6d65720891947172199181f3ff', +{"alpha_id": "Eigene Rufnummer", "len_of_bcd": 8, "ton_npi": {"ext": True, "type_of_number": "international", + "numbering_plan_id": "isdn_e164"}, + "dialing_nr": "4917279119183f"}), +] +_test_no_pad = True + def __init__(self, fid='6f40', sfid=None, name='EF.MSISDN', desc='MSISDN', **kwargs): super().__init__(fid, sfid=sfid, name=name, desc=desc, rec_len=(15, 34), leftpad=True, **kwargs) - -def _decode_record_hex(self, raw_hex_data, **kwargs): -return {'msisdn': dec_msisdn(raw_hex_data)} - -def _encode_record_hex(self, abstract, **kwargs): -msisdn = abstract['msisdn'] -if type(msisdn) == str: -encoded_msisdn = enc_msisdn(msisdn) -else: -encoded_msisdn = enc_msisdn(msisdn[2], msisdn[0], msisdn[1]) -alpha_identifier = (list(self.rec_len)[0] - len(encoded_msisdn) // 2) * "ff" -return alpha_identifier + encoded_msisdn +self._construct = Struct('alpha_id'/COptional(GsmOrUcs2Adapter(Rpad(Bytes(this._.total_len-14, + 'len_of_bcd'/Int8ub, + 'ton_npi'/TonNpi, + 'dialing_nr'/ExtendedBcdAdapter(BcdAdapter(Rpad(Bytes(10) # TS 51.011 Section 10.5.6 class EF_SMSP(LinFixedEF): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38117?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a Gerrit-Change-Number: 38117 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[S] Change in pysim[master]: utils: support alpha identifier in enc/dec_msisdn
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38118?usp=email ) Change subject: utils: support alpha identifier in enc/dec_msisdn .. utils: support alpha identifier in enc/dec_msisdn The functions enc_msisdn and dec_msisdn do not support encoding and decoding of the alpha identifier. Let's extend the functions accordingly. Related: OS#5714 Change-Id: I19ec8ba14551ec282fc0cc12ae2f6d528bdfc527 --- M pySim-read.py M pySim/utils.py M tests/unittests/test_utils.py 3 files changed, 33 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/18/38118/1 diff --git a/pySim-read.py b/pySim-read.py index aae5ad4..7af40b2 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -209,7 +209,7 @@ if sw == '9000': # (npi, ton, msisdn) = res if res is not None: -print("MSISDN (NPI=%d ToN=%d): %s" % res) +print("MSISDN (Alpha-Identifier=\"%s\" NPI=%d ToN=%d): %s" % res) else: print("MSISDN: Not available") else: diff --git a/pySim/utils.py b/pySim/utils.py index 05ad962..aa69a18 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -355,8 +355,9 @@ if len(ef_msisdn) < 14: raise ValueError("EF.MSISDN is too short") -# Skip optional Alpha Identifier +# Decode and skip optional Alpha Identifier xlen = len(ef_msisdn) - 14 +alpha_id = h2s(b2h(ef_msisdn[0:xlen])) msisdn_lhv = ef_msisdn[xlen:] # Parse the length (in bytes) of the BCD encoded number @@ -382,23 +383,28 @@ if ton == 0x01: msisdn = '+' + msisdn -return (npi, ton, msisdn) +return (alpha_id, npi, ton, msisdn) -def enc_msisdn(msisdn: str, npi: int = 0x01, ton: int = 0x03) -> Hexstr: +def enc_msisdn(msisdn: str, npi: int = 0x01, ton: int = 0x03, alpha_id: str = "", rec_len: int = 14) -> Hexstr: """ Encode MSISDN as LHV so it can be stored to EF.MSISDN. -See 3GPP TS 31.102, section 4.2.26 and 4.4.2.3. (The result -will not contain the optional Alpha Identifier at the beginning.) +See 3GPP TS 31.102, section 4.2.26 and 4.4.2.3. Default NPI / ToN values: - NPI: ISDN / telephony numbering plan (E.164 / E.163), - ToN: network specific or international number (if starts with '+'). + - alpha_id: human readable string that serves a label for the MSISDN + - rec_len: overall record length of the encoded result (>= 14) """ -# If no MSISDN is supplied then encode the file contents as all "ff" +# The resulting record length must have a length of at least 14 bytes. +if rec_len < 14: +raise ValueError("record length must be at least 14 bytess") + +# If no MSISDN is supplied then encode the record contents as all "ff" if msisdn in ["", "+"]: -return "ff" * 14 +return "ff" * rec_len # Leading '+' indicates International Number if msisdn[0] == '+': @@ -418,7 +424,14 @@ npi_ton = (npi & 0x0f) | ((ton & 0x07) << 4) | 0x80 bcd = rpad(swap_nibbles(msisdn), 10 * 2) # pad to 10 octets -return ('%02x' % bcd_len) + ('%02x' % npi_ton) + bcd + ("ff" * 2) +# Encode Alpha identifier +alpha_id_enc = s2h(alpha_id) +alpha_id_padding_len = rec_len - 14 - len(alpha_id) +if alpha_id_padding_len < 0: +raise ValueError("alpha_id too long, increase rec_len") +alpha_id_padding = "ff" * alpha_id_padding_len + +return alpha_id_enc + alpha_id_padding + ('%02x' % bcd_len) + ('%02x' % npi_ton) + bcd + ("ff" * 2) def sanitize_pin_adm(pin_adm, pin_adm_hex=None) -> Hexstr: diff --git a/tests/unittests/test_utils.py b/tests/unittests/test_utils.py index 0e61a61..ed22a73 100755 --- a/tests/unittests/test_utils.py +++ b/tests/unittests/test_utils.py @@ -157,20 +157,26 @@ self.assertEqual(msisdn_encoded, "") msisdn_encoded = utils.enc_msisdn("+", npi=0x01, ton=0x03) self.assertEqual(msisdn_encoded, "") + msisdn_encoded = utils.enc_msisdn("+4917279119183", npi=0x01, ton=0x01, alpha_id="Eigene Rufnummer", rec_len=34) + self.assertEqual(msisdn_encoded, "456967656e65205275666e756d6d65720891947172199181f3ff") def testDec_msisdn(self): msisdn_decoded = utils.dec_msisdn("0891946110325476f8ff") - self.assertEqual(msisdn_decoded, (1, 1,
[S] Change in docker-playground[master]: pcuif: increase PCUIF version number
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/38094?usp=email ) Change subject: pcuif: increase PCUIF version number .. pcuif: increase PCUIF version number The PCUIF version number had to be increased. This requires an update to the TTCN3 test configuration files and scripts. We also have to add a mechanism that sets the correct version numbers for "latest" Change-Id: I15f7150b51047379a557a1f8df6330eca597f2e3 Related: OS#6507 Depends: osmo-bsc.git Ie92f5833a80b06e78c6cec8f03f054e2e2625fad Depends: osmo-bts.git I5316d3b7cef416eb19bb256f4ccc1468b3efe1c6 Depends: osmo-pcu.git Id01966a1ee52d0f5e465dc2e0eaf85e5b7942f81 Depends: osmo-ttcn3-hacks.git Idce13d55fc5bdbf5b366e3a60d9b46aacfc701a9 --- M ttcn3-bts-test/generic/BTS_Tests.cfg M ttcn3-bts-test/jenkins.sh M ttcn3-bts-test/oml/BTS_Tests.cfg M ttcn3-bts-test/virtphy/BTS_Tests.cfg M ttcn3-pcu-test/PCU_Tests.cfg M ttcn3-pcu-test/jenkins-sns.sh M ttcn3-pcu-test/jenkins.sh M ttcn3-pcu-test/sns/PCU_Tests.cfg 8 files changed, 20 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/94/38094/1 diff --git a/ttcn3-bts-test/generic/BTS_Tests.cfg b/ttcn3-bts-test/generic/BTS_Tests.cfg index a87c99f..76fe6ce 100644 --- a/ttcn3-bts-test/generic/BTS_Tests.cfg +++ b/ttcn3-bts-test/generic/BTS_Tests.cfg @@ -18,7 +18,7 @@ BTS_Tests.mp_rtpem_bind_ip := "172.18.9.10" BTS_Tests.mp_osmuxem_bind_ip := "172.18.9.10" BTS_Tests.mp_l1_supports_gprs := true -PCUIF_Types.mp_pcuif_version := 12; +PCUIF_Types.mp_pcuif_version := 13; [MAIN_CONTROLLER] diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh index 40c00ac..b6660d6 100755 --- a/ttcn3-bts-test/jenkins.sh +++ b/ttcn3-bts-test/jenkins.sh @@ -127,7 +127,11 @@ set_pcuif_version() { if osmo_repo_is_2023q1; then - sed -i 's/PCUIF_Types.mp_pcuif_version := 12/PCUIF_Types.mp_pcuif_version := 10/g' $1 + sed -i 's/PCUIF_Types.mp_pcuif_version := 13/PCUIF_Types.mp_pcuif_version := 10/g' $1 + fi + + if osmo_repo_is_latest; then + sed -i 's/PCUIF_Types.mp_pcuif_version := 13/PCUIF_Types.mp_pcuif_version := 12/g' $1 fi } diff --git a/ttcn3-bts-test/oml/BTS_Tests.cfg b/ttcn3-bts-test/oml/BTS_Tests.cfg index 1311336..c424ef3 100644 --- a/ttcn3-bts-test/oml/BTS_Tests.cfg +++ b/ttcn3-bts-test/oml/BTS_Tests.cfg @@ -19,7 +19,7 @@ BTS_Tests_OML.mp_oml_ip := "172.18.9.10" BTS_Tests_OML.mp_oml_port := 3002 BTS_Tests_OML.mp_pcu_socket := "/data/unix/pcu_sock" -PCUIF_Types.mp_pcuif_version := 12; +PCUIF_Types.mp_pcuif_version := 13; [MAIN_CONTROLLER] diff --git a/ttcn3-bts-test/virtphy/BTS_Tests.cfg b/ttcn3-bts-test/virtphy/BTS_Tests.cfg index f71c524..a897873 100644 --- a/ttcn3-bts-test/virtphy/BTS_Tests.cfg +++ b/ttcn3-bts-test/virtphy/BTS_Tests.cfg @@ -17,7 +17,7 @@ BTS_Tests.mp_ctrl_ip := "172.18.9.20" BTS_Tests.mp_l1_supports_gprs := true BTS_Tests.mp_bts_trxc_port := -1; -PCUIF_Types.mp_pcuif_version := 12; +PCUIF_Types.mp_pcuif_version := 13; [MAIN_CONTROLLER] diff --git a/ttcn3-pcu-test/PCU_Tests.cfg b/ttcn3-pcu-test/PCU_Tests.cfg index 8404f79..f23a5e2 100644 --- a/ttcn3-pcu-test/PCU_Tests.cfg +++ b/ttcn3-pcu-test/PCU_Tests.cfg @@ -35,7 +35,7 @@ } } Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoPCU" -PCUIF_Types.mp_pcuif_version := 12 +PCUIF_Types.mp_pcuif_version := 13 [MAIN_CONTROLLER] diff --git a/ttcn3-pcu-test/jenkins-sns.sh b/ttcn3-pcu-test/jenkins-sns.sh index 4f55612..c464fc3 100755 --- a/ttcn3-pcu-test/jenkins-sns.sh +++ b/ttcn3-pcu-test/jenkins-sns.sh @@ -11,7 +11,11 @@ set_pcuif_version() { if osmo_repo_is_2023q1; then - sed -i 's/PCUIF_Types.mp_pcuif_version := 12/PCUIF_Types.mp_pcuif_version := 10/g' $1 + sed -i 's/PCUIF_Types.mp_pcuif_version := 13/PCUIF_Types.mp_pcuif_version := 10/g' $1 + fi + + if osmo_repo_is_latest; then + sed -i 's/PCUIF_Types.mp_pcuif_version := 13/PCUIF_Types.mp_pcuif_version := 12/g' $1 fi } diff --git a/ttcn3-pcu-test/jenkins.sh b/ttcn3-pcu-test/jenkins.sh index 6147a73..5c340ee 100755 --- a/ttcn3-pcu-test/jenkins.sh +++ b/ttcn3-pcu-test/jenkins.sh @@ -11,7 +11,11 @@ set_pcuif_version() { if osmo_repo_is_2023q1; then - sed -i 's/PCUIF_Types.mp_pcuif_version := 12/PCUIF_Types.mp_pcuif_version := 10/g' $1 + sed -i 's/PCUIF_Types.mp_pcuif_version := 13/PCUIF_Types.mp_pcuif_version := 10/g' $1 + fi + + if osmo_repo_is_latest; then + sed -i 's/PCUIF_Types.mp_pcuif_version := 13/PCUIF_Types.mp_pcuif_version := 12/g' $1 fi } diff --git a/ttcn3-pcu-test/sns/PCU_Tests.c
[S] Change in osmo-ttcn3-hacks[master]: pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38093?usp=email ) Change subject: pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior .. pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior The PCU sends a TXT_IND with the PCU_VERSION as first message after the socket connection is established. The BSC uses this messages to trigger some initialization (allocate BTS object inside the PCU, send SI to the PCU). Unfortunately the PCU will send the TXT_IND with the PCU_VERSION always with to BTS 0. The 0 in this case is a hardcoded fake BTS number (There is no BTS object allocated under this number in the PCU at this point). However, the BTS/BSC will then do the initialization process for BTS 0, which is incorrect. Let's fix this design error by introducing a broadcast BTS number, we then send the TXT_IND with the PCU_VERSION to that broadcast BTS number. The BTS/BSC will then do the initialization for all BTS objects it is aware of and use their correct BTS numbers. Related: OS#6507 Change-Id: Idce13d55fc5bdbf5b366e3a60d9b46aacfc701a9 Depends: osmo-bsc.git Ie92f5833a80b06e78c6cec8f03f054e2e2625fad Depends: osmo-bts.git I5316d3b7cef416eb19bb256f4ccc1468b3efe1c6 Depends: osmo-pcu.git Id01966a1ee52d0f5e465dc2e0eaf85e5b7942f81 Depends: docker-playground.git I15f7150b51047379a557a1f8df6330eca597f2e3 --- M bts/BTS_Tests.default M bts/BTS_Tests.ttcn M library/PCUIF_Types.ttcn M pcu/PCUIF_Components.ttcn M pcu/PCU_Tests.default M pcu/PCU_Tests_NS.ttcn 6 files changed, 32 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/93/38093/1 diff --git a/bts/BTS_Tests.default b/bts/BTS_Tests.default index 578aa36..b4a1cf1 100644 --- a/bts/BTS_Tests.default +++ b/bts/BTS_Tests.default @@ -29,7 +29,7 @@ [MODULE_PARAMETERS] Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoBTS"; -PCUIF_Types.mp_pcuif_version := 12; +PCUIF_Types.mp_pcuif_version := 13; # Configuration for each individual transceiver BTS_Tests.mp_trx_pars := { diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 07e824a..2023f79 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -5446,7 +5446,15 @@ f_init(); map(self:PCU, system:PCU); f_init_pcu(PCU, testcasename(), g_pcu_conn_id, g_pcu_last_info); - PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, testcasename(; + + if (mp_pcuif_version <= 12) { + /* Older PCU versions send the TXT indication with the PCU_VERSION to BTS 0, even though +* this message is technically not related to any specific BTS. */ + PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, testcasename(; + } else { + PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(PCU_IF_BTS_NR_BCAST, + PCU_VERSION, testcasename(; + } } /* PDCH activation via PCU socket; check for presence of RTS.req */ diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 7083884..7e39b5c 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -17,11 +17,11 @@ modulepar { /* PCUIF version supported by the IUT */ - PCUIF_Version mp_pcuif_version := 12; + PCUIF_Version mp_pcuif_version := 13; }; const charstring PCU_SOCK_DEFAULT := "/tmp/pcu_bts"; -type integer PCUIF_Version (11..12); /* supported versions */ +type integer PCUIF_Version (11..13); /* supported versions */ type enumerated PCUIF_MsgType { PCU_IF_MSG_DATA_REQ ('00'O), @@ -377,6 +377,8 @@ PCUIF_container container } with { variant "" }; +const uint8_t PCU_IF_BTS_NR_BCAST := 255; + type record PCUIF_Message { PCUIF_MsgType msg_type, uint8_t bts_nr, diff --git a/pcu/PCUIF_Components.ttcn b/pcu/PCUIF_Components.ttcn index 6e956ba..d77a26f 100644 --- a/pcu/PCUIF_Components.ttcn +++ b/pcu/PCUIF_Components.ttcn @@ -492,6 +492,7 @@ var BTS_PDTCH_Block pcu_msg_pdtch; var BTS_PTCCH_Block pcu_msg_ptcch; var BTS_CCCH_Block pcu_msg_rr; + var uint8_t pcu_bts_nr_rx; g_info_ind := info_ind; @@ -502,9 +503,17 @@ /* Wait until the PCU is connected */ PCUIF.receive(tr_RAW_PCU_EV(PCU_EV_CONNECT)); + if (mp_pcuif_version <= 12) { + /* Older PCU versions send the TXT indication with the PCU_VERSION to BTS 0, even though +* this message is technically not related to any specific BTS. */ + pcu_bts_nr_rx := 0; + } else { + pcu_bts_nr_rx := PCU_IF_BTS_NR_BCAST + } + alt { /* Wait for TXT.ind (PCU_VERSION) and respond with INFO.ind (SI13) */ - [] PCUIF.receive(tr_PCUIF_TXT_IND(bts_nr, PCU_VERSION, ?)) -> valu
[XS] Change in osmo-pcu[master]: pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/38092?usp=email ) Change subject: pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior .. pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior The PCU sends a TXT_IND with the PCU_VERSION as first message after the socket connection is established. The BTS/BSC uses those messages to trigger some initialization (allocate BTS object inside the PCU, send SI to the PCU). Unfortunately the PCU will send the TXT_IND with the PCU_VERSION always with to BTS 0. The 0 in this case is a hardcoded fake BTS number (There is no BTS object allocated under this number in the PCU at this point). However, the BTS/BSC will then do the initialization process for BTS 0, which works by chance for the BTS where the BTS number is always 0, in the case of the BSC there may be multiple BTS configured, so there may be arbitrary BTS numbers. Let's fix this design error by introducing a broadcast BTS number, we then send the TXT_IND with the PCU_VERSION to that broadcast BTS number. The BTS/BSC will then do the initialization for all BTSs with the correct BTS numbers it is aware of. Related: OS#6507 Change-Id: Id01966a1ee52d0f5e465dc2e0eaf85e5b7942f81 Depends: osmo-bsc.git Ie92f5833a80b06e78c6cec8f03f054e2e2625fad Depends: osmo-bts.git I5316d3b7cef416eb19bb256f4ccc1468b3efe1c6 Depends: osmo-ttcn3-hacks.git Idce13d55fc5bdbf5b366e3a60d9b46aacfc701a9 Depends: docker-playground.git I15f7150b51047379a557a1f8df6330eca597f2e3 --- M include/osmocom/pcu/pcuif_proto.h M src/pcu_l1_if.cpp 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/92/38092/1 diff --git a/include/osmocom/pcu/pcuif_proto.h b/include/osmocom/pcu/pcuif_proto.h index 33036c3..f2e7073 100644 --- a/include/osmocom/pcu/pcuif_proto.h +++ b/include/osmocom/pcu/pcuif_proto.h @@ -8,7 +8,7 @@ #define PCU_SOCK_DEFAULT "/tmp/pcu_bts" -#define PCU_IF_VERSION 0x0c +#define PCU_IF_VERSION 0x0d #define TXT_MAX_LEN128 /* msg_type */ @@ -298,6 +298,10 @@ bool confirm; } __attribute__((packed)); +/* reserved BTS number to indicate that the PCUIF INDICATION is not targeted to a + * specific BTS. (commonly used with TXT indications to transfer the PCU version number) */ +#define PCU_IF_BTS_NR_BCAST 0xff + struct gsm_pcu_if { /* context based information */ uint8_t msg_type; /* message type */ diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index fb44bd8..411b85b 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -124,7 +124,7 @@ struct gsm_pcu_if_txt_ind *txt; va_list ap; char *rep; - struct msgb *msg = pcu_msgb_alloc(PCU_IF_MSG_TXT_IND, 0); + struct msgb *msg = pcu_msgb_alloc(PCU_IF_MSG_TXT_IND, PCU_IF_BTS_NR_BCAST); if (!msg) return -ENOMEM; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/38092?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id01966a1ee52d0f5e465dc2e0eaf85e5b7942f81 Gerrit-Change-Number: 38092 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[M] Change in osmo-bsc[master]: pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38091?usp=email ) Change subject: pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior .. pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior The PCU sends a TXT_IND with the PCU_VERSION as first message after the socket connection is established. The BSC uses those messages to trigger some initialization (allocate BTS object inside the PCU, send SI to the PCU). Unfortunately the PCU will send the TXT_IND with the PCU_VERSION always with to BTS 0. The 0 in this case is a hardcoded fake BTS number (There is no BTS object allocated under this number in the PCU at this point). However, the BSC will then do the initialization process for BTS 0, which is incorrect. Let's fix this design error by introducing a broadcast BTS number, we then send the TXT_IND with the PCU_VERSION to that broadcast BTS number. The BSC will then do the initialization for all BTSs with BSC co located PCU under their correct BTS number. Related: OS#6507 Change-Id: Ie92f5833a80b06e78c6cec8f03f054e2e2625fad Depends: osmo-bts.git I5316d3b7cef416eb19bb256f4ccc1468b3efe1c6 Depends: osmo-pcu.git Id01966a1ee52d0f5e465dc2e0eaf85e5b7942f81 Depends: osmo-ttcn3-hacks.git Idce13d55fc5bdbf5b366e3a60d9b46aacfc701a9 Depends: docker-playground.git I15f7150b51047379a557a1f8df6330eca597f2e3 --- M include/osmocom/bsc/pcuif_proto.h M src/osmo-bsc/pcu_sock.c 2 files changed, 40 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/91/38091/1 diff --git a/include/osmocom/bsc/pcuif_proto.h b/include/osmocom/bsc/pcuif_proto.h index 33036c3..f2e7073 100644 --- a/include/osmocom/bsc/pcuif_proto.h +++ b/include/osmocom/bsc/pcuif_proto.h @@ -8,7 +8,7 @@ #define PCU_SOCK_DEFAULT "/tmp/pcu_bts" -#define PCU_IF_VERSION 0x0c +#define PCU_IF_VERSION 0x0d #define TXT_MAX_LEN128 /* msg_type */ @@ -298,6 +298,10 @@ bool confirm; } __attribute__((packed)); +/* reserved BTS number to indicate that the PCUIF INDICATION is not targeted to a + * specific BTS. (commonly used with TXT indications to transfer the PCU version number) */ +#define PCU_IF_BTS_NR_BCAST 0xff + struct gsm_pcu_if { /* context based information */ uint8_t msg_type; /* message type */ diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index 7b1aeae..3cac153 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -650,24 +650,41 @@ return 0; } -static int pcu_rx_txt_ind(struct gsm_bts *bts, +static int pcu_rx_txt_ind(struct gsm_network *net, struct gsm_bts *bts, const struct gsm_pcu_if_txt_ind *txt) { - int rc; + int rc = 0; switch (txt->type) { case PCU_VERSION: - LOG_BTS(bts, DPCU, LOGL_INFO, "OsmoPCU version %s connected\n", + LOGP(DPCU, LOGL_INFO, "OsmoPCU version %s connected\n", txt->text); - rc = pcu_tx_si_all(bts); + + /* we use the reception of the PCU_VERSION as a trigger to make the PCU available for +* all BTSs handled by this process (currently this is exactly one BTS, see FIXME notes) */ + llist_for_each_entry(bts, &net->bts_list, list) { + if (bsc_co_located_pcu(bts)) { + if (pcu_tx_si_all(bts) < 0) + rc = -EINVAL; + } + } if (rc < 0) return -EINVAL; break; case PCU_OML_ALERT: - LOG_BTS(bts, DPCU, LOGL_ERROR, "PCU external alarm: %s\n", txt->text); + if (bts) { + /* The PCU_OML_ALERT is directed to a spcific BTS object */ + LOG_BTS(bts, DPCU, LOGL_ERROR, "PCU external alarm: %s\n", txt->text); + } else { + /* The PCU_OML_ALERT is directed to all BTS objects (currently this is exactly one BTS, +* see FIXME notes) */ + llist_for_each_entry(bts, &net->bts_list, list) { + LOG_BTS(bts, DPCU, LOGL_ERROR, "PCU external alarm: %s\n", txt->text); + } + } break; default: - LOG_BTS(bts, DPCU, LOGL_ERROR, "Unknown TXT_IND type %u received\n", + LOGP(DPCU, LOGL_ERROR, "Unknown TXT_IND type %u received\n", txt->type); return -EINVAL; } @@ -684,25 +701,31 @@ return -EINVAL; \ } \ } while (0) + +#define ENSURE_BTS_OBJECT() \ + if ((bts = gsm_
[M] Change in osmo-bts[master]: pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/38090?usp=email ) Change subject: pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior .. pcuif: fix TXT_IND/PCU_VERSION BTS initialization behavior The PCU sends a TXT_IND with the PCU_VERSION as first message after the socket connection is established. The BTS uses those messages to trigger some initialization (allocate BTS object inside the PCU, send SI to the PCU). Unfortunately the PCU will send the TXT_IND with the PCU_VERSION always with to BTS 0. The 0 in this case is a hardcoded fake BTS number (There is no BTS object allocated under this number in the PCU at this point). The BTS will then do the initialization process for BTS 0, which is only correct by chance since osmo-bts currently only supports one BTS object with the number 0. Nevertheless it is incorrect to use the BTS number from the TXT_IND to resolve the BTS object. Let's fix this design error by introducing a broadcast BTS number, we then send the TXT_IND with the PCU_VERSION to that broadcast BTS number. The BTS will then do the initialization for all BTS objects it is aware of (BTS 0) Related: OS#6507 Change-Id: I5316d3b7cef416eb19bb256f4ccc1468b3efe1c6 Depends: osmo-bsc.git Ie92f5833a80b06e78c6cec8f03f054e2e2625fad Depends: osmo-pcu.git Id01966a1ee52d0f5e465dc2e0eaf85e5b7942f81 Depends: osmo-ttcn3-hacks.git Idce13d55fc5bdbf5b366e3a60d9b46aacfc701a9 Depends: docker-playground.git I15f7150b51047379a557a1f8df6330eca597f2e3 --- M include/osmo-bts/pcuif_proto.h M src/common/pcu_sock.c 2 files changed, 43 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/90/38090/1 diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h index 04936af..5e64980 100644 --- a/include/osmo-bts/pcuif_proto.h +++ b/include/osmo-bts/pcuif_proto.h @@ -7,7 +7,7 @@ #define PCU_SOCK_DEFAULT "/tmp/pcu_bts" -#define PCU_IF_VERSION 0x0c +#define PCU_IF_VERSION 0x0d #define TXT_MAX_LEN128 /* msg_type */ @@ -257,6 +257,10 @@ bool confirm; } __attribute__((packed)); +/* reserved BTS number to indicate that the PCUIF INDICATION is not targeted to a + * specific BTS. (commonly used with TXT indications to transfer the PCU version number) */ +#define PCU_IF_BTS_NR_BCAST 0xff + struct gsm_pcu_if { /* context based information */ uint8_t msg_type; /* message type */ diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 048e766..bf2e395 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -858,27 +858,40 @@ static int pcu_rx_txt_ind(struct gsm_bts *bts, struct gsm_pcu_if_txt_ind *txt) { - int rc; + int rc = 0; switch (txt->type) { case PCU_VERSION: LOGP(DPCU, LOGL_INFO, "OsmoPCU version %s connected\n", txt->text); - oml_tx_failure_event_rep(&bts->gprs.cell.mo, NM_SEVER_CEASED, OSMO_EVT_PCU_VERS, txt->text); - osmo_strlcpy(bts->pcu_version, txt->text, MAX_VERSION_LENGTH); - /* patch SI to advertise GPRS, *if* the SI sent by BSC said so */ - regenerate_si3_restoctets(bts); - regenerate_si4_restoctets(bts); + /* we use the reception of the PCU_VERSION as a trigger to make the PCU available for +* all BTSs handled by this process (currently this is exactly one BTS, see FIXME notes) */ + llist_for_each_entry(bts, &g_bts_sm->bts_list, list) { + oml_tx_failure_event_rep(&bts->gprs.cell.mo, NM_SEVER_CEASED, OSMO_EVT_PCU_VERS, txt->text); + osmo_strlcpy(bts->pcu_version, txt->text, MAX_VERSION_LENGTH); - rc = pcu_tx_si_all(bts); + /* patch SI to advertise GPRS, *if* the SI sent by BSC said so */ + regenerate_si3_restoctets(bts); + regenerate_si4_restoctets(bts); + + if (pcu_tx_si_all(bts) < 0) + rc = -EINVAL; + } if (rc < 0) - return -EINVAL; - + return rc; break; case PCU_OML_ALERT: - oml_tx_failure_event_rep(&bts->gprs.cell.mo, NM_SEVER_INDETERMINATE, OSMO_EVT_EXT_ALARM, -txt->text); + if (bts) { + /* The PCU_OML_ALERT is directed to a spcific BTS object */ + oml_tx_failure_event_rep(&bts->gprs.cell.mo, NM_SEVER_INDETERMINATE, OSMO_EVT_EXT_ALARM, txt->text); + } else { + /* The PCU_OML_ALERT is directed to
[XS] Change in pysim[master]: pySim.euicc: Add 'get_data sgp02_eid' in ADF.ECASD of M2M eUICC
Attention is currently required from: laforge. dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38048?usp=email ) Change subject: pySim.euicc: Add 'get_data sgp02_eid' in ADF.ECASD of M2M eUICC .. Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38048?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: I6cca6f75d268229244c90b3f1f88e26c89a2b4e0 Gerrit-Change-Number: 38048 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Attention: laforge Gerrit-Comment-Date: Tue, 10 Sep 2024 15:07:01 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes
[S] Change in pysim[master]: pySim.transport: Also trace card reset events in ApduTracer
Attention is currently required from: laforge. dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38055?usp=email ) Change subject: pySim.transport: Also trace card reset events in ApduTracer .. Patch Set 1: (1 comment) File pySim/transport/__init__.py: https://gerrit.osmocom.org/c/pysim/+/38055/comment/cc9cb772_a6b80d7e?usp=email : PS1, Line 126: def _reset_card(self): class DummySimLink(LinkBase) in pySim-trace.py still lacks this method. That is why the jenkins tests fail. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38055?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: Ia46b65124520eb2b8015dfa3f0a135b497668b92 Gerrit-Change-Number: 38055 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: dexter Gerrit-Attention: laforge Gerrit-Comment-Date: Tue, 10 Sep 2024 14:59:17 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No
[XS] Change in pysim[master]: pySim.commands: use _checksw during get_data() method
Attention is currently required from: laforge. dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38047?usp=email ) Change subject: pySim.commands: use _checksw during get_data() method .. Patch Set 3: Code-Review+2 (2 comments) Patchset: PS3: I have checked back the spec, the status word in the successful case is 9000, so everything looks correct. File pySim/commands.py: https://gerrit.osmocom.org/c/pysim/+/38047/comment/35250192_52cc1886?usp=email : PS3, Line 798: data, sw = self.send_apdu_checksw('%02xca%04x00' % (cla, tag)) maybe put a spec ref on top of the method? Something like: GPC_SPE_034 11.3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38047?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: Ic784bf0c30b22e5e83843aa6694e2706b4b2ac48 Gerrit-Change-Number: 38047 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Attention: laforge Gerrit-Comment-Date: Tue, 10 Sep 2024 14:50:17 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
[XS] Change in pysim[master]: pySim.app: Properly reset card state after reading EID
Attention is currently required from: laforge. dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38053?usp=email ) Change subject: pySim.app: Properly reset card state after reading EID .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38053?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: Ib23d3d5b58b456a25157a622c1010c81cd8b2213 Gerrit-Change-Number: 38053 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Attention: laforge Gerrit-Comment-Date: Tue, 10 Sep 2024 14:14:25 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes
[S] Change in pysim[master]: pySim.transport: Add support for generic stdout apdu tracer
Attention is currently required from: laforge. dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38054?usp=email ) Change subject: pySim.transport: Add support for generic stdout apdu tracer .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38054?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: I4bc3d2e023ba360f07f024d7b661a93322f87530 Gerrit-Change-Number: 38054 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Attention: laforge Gerrit-Comment-Date: Tue, 10 Sep 2024 14:12:52 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes
[XS] Change in libosmo-sccp[master]: coverity CID#216830
Attention is currently required from: neels, pespin. dexter has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/37995?usp=email ) Change subject: coverity CID#216830 .. Patch Set 3: (1 comment) Patchset: PS3: > As far as I can see, this looks ok to me. […] is not changed. (gerrit is buggy, when I write something in the box and decide to delete it again, it keeps the phrase anyway.) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/37995?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I3e6283154268f97a66b2b3f2ec8e3e9631424434 Gerrit-Change-Number: 37995 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Attention: pespin Gerrit-Comment-Date: Tue, 10 Sep 2024 14:06:29 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: dexter
[XS] Change in libosmo-sccp[master]: coverity CID#216830
Attention is currently required from: neels, pespin. dexter has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/37995?usp=email ) Change subject: coverity CID#216830 .. Patch Set 3: Code-Review+2 (1 comment) Patchset: PS3: As far as I can see, this looks ok to me. The meaningful behavior -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/37995?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I3e6283154268f97a66b2b3f2ec8e3e9631424434 Gerrit-Change-Number: 37995 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Attention: pespin Gerrit-Comment-Date: Tue, 10 Sep 2024 14:05:02 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
[M] Change in osmo-bsc[master]: Initial support for >256 BTS
Attention is currently required from: pespin. dexter has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38052?usp=email ) Change subject: Initial support for >256 BTS .. Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38052?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I607a68efeb5f4a50cce107d11d3c5126b7d8f81a Gerrit-Change-Number: 38052 Gerrit-PatchSet: 5 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Tue, 10 Sep 2024 13:59:52 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes
[M] Change in osmo-bsc[master]: Convert bts->depends_on from bitmask to llist
Attention is currently required from: laforge, pespin. dexter has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38050?usp=email ) Change subject: Convert bts->depends_on from bitmask to llist .. Patch Set 5: Code-Review+1 (2 comments) Patchset: PS5: I think lists are always nice Commit Message: https://gerrit.osmocom.org/c/osmo-bsc/+/38050/comment/2b19116f_36bf7e99?usp=email : PS5, Line 14: iprevious code allocated (N * 256/8) bytes, where N is the amount of bts iprevious? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38050?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I59e37d6baa020aeafdffc2c3538e988effd37620 Gerrit-Change-Number: 38050 Gerrit-PatchSet: 5 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Attention: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Tue, 10 Sep 2024 11:43:35 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
[M] Change in osmo-bsc[master]: Introduce typedef for bts->nr gsm_bts_nr_t
Attention is currently required from: pespin. dexter has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38051?usp=email ) Change subject: Introduce typedef for bts->nr gsm_bts_nr_t .. Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38051?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic0db2873fa9795024aba4399da495a0d8f7504b0 Gerrit-Change-Number: 38051 Gerrit-PatchSet: 5 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Tue, 10 Sep 2024 11:35:49 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes
[S] Change in osmo-bsc[master]: tests/vty: Validate allocating all possible BTS
Attention is currently required from: pespin. dexter has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38064?usp=email ) Change subject: tests/vty: Validate allocating all possible BTS .. Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38064?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I91603872de1287e8f69edd05a1f485e03909b3b4 Gerrit-Change-Number: 38064 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Tue, 10 Sep 2024 11:31:04 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes
[M] Change in osmo-bsc[master]: Initial support for >256 BTS
Attention is currently required from: pespin. dexter has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38052?usp=email ) Change subject: Initial support for >256 BTS .. Patch Set 4: Code-Review+1 (2 comments) Patchset: PS4: To me this patch looks reasonable. Did you test it? Maybe it makes sense to create a config with 256 (+ a few more) fake BTSs and then add one real BTS on top to see if actually works? File src/osmo-bsc/bts_ericsson_rbs2000.c: https://gerrit.osmocom.org/c/osmo-bsc/+/38052/comment/3887f9e8_b89d404a?usp=email : PS4, Line 200: } This looks fine to me. I also think that it is ok not to fix this right now. Maybe you should also mention that there is a limitation with the PCUIF interface as well? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38052?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I607a68efeb5f4a50cce107d11d3c5126b7d8f81a Gerrit-Change-Number: 38052 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Attention: pespin Gerrit-Comment-Date: Tue, 10 Sep 2024 11:27:55 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
[XL] Change in pysim[master]: Add testsuite for pySim-shell with real cards
Attention is currently required from: dexter, fixeria, laforge. Hello Jenkins Builder, fixeria, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/37819?usp=email to look at the new patch set (#19). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: Add testsuite for pySim-shell with real cards .. Add testsuite for pySim-shell with real cards This patch adds a comprehensive testsuite for pySim-shell. The testsuite is based on python's unittest framework in combination with pySim-shell scripts. Related: OS#6531 Change-Id: Ieae1330767a6e55e62437f5f988a0d33b727b5de --- M contrib/jenkins.sh A tests/pySim-shell_test/README.txt A tests/pySim-shell_test/__init__.py A tests/pySim-shell_test/ara_m/__init__.py A tests/pySim-shell_test/ara_m/adf_ara-m.cfg.ok A tests/pySim-shell_test/ara_m/adf_ara-m.script.ok A tests/pySim-shell_test/ara_m/adf_ara-m_empty.cfg.ok A tests/pySim-shell_test/ara_m/test.py A tests/pySim-shell_test/ara_m/test.script A tests/pySim-shell_test/authenticate/__init__.py A tests/pySim-shell_test/authenticate/auth_result.ok A tests/pySim-shell_test/authenticate/test.py A tests/pySim-shell_test/authenticate/test.script A tests/pySim-shell_test/card_data.csv A tests/pySim-shell_test/cardinfo/__init__.py A tests/pySim-shell_test/cardinfo/sysmoEUICC1-C2T-cardinfo.ok A tests/pySim-shell_test/cardinfo/sysmoISIM-SJA2-cardinfo.ok A tests/pySim-shell_test/cardinfo/sysmoISIM-SJA5-S17-cardinfo.ok A tests/pySim-shell_test/cardinfo/sysmoSIM-GR1-cardinfo.ok A tests/pySim-shell_test/cardinfo/test.py A tests/pySim-shell_test/cardinfo/test.template A tests/pySim-shell_test/chv/__init__.py A tests/pySim-shell_test/chv/test.py A tests/pySim-shell_test/chv/test_manage_csv.ok A tests/pySim-shell_test/chv/test_manage_csv.template A tests/pySim-shell_test/chv/test_manage_direct.ok A tests/pySim-shell_test/chv/test_manage_direct.template A tests/pySim-shell_test/chv/test_unblock_csv.ok A tests/pySim-shell_test/chv/test_unblock_csv.script A tests/pySim-shell_test/chv/test_unblock_direct.ok A tests/pySim-shell_test/chv/test_unblock_direct.template A tests/pySim-shell_test/config.yaml A tests/pySim-shell_test/euicc/__init__.py A tests/pySim-shell_test/euicc/enable_disable_profile.ok A tests/pySim-shell_test/euicc/euicc_info1.ok A tests/pySim-shell_test/euicc/euicc_info2.ok A tests/pySim-shell_test/euicc/get_eid.ok A tests/pySim-shell_test/euicc/get_profiles_info.ok A tests/pySim-shell_test/euicc/notifications.ok A tests/pySim-shell_test/euicc/set_nickname.ok A tests/pySim-shell_test/euicc/test.py A tests/pySim-shell_test/euicc/test_enable_disable_profile.script A tests/pySim-shell_test/euicc/test_gen_notif.script A tests/pySim-shell_test/euicc/test_get_eid.script A tests/pySim-shell_test/euicc/test_get_euicc_info.script A tests/pySim-shell_test/euicc/test_get_profiles_info.script A tests/pySim-shell_test/euicc/test_list_notif.script A tests/pySim-shell_test/euicc/test_rm_notif.template A tests/pySim-shell_test/euicc/test_set_nickname.script A tests/pySim-shell_test/export/__init__.py A tests/pySim-shell_test/export/export.script.ok A tests/pySim-shell_test/export/test.py A tests/pySim-shell_test/export/test.script A tests/pySim-shell_test/file_admin/__init__.py A tests/pySim-shell_test/file_admin/activate_deactivate_file.ok A tests/pySim-shell_test/file_admin/test.py A tests/pySim-shell_test/file_admin/test_activate_deactivate_file.script A tests/pySim-shell_test/file_admin/test_create_delete_df.script A tests/pySim-shell_test/file_admin/test_create_resize_delete_linear_fixed_ef.script A tests/pySim-shell_test/file_admin/test_create_resize_delete_transparent_ef.script A tests/pySim-shell_test/file_content/__init__.py A tests/pySim-shell_test/file_content/test.py A tests/pySim-shell_test/file_content/test_ber_tlv_uicc.ok A tests/pySim-shell_test/file_content/test_ber_tlv_uicc.script A tests/pySim-shell_test/file_content/test_binary_sim.ok A tests/pySim-shell_test/file_content/test_binary_sim.script A tests/pySim-shell_test/file_content/test_binary_uicc.ok A tests/pySim-shell_test/file_content/test_binary_uicc.script A tests/pySim-shell_test/file_content/test_record_sim.ok A tests/pySim-shell_test/file_content/test_record_sim.script A tests/pySim-shell_test/file_content/test_record_uicc.ok A tests/pySim-shell_test/file_content/test_record_uicc.script A tests/pySim-shell_test/file_specific/__init__.py A tests/pySim-shell_test/file_specific/ef_imsi.ok A tests/pySim-shell_test/file_specific/test.py A tests/pySim-shell_test/file_specific/test_ef_ist.ok A tests/pySim-shell_test/file_specific/test_ef_ist.script A tests/pySim-shell_test/file_specific/test_ef_ust.ok A tests/pySim-shell_test/file_specific/test_ef_ust.script A tests/pySim-shell_test/file_specific/test_update_imsi_plmn.script A tests/pySim-shell_test/fsdump/__init__.py A tests/pySim-
[XL] Change in pysim[master]: Add testsuite for pySim-shell with real cards
Attention is currently required from: dexter, fixeria, laforge. Hello Jenkins Builder, fixeria, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/37819?usp=email to look at the new patch set (#18). The following approvals got outdated and were removed: Code-Review+1 by fixeria, Code-Review+1 by laforge, Verified-1 by Jenkins Builder Change subject: Add testsuite for pySim-shell with real cards .. Add testsuite for pySim-shell with real cards This patch adds a comprehensive testsuite for pySim-shell. The testsuite is based on python's unittest framework in combination with pySim-shell scripts. Related: OS#6531 Change-Id: Ieae1330767a6e55e62437f5f988a0d33b727b5de --- M contrib/jenkins.sh A tests/pySim-shell_test/README.txt A tests/pySim-shell_test/__init__.py A tests/pySim-shell_test/ara_m/__init__.py A tests/pySim-shell_test/ara_m/adf_ara-m.cfg.ok A tests/pySim-shell_test/ara_m/adf_ara-m.script.ok A tests/pySim-shell_test/ara_m/adf_ara-m_empty.cfg.ok A tests/pySim-shell_test/ara_m/test.py A tests/pySim-shell_test/ara_m/test.script A tests/pySim-shell_test/authenticate/__init__.py A tests/pySim-shell_test/authenticate/auth_result.ok A tests/pySim-shell_test/authenticate/test.py A tests/pySim-shell_test/authenticate/test.script A tests/pySim-shell_test/card_data.csv A tests/pySim-shell_test/cardinfo/__init__.py A tests/pySim-shell_test/cardinfo/sysmoEUICC1-C2T-cardinfo.ok A tests/pySim-shell_test/cardinfo/sysmoISIM-SJA2-cardinfo.ok A tests/pySim-shell_test/cardinfo/sysmoISIM-SJA5-S17-cardinfo.ok A tests/pySim-shell_test/cardinfo/sysmoSIM-GR1-cardinfo.ok A tests/pySim-shell_test/cardinfo/test.py A tests/pySim-shell_test/cardinfo/test.template A tests/pySim-shell_test/chv/__init__.py A tests/pySim-shell_test/chv/test.py A tests/pySim-shell_test/chv/test_manage_csv.ok A tests/pySim-shell_test/chv/test_manage_csv.template A tests/pySim-shell_test/chv/test_manage_direct.ok A tests/pySim-shell_test/chv/test_manage_direct.template A tests/pySim-shell_test/chv/test_unblock_csv.ok A tests/pySim-shell_test/chv/test_unblock_csv.script A tests/pySim-shell_test/chv/test_unblock_direct.ok A tests/pySim-shell_test/chv/test_unblock_direct.template A tests/pySim-shell_test/config.yaml A tests/pySim-shell_test/euicc/__init__.py A tests/pySim-shell_test/euicc/enable_disable_profile.ok A tests/pySim-shell_test/euicc/euicc_info1.ok A tests/pySim-shell_test/euicc/euicc_info2.ok A tests/pySim-shell_test/euicc/get_eid.ok A tests/pySim-shell_test/euicc/get_profiles_info.ok A tests/pySim-shell_test/euicc/notifications.ok A tests/pySim-shell_test/euicc/set_nickname.ok A tests/pySim-shell_test/euicc/test.py A tests/pySim-shell_test/euicc/test_enable_disable_profile.script A tests/pySim-shell_test/euicc/test_gen_notif.script A tests/pySim-shell_test/euicc/test_get_eid.script A tests/pySim-shell_test/euicc/test_get_euicc_info.script A tests/pySim-shell_test/euicc/test_get_profiles_info.script A tests/pySim-shell_test/euicc/test_list_notif.script A tests/pySim-shell_test/euicc/test_rm_notif.template A tests/pySim-shell_test/euicc/test_set_nickname.script A tests/pySim-shell_test/export/__init__.py A tests/pySim-shell_test/export/export.script.ok A tests/pySim-shell_test/export/test.py A tests/pySim-shell_test/export/test.script A tests/pySim-shell_test/file_admin/__init__.py A tests/pySim-shell_test/file_admin/activate_deactivate_file.ok A tests/pySim-shell_test/file_admin/test.py A tests/pySim-shell_test/file_admin/test_activate_deactivate_file.script A tests/pySim-shell_test/file_admin/test_create_delete_df.script A tests/pySim-shell_test/file_admin/test_create_resize_delete_linear_fixed_ef.script A tests/pySim-shell_test/file_admin/test_create_resize_delete_transparent_ef.script A tests/pySim-shell_test/file_content/__init__.py A tests/pySim-shell_test/file_content/test.py A tests/pySim-shell_test/file_content/test_ber_tlv_uicc.ok A tests/pySim-shell_test/file_content/test_ber_tlv_uicc.script A tests/pySim-shell_test/file_content/test_binary_sim.ok A tests/pySim-shell_test/file_content/test_binary_sim.script A tests/pySim-shell_test/file_content/test_binary_uicc.ok A tests/pySim-shell_test/file_content/test_binary_uicc.script A tests/pySim-shell_test/file_content/test_record_sim.ok A tests/pySim-shell_test/file_content/test_record_sim.script A tests/pySim-shell_test/file_content/test_record_uicc.ok A tests/pySim-shell_test/file_content/test_record_uicc.script A tests/pySim-shell_test/file_specific/__init__.py A tests/pySim-shell_test/file_specific/ef_imsi.ok A tests/pySim-shell_test/file_specific/test.py A tests/pySim-shell_test/file_specific/test_ef_ist.ok A tests/pySim-shell_test/file_specific/test_ef_ist.script A tests/pySim-shell_test/file_specific/test_ef_ust.ok A tests/pySim-shell_test/file_specific/test_ef_ust.script A tests/pySim-shell_test/file_specific/test_update_imsi_plmn.script A t
[XS] Change in pysim[master]: suci-tutorial: put download links for specs to the front
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37948?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: suci-tutorial: put download links for specs to the front .. suci-tutorial: put download links for specs to the front The section Technical References has direct download links for the relevant specs. Then later in th Key Provisioning section another download link follows and another one is redundant. Let's put all download links into the Technical References section and then only use the spec numbers in the following. This way we have all download links in one location. Related: OS#6531 Change-Id: Ibcbc6bb5d836d32c381922a35afa3b73b5f90621 --- M docs/suci-tutorial.rst 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve diff --git a/docs/suci-tutorial.rst b/docs/suci-tutorial.rst index 60d2190..eb442d5 100644 --- a/docs/suci-tutorial.rst +++ b/docs/suci-tutorial.rst @@ -27,8 +27,9 @@ This guide covers the basic workflow of provisioning SIM cards with the 5G SUCI feature. For detailed information on the SUCI feature and file contents, the following documents are helpful: -* USIM files and structure: `TS 31.102 <https://www.etsi.org/deliver/etsi_ts/131100_131199/131102/16.06.00_60/ts_131102v160600p.pdf>`__ -* USIM tests (incl. file content examples) `TS 31.121 <https://www.etsi.org/deliver/etsi_ts/131100_131199/131121/16.01.00_60/ts_131121v160100p.pdf>`__ +* USIM files and structure: `3GPP TS 31.102 <https://www.etsi.org/deliver/etsi_ts/131100_131199/131102/16.06.00_60/ts_131102v160600p.pdf>`__ +* USIM tests (incl. file content examples): `3GPP TS 31.121 <https://www.etsi.org/deliver/etsi_ts/131100_131199/131121/16.01.00_60/ts_131121v160100p.pdf>`__ +* Test keys for SUCI calculation: `3GPP TS 33.501 <https://www.etsi.org/deliver/etsi_ts/133500_133599/133501/16.05.00_60/ts_133501v160500p.pdf>`__ For specific information on sysmocom SIM cards, refer to Section 9.1 of the `sysmoUSIM User Manual <https://www.sysmocom.de/manuals/sysmousim-manual.pdf>`__. @@ -83,8 +84,8 @@ missing Protection Scheme Identifier List data object tag 9000: -> {} -The following JSON config defines the testfile from `TS 31.121 <https://www.etsi.org/deliver/etsi_ts/131100_131199/131121/16.01.00_60/ts_131121v160100p.pdf>`__ Section 4.9.4 with -test keys from `TS 33.501 https://www.etsi.org/deliver/etsi_ts/133500_133599/133501/16.05.00_60/ts_133501v160500p.pdf>`__ Annex C.4. Highest priority (``0``) has a +The following JSON config defines the testfile from 3GPP TS 31.121, Section 4.9.4 with +test keys from 3GPP TS 33.501, Annex C.4. Highest priority (``0``) has a Profile-B (``identifier: 2``) key in key slot ``1``, which means the key with ``hnet_pubkey_identifier: 27``. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37948?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ibcbc6bb5d836d32c381922a35afa3b73b5f90621 Gerrit-Change-Number: 37948 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge
[XS] Change in pysim[master]: pySim-prog_test: supress stderr when probing for cards
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38007?usp=email ) Change subject: pySim-prog_test: supress stderr when probing for cards .. pySim-prog_test: supress stderr when probing for cards When probing for cards, the probing might fail in case the terminal is empty. This results into lengthy error log output that is not of interest. Related: OS#6532 Change-Id: I1d44f9458a05992d79b0152d3affcfeb783cccff --- M tests/pySim-prog_test/pySim-prog_test.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/07/38007/1 diff --git a/tests/pySim-prog_test/pySim-prog_test.sh b/tests/pySim-prog_test/pySim-prog_test.sh index 215ebee..9279c6c 100755 --- a/tests/pySim-prog_test/pySim-prog_test.sh +++ b/tests/pySim-prog_test/pySim-prog_test.sh @@ -119,7 +119,7 @@ # reader function probe_card { TERMINAL=$1 -RESULT=$(timeout 5 $PYSIM_PROG -p $TERMINAL -T | cut -d ":" -f 2 | tail -n 1 | xargs) +RESULT=$(timeout 5 $PYSIM_PROG -p $TERMINAL -T 2> /dev/null | cut -d ":" -f 2 | tail -n 1 | xargs) echo $RESULT } -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38007?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1d44f9458a05992d79b0152d3affcfeb783cccff Gerrit-Change-Number: 38007 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[XL] Change in pysim[master]: Add testsuite for pySim-shell with real cards
est/fsdump/fsdump.json.ok A tests/pySim-shell_test/fsdump/test.py A tests/pySim-shell_test/fsdump/test.script A tests/pySim-shell_test/get_identity/__init__.py A tests/pySim-shell_test/get_identity/test.py A tests/pySim-shell_test/get_identity/test.script A tests/pySim-shell_test/gp/__init__.py A tests/pySim-shell_test/gp/get_status_isd.ok A tests/pySim-shell_test/gp/key_information.ok A tests/pySim-shell_test/gp/test.py A tests/pySim-shell_test/gp/test_est_scp02_csv.script A tests/pySim-shell_test/gp/test_est_scp02_direct.template A tests/pySim-shell_test/gp/test_est_scp03_csv.script A tests/pySim-shell_test/gp/test_est_scp03_direct.template A tests/pySim-shell_test/gp/test_get_status.script A tests/pySim-shell_test/gp/test_put_delete_key.script A tests/pySim-shell_test/lchan/__init__.py A tests/pySim-shell_test/lchan/test.ok A tests/pySim-shell_test/lchan/test.py A tests/pySim-shell_test/lchan/test.script A tests/pySim-shell_test/navigate_fs/__init__.py A tests/pySim-shell_test/navigate_fs/checkpoints_sim.ok A tests/pySim-shell_test/navigate_fs/checkpoints_uicc.ok A tests/pySim-shell_test/navigate_fs/test.py A tests/pySim-shell_test/navigate_fs/test_sim.script A tests/pySim-shell_test/navigate_fs/test_uicc.script A tests/pySim-shell_test/utils.py A tests/pySim-shell_test/verify_adm/__init__.py A tests/pySim-shell_test/verify_adm/test.py A tests/pySim-shell_test/verify_adm/test_cmdline.script A tests/pySim-shell_test/verify_adm/test_csv.script A tests/pySim-shell_test/verify_adm/test_direct.template 113 files changed, 22,411 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/19/37819/16 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37819?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ieae1330767a6e55e62437f5f988a0d33b727b5de Gerrit-Change-Number: 37819 Gerrit-PatchSet: 16 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-Attention: laforge Gerrit-Attention: fixeria
[S] Change in pysim[master]: pySim-prog_test: tolerate empty reader slots
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38005?usp=email ) Change subject: pySim-prog_test: tolerate empty reader slots .. pySim-prog_test: tolerate empty reader slots The test currently expects all reader slots to be populated. This means the cards may plugged into a random order, but there may not be any empty slots in the system at all. This requirement is easy to meet when each card has its own single-slot USB PCSC-reader, but as soon as multislot readers are used there may be some empty slots. Related: OS#6532 Change-Id: I7ba1d1350b6998d65e90408184accdb212556a7c --- M tests/pySim-prog_test/pySim-prog_test.sh 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/05/38005/1 diff --git a/tests/pySim-prog_test/pySim-prog_test.sh b/tests/pySim-prog_test/pySim-prog_test.sh index 173822a..e768d8f 100755 --- a/tests/pySim-prog_test/pySim-prog_test.sh +++ b/tests/pySim-prog_test/pySim-prog_test.sh @@ -130,8 +130,8 @@ echo "Probing card in terminal #$I" CARD_NAME=$(probe_card $I) if [ -z "$CARD_NAME" ]; then - echo "Error: Unresponsive card!" - exit 1 + echo "Warning: Unresponsive card!" + continue fi echo "Card is of type: $CARD_NAME" gen_ok_file $I $CARD_NAME @@ -146,8 +146,8 @@ echo "Probing card in terminal #$I" CARD_NAME=$(probe_card $I) if [ -z "$CARD_NAME" ]; then - echo "Error: Unresponsive card!" - exit 1 + echo "Warning: Unresponsive card, trying next terminal..." + continue fi echo "Card is of type: $CARD_NAME" @@ -216,7 +216,8 @@ # then the number of cards will be used as reader number. gen_card_list if [ $N_TERMINALS -eq 0 ]; then -N_TERMINALS=$N_CARDS +N_TERMINALS=`pcsc_scan -r | sed '$!d' | cut -d ':' -f 1` +((N_TERMINALS++)) fi echo "Number of card terminals installed: $N_TERMINALS" echo "" -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38005?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I7ba1d1350b6998d65e90408184accdb212556a7c Gerrit-Change-Number: 38005 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[S] Change in pysim[master]: pySim-prog_test: tolerate missing .data files
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38006?usp=email ) Change subject: pySim-prog_test: tolerate missing .data files .. pySim-prog_test: tolerate missing .data files When the test detects a card, but does not find the .data faile for it, then it fails. This can be a problem in case we want to intentionally exclude a specific card model. Related: OS#6532 Change-Id: Iba196ada0076385de7bffcb157a85fda0a6c1852 --- M tests/pySim-prog_test/pySim-prog_test.sh 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/06/38006/1 diff --git a/tests/pySim-prog_test/pySim-prog_test.sh b/tests/pySim-prog_test/pySim-prog_test.sh index e768d8f..215ebee 100755 --- a/tests/pySim-prog_test/pySim-prog_test.sh +++ b/tests/pySim-prog_test/pySim-prog_test.sh @@ -134,6 +134,11 @@ continue fi echo "Card is of type: $CARD_NAME" + + if ! [ -r "$CARD_NAME.data" ]; then + echo "Warning: no .data file for this card, skipping..." + continue + fi gen_ok_file $I $CARD_NAME done } @@ -163,6 +168,11 @@ ADM_HEX="" ADM_OPT="-a" + if ! [ -r "$CARD_NAME.data" ]; then + echo "Warning: no .data file for this card, skipping..." + continue + fi + source "$CARD_NAME.data" if [ -n "$ADM_HEX" ]; then ADM_OPT="-A" -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38006?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Iba196ada0076385de7bffcb157a85fda0a6c1852 Gerrit-Change-Number: 38006 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[S] Change in pysim[master]: tests: move pySim-prog test and its data into a sub directory
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37823?usp=email ) ( 13 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: tests: move pySim-prog test and its data into a sub directory .. tests: move pySim-prog test and its data into a sub directory We currently have the shell script that performs the test in the tests directory and the related data in pysim-testdata directory. This is confusing, let's have evrything in a dedicated sub directory Change-Id: Ic995a7f600d164fc0be3c2eb8255dbe043429bea Related: OS#6531 --- M contrib/jenkins.sh R tests/pySim-prog_test/Fairwaves-SIM.data R tests/pySim-prog_test/Fairwaves-SIM.ok R tests/pySim-prog_test/Wavemobile-SIM.data R tests/pySim-prog_test/Wavemobile-SIM.ok R tests/pySim-prog_test/fakemagicsim.data R tests/pySim-prog_test/fakemagicsim.ok R tests/pySim-prog_test/pySim-prog_test.sh R tests/pySim-prog_test/sysmoISIM-SJA2.data R tests/pySim-prog_test/sysmoISIM-SJA2.ok R tests/pySim-prog_test/sysmoUSIM-SJS1.data R tests/pySim-prog_test/sysmoUSIM-SJS1.ok R tests/pySim-prog_test/sysmosim-gr1.data R tests/pySim-prog_test/sysmosim-gr1.ok 14 files changed, 7 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 099c338..b3d83dd 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -9,7 +9,7 @@ export PYTHONUNBUFFERED=1 -if [ ! -d "./pysim-testdata/" ] ; then +if [ ! -d "./tests/" ] ; then echo "###" echo "Please call from pySim-prog top directory" echo "###" @@ -29,10 +29,10 @@ # Execute automatically discovered unit tests first python -m unittest discover -v -s tests/unittests - # Run the test with physical cards - cd pysim-testdata - ../tests/pySim-prog_test.sh - cd .. + # Run pySim-prog integration tests (requires physical cards) + cd tests/pySim-prog_test/ +./pySim-prog_test.sh + cd ../../ # Run pySim-trace test tests/pySim-trace_test/pySim-trace_test.sh diff --git a/pysim-testdata/Fairwaves-SIM.data b/tests/pySim-prog_test/Fairwaves-SIM.data similarity index 100% rename from pysim-testdata/Fairwaves-SIM.data rename to tests/pySim-prog_test/Fairwaves-SIM.data diff --git a/pysim-testdata/Fairwaves-SIM.ok b/tests/pySim-prog_test/Fairwaves-SIM.ok similarity index 100% rename from pysim-testdata/Fairwaves-SIM.ok rename to tests/pySim-prog_test/Fairwaves-SIM.ok diff --git a/pysim-testdata/Wavemobile-SIM.data b/tests/pySim-prog_test/Wavemobile-SIM.data similarity index 100% rename from pysim-testdata/Wavemobile-SIM.data rename to tests/pySim-prog_test/Wavemobile-SIM.data diff --git a/pysim-testdata/Wavemobile-SIM.ok b/tests/pySim-prog_test/Wavemobile-SIM.ok similarity index 100% rename from pysim-testdata/Wavemobile-SIM.ok rename to tests/pySim-prog_test/Wavemobile-SIM.ok diff --git a/pysim-testdata/fakemagicsim.data b/tests/pySim-prog_test/fakemagicsim.data similarity index 100% rename from pysim-testdata/fakemagicsim.data rename to tests/pySim-prog_test/fakemagicsim.data diff --git a/pysim-testdata/fakemagicsim.ok b/tests/pySim-prog_test/fakemagicsim.ok similarity index 100% rename from pysim-testdata/fakemagicsim.ok rename to tests/pySim-prog_test/fakemagicsim.ok diff --git a/tests/pySim-prog_test.sh b/tests/pySim-prog_test/pySim-prog_test.sh similarity index 98% rename from tests/pySim-prog_test.sh rename to tests/pySim-prog_test/pySim-prog_test.sh index 28d9777..173822a 100755 --- a/tests/pySim-prog_test.sh +++ b/tests/pySim-prog_test/pySim-prog_test.sh @@ -20,8 +20,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -PYSIM_PROG=../pySim-prog.py -PYSIM_READ=../pySim-read.py +PYSIM_PROG=../../pySim-prog.py +PYSIM_READ=../../pySim-read.py TEMPFILE=temp.tmp PYTHON=python3 diff --git a/pysim-testdata/sysmoISIM-SJA2.data b/tests/pySim-prog_test/sysmoISIM-SJA2.data similarity index 100% rename from pysim-testdata/sysmoISIM-SJA2.data rename to tests/pySim-prog_test/sysmoISIM-SJA2.data diff --git a/pysim-testdata/sysmoISIM-SJA2.ok b/tests/pySim-prog_test/sysmoISIM-SJA2.ok similarity index 100% rename from pysim-testdata/sysmoISIM-SJA2.ok rename to tests/pySim-prog_test/sysmoISIM-SJA2.ok diff --git a/pysim-testdata/sysmoUSIM-SJS1.data b/tests/pySim-prog_test/sysmoUSIM-SJS1.data similarity index 100% rename from pysim-testdata/sysmoUSIM-SJS1.data rename to tests/pySim-prog_test/sysmoUSIM-SJS1.data diff --git a/pysim-testdata/sysmoUSIM-SJS1.ok b/tests/pySim-prog_test/sysmoUSIM-SJS1.ok similarity index 100% renam
[XL] Change in pysim[master]: Add testsuite for pySim-shell with real cards
Attention is currently required from: fixeria, laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37819?usp=email ) Change subject: Add testsuite for pySim-shell with real cards .. Patch Set 16: (2 comments) File tests/pySim-shell_test/ara_m/test.py: https://gerrit.osmocom.org/c/pysim/+/37819/comment/ee8e6d4a_ad5d6d31?usp=email : PS15, Line 27: self.setup(__file__) > Either what @lafo...@osmocom.org suggested, or adding a class variable should > work. […] Thanks for your hints. Now it works! https://gerrit.osmocom.org/c/pysim/+/37819/comment/11e90de4_e5f687d8?usp=email : PS15, Line 35: self.cleanup() > I would prefer a solution that does not have to define a class variable in > every derived class (test […] Done -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37819?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: Ieae1330767a6e55e62437f5f988a0d33b727b5de Gerrit-Change-Number: 37819 Gerrit-PatchSet: 16 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-Attention: laforge Gerrit-Attention: fixeria Gerrit-Comment-Date: Tue, 03 Sep 2024 15:13:22 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Comment-In-Reply-To: fixeria Comment-In-Reply-To: dexter
[M] Change in pysim[master]: pySim-shell: use upper case letters for positional arguments
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38008?usp=email ) Change subject: pySim-shell: use upper case letters for positional arguments .. pySim-shell: use upper case letters for positional arguments When we define positional arguments for the argument parser, we usually use upper case letters only. However, there are some code locations that use lower case letters. Let's translate those to capital letters to have a consistent appeariance. Related: OS#6531 Change-Id: Iec1ff8262bc6e9cf87c3cbf7b32fa5f753b7e574 --- M pySim-shell.py M pySim/filesystem.py M pySim/ts_102_221.py M pySim/ts_31_102.py M pySim/ts_51_011.py 5 files changed, 36 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/08/38008/1 diff --git a/pySim-shell.py b/pySim-shell.py index 52e78d4..e0e0812 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -346,8 +346,7 @@ return -1 bulk_script_parser = argparse.ArgumentParser() -bulk_script_parser.add_argument( -'script_path', help="path to the script file") +bulk_script_parser.add_argument('SCRIPT_PATH', help="path to the script file") bulk_script_parser.add_argument('--halt_on_error', help='stop card handling if an exeption occurs', action='store_true') bulk_script_parser.add_argument('--tries', type=int, default=2, @@ -363,7 +362,7 @@ """Run script on multiple cards (bulk provisioning)""" # Make sure that the script file exists and that it is readable. -if not os.access(opts.script_path, os.R_OK): +if not os.access(opts.SCRIPT_PATH, os.R_OK): self.poutput("Invalid script file!") return @@ -388,7 +387,7 @@ os.system(opts.pre_card_action) # process the card -rc = self._process_card(first, opts.script_path) +rc = self._process_card(first, opts.SCRIPT_PATH) if rc == 0: success_count = success_count + 1 self._show_success_sign() @@ -440,13 +439,13 @@ first = False echo_parser = argparse.ArgumentParser() -echo_parser.add_argument('string', help="string to echo on the shell", nargs='+') +echo_parser.add_argument('STRING', help="string to echo on the shell", nargs='+') @cmd2.with_argparser(echo_parser) @cmd2.with_category(CUSTOM_CATEGORY) def do_echo(self, opts): """Echo (print) a string on the console""" -self.poutput(' '.join(opts.string)) +self.poutput(' '.join(opts.STRING)) @cmd2.with_category(CUSTOM_CATEGORY) def do_version(self, opts): diff --git a/pySim/filesystem.py b/pySim/filesystem.py index b166bc2..df6b59e 100644 --- a/pySim/filesystem.py +++ b/pySim/filesystem.py @@ -626,19 +626,19 @@ upd_bin_parser = argparse.ArgumentParser() upd_bin_parser.add_argument( '--offset', type=auto_uint16, default=0, help='Byte offset for start of read') -upd_bin_parser.add_argument('data', type=is_hexstr, help='Data bytes (hex format) to write') +upd_bin_parser.add_argument('DATA', type=is_hexstr, help='Data bytes (hex format) to write') @cmd2.with_argparser(upd_bin_parser) def do_update_binary(self, opts): """Update (Write) data of a transparent EF""" -(data, _sw) = self._cmd.lchan.update_binary(opts.data, opts.offset) +(data, _sw) = self._cmd.lchan.update_binary(opts.DATA, opts.offset) if data: self._cmd.poutput(data) upd_bin_dec_parser = argparse.ArgumentParser() upd_bin_dec_parser.add_argument('--json-path', type=str, help='JSON path to modify specific element of file only') -upd_bin_dec_parser.add_argument('data', help='Abstract data (JSON format) to write') +upd_bin_dec_parser.add_argument('DATA', help='Abstract data (JSON format) to write') @cmd2.with_argparser(upd_bin_dec_parser) def do_update_binary_decoded(self, opts): @@ -646,9 +646,9 @@ if opts.json_path: (data_json, _sw) = self._cmd.lchan.read_binary_dec() js_path_modify(data_json, opts.json_path, - json.loads(opts.data)) + json.loads(opts.DATA)) else: -data_json =
[XS] Change in pysim[master]: tests: move pySim-trace test and its data into a sub directory
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37822?usp=email ) ( 7 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: tests: move pySim-trace test and its data into a sub directory .. tests: move pySim-trace test and its data into a sub directory We currently have the test data for pySim-trace in pysim-testdata. This means we mix the test data with the data from our original pySim integration tests. This is very confusing. Let's put the test data and the testcase for pySim-trace into a dedicated sub directory. Change-Id: I565b4268a05c1a1334b5e7d3fbcd9ef2ef0f0c4c Related: OS#6531 --- M contrib/jenkins.sh R tests/pySim-trace_test/pySim-trace_test.sh R tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng R tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok 4 files changed, 6 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 3dabdd7..099c338 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -32,7 +32,10 @@ # Run the test with physical cards cd pysim-testdata ../tests/pySim-prog_test.sh - ../tests/pySim-trace_test.sh + cd .. + + # Run pySim-trace test + tests/pySim-trace_test/pySim-trace_test.sh ;; "distcheck") virtualenv -p python3 venv --system-site-packages diff --git a/tests/pySim-trace_test.sh b/tests/pySim-trace_test/pySim-trace_test.sh similarity index 95% rename from tests/pySim-trace_test.sh rename to tests/pySim-trace_test/pySim-trace_test.sh index 3e200c3..ec23ad3 100755 --- a/tests/pySim-trace_test.sh +++ b/tests/pySim-trace_test/pySim-trace_test.sh @@ -20,8 +20,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -PYSIM_TRACE=../pySim-trace.py -GSMTAP_TRACE=pySim-trace_test_gsmtap.pcapng +PYSIM_TRACE=./pySim-trace.py +GSMTAP_TRACE=./tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng TEMPFILE=temp.tmp export PYSIM_INTEGRATION_TEST=1 diff --git a/pysim-testdata/pySim-trace_test_gsmtap.pcapng b/tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng similarity index 100% rename from pysim-testdata/pySim-trace_test_gsmtap.pcapng rename to tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng Binary files differ diff --git a/pysim-testdata/pySim-trace_test_gsmtap.pcapng.ok b/tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok similarity index 100% rename from pysim-testdata/pySim-trace_test_gsmtap.pcapng.ok rename to tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37822?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I565b4268a05c1a1334b5e7d3fbcd9ef2ef0f0c4c Gerrit-Change-Number: 37822 Gerrit-PatchSet: 9 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: laforge Gerrit-CC: fixeria
[XS] Change in pysim[master]: pySim-shell: do not display 'AIDs:' when there are none
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38000?usp=email ) Change subject: pySim-shell: do not display 'AIDs:' when there are none .. pySim-shell: do not display 'AIDs:' when there are none The command cardinfo also displays the AIDs of the card applications. However, on classic GSM sim cards there are no applications. In this case cardinfo will still display the string 'AIDs:', but it will of course not list any AIDs under this string. Related: OS#6531 Change-Id: Ifb111ce43fdebe85d30857dfc61ab570380b68d1 --- M pySim-shell.py 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/00/38000/1 diff --git a/pySim-shell.py b/pySim-shell.py index 02ca217..3a6b053 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -824,8 +824,9 @@ self._cmd.poutput(" ICCID: %s" % self._cmd.rs.identity['ICCID']) self._cmd.poutput(" Class-Byte: %s" % self._cmd.lchan.scc.cla_byte) self._cmd.poutput(" Select-Ctrl: %s" % self._cmd.lchan.scc.sel_ctrl) -self._cmd.poutput(" AIDs:") -for a in self._cmd.rs.mf.applications: +if len(self._cmd.rs.mf.applications) > 0: +self._cmd.poutput(" AIDs:") +for a in self._cmd.rs.mf.applications: self._cmd.poutput(" %s" % a) @with_default_category('ISO7816 Commands') -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38000?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ifb111ce43fdebe85d30857dfc61ab570380b68d1 Gerrit-Change-Number: 38000 Gerrit-PatchSet: 1 Gerrit-Owner: dexter
[XS] Change in pysim[master]: suci-tutorial: put download links for specs to the front
Attention is currently required from: dexter. Hello Jenkins Builder, fixeria, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/37948?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: suci-tutorial: put download links for specs to the front .. suci-tutorial: put download links for specs to the front The section Technical References has direct download links for the relevant specs. Then later in th Key Provisioning section another download link follows and another one is redundant. Let's put all download links into the Technical References section and then only use the spec numbers in the following. This way we have all download links in one location. Related: OS#6531 Change-Id: Ibcbc6bb5d836d32c381922a35afa3b73b5f90621 --- M docs/suci-tutorial.rst 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/48/37948/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37948?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ibcbc6bb5d836d32c381922a35afa3b73b5f90621 Gerrit-Change-Number: 37948 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Attention: dexter
[S] Change in pysim[master]: pySim-shell: print cardinfo hexstrings in lowercase
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38001?usp=email ) Change subject: pySim-shell: print cardinfo hexstrings in lowercase .. pySim-shell: print cardinfo hexstrings in lowercase To ensure consistency, let's print the cardinfo hexstrings in lowercase only. Related: OS#6531 Change-Id: Ia6a8bd0e700c7fd933fb6c1b1050ed9494462d60 --- M pySim-shell.py 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/01/38001/1 diff --git a/pySim-shell.py b/pySim-shell.py index 3a6b053..52e78d4 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -817,17 +817,17 @@ """Display information about the currently inserted card""" self._cmd.poutput("Card info:") self._cmd.poutput(" Name: %s" % self._cmd.card.name) -self._cmd.poutput(" ATR: %s" % self._cmd.rs.identity['ATR']) +self._cmd.poutput(" ATR: %s" % self._cmd.rs.identity['ATR'].lower()) eid = self._cmd.rs.identity.get('EID', None) if eid: -self._cmd.poutput(" EID: %s" % eid) -self._cmd.poutput(" ICCID: %s" % self._cmd.rs.identity['ICCID']) -self._cmd.poutput(" Class-Byte: %s" % self._cmd.lchan.scc.cla_byte) -self._cmd.poutput(" Select-Ctrl: %s" % self._cmd.lchan.scc.sel_ctrl) +self._cmd.poutput(" EID: %s" % eid.lower()) +self._cmd.poutput(" ICCID: %s" % self._cmd.rs.identity['ICCID'].lower()) +self._cmd.poutput(" Class-Byte: %s" % self._cmd.lchan.scc.cla_byte.lower()) +self._cmd.poutput(" Select-Ctrl: %s" % self._cmd.lchan.scc.sel_ctrl.lower()) if len(self._cmd.rs.mf.applications) > 0: self._cmd.poutput(" AIDs:") for a in self._cmd.rs.mf.applications: -self._cmd.poutput(" %s" % a) +self._cmd.poutput(" %s" % a.lower()) @with_default_category('ISO7816 Commands') class Iso7816Commands(CommandSet): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38001?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ia6a8bd0e700c7fd933fb6c1b1050ed9494462d60 Gerrit-Change-Number: 38001 Gerrit-PatchSet: 1 Gerrit-Owner: dexter