aboutsummaryrefslogtreecommitdiffstats
path: root/pysim-testdata
AgeCommit message (Collapse)AuthorFilesLines
2022-01-22add missing bit definition for NG-RAN in xAcTBjoern Riemer4-9/+9
when encoding the AcT value bit 11 is correctly set when NG-RAN is present in the string representation, however the decoding of bit 11 was missing. Adds tests for the decoder as well. Change-Id: I910df28c4c59ec94cce9603377786325f6d8c1a3
2021-05-23pySim-read: adjust meaning of HPLMN/OPLMN flags in EF_SPNRobert Falkenberg6-12/+12
The updated wording better reflects the actual meaning of a set or unset flag, especially as OPLMN is inverted. Change-Id: I65c6f0e9bc1a12a4a74c4274eebb8e612296888f
2021-05-03ts_51_011, utils: fix Access Technology Identifier codingPhilipp Maier4-9/+9
When the Access Technology Identifier encoder sets the bits for E-UTRAN it does not respect that bit "100" is also a valid bit combination that encodes E-UTRAN WB-S1 and E-UTRAN NB-S1. Lets encode this bit combination if the user is just specifying "E-UTRAN" without further spefication of WB or NB. The decoder only looks at bit 14 and decodes "1xx" always to "E-UTRAN". This is not specific enough. Lets make sure that the decoder is complementary to the encoder. Change-Id: Ibfe8883a05f9ad6988d8e212cb9a598229954296 Related: OS#4963
2021-05-03utils: fix dec_xplmn_w_act() and format_xplmn_w_act()Philipp Maier4-9/+9
The function dec_xplmn_w_act(), which is also used by format_xplmn_w_act() is using integer numbers as MCC/MNC representation. This causes various problems since the information about leading zeros gets lost. Change-Id: I57f7dff80f48071ef9a3732ae1088882b127a6d4
2021-04-21pysim-testdata/sysmoISIM-SJA2: change card in test rigPhilipp Maier2-6/+4
The sysmo-usim-sja2 which is currently used for testing somewhat old. In order to have a defined state here lets exchange it with a new card. This will also ensure that we have a card with the most recent card profile in the tester. Change-Id: Ife13823d0b0a16b1f327dd882f91d0c95af65e43
2021-04-13Use construct for EF_AD in pySim-{shell, prog, read}.py, cards.pyRobert Falkenberg6-6/+6
Also serves as example for RFU (reserved for future use) fields which should not always be reset to zero in case they have been set on the uSIM for some reason. See pySim/ts_51_011.py, class EF_AD. * Add definitions for RFU {Flag, Bits, Byte, Bytes} * Use IntEnum for OP_MODE (convenient auto completion) * Remove obsolete definitions and imports * Update test results for all SIMs (opmode strings are shortened) Change-Id: I65e0a426f80a619fec38856a30e590f0e726b554
2021-04-10Wavemobile: adjust test expectations about binary EF.AD contentHarald Welte1-1/+1
Change-Id: Ib6ebe063a4d0d90b1cdc9bc7ec0773cef8d87fbc
2021-04-07SysmoISIM-SJA2: Add option to set Service Provider Name (SPN)Robert Falkenberg1-3/+3
Same implementation as for sysmoUSIM-SJS1 Change-Id: I3a9dd2fe85126584758ea4cfa127f9cd14ab0c7d
2021-01-05pySim-read.py: Enable reading of UICC IARI from ISIMSupreeth Herle1-0/+10
Change-Id: Iba222421f2fcc2b9b12605608bf640f7627904d0
2021-01-05sysmoISIM-SJA2: Enable programming of EF.MSISDNSupreeth Herle1-1/+1
Change-Id: I8ed27142009a50a1cc31a9f2e0e854a53add6e89
2021-01-05pySim-read.py: Enable reading of EF.IMPU from ISIMSupreeth Herle1-0/+10
IMS public user identity (IMPU) As per TS1.103, this EF contains one or more records, with each record able to hold a public SIP Identity (SIP URI) of the user. EF.IMPI consist of URI TLV data object values see IETF RFC 3261. The URI shall be encoded to an octet string according to UTF-8 encoding rules as specified in IETF RFC 3629 Reading of EF.IMPU is achieved by first selecting the ISIM application using its AID. This is followed by selecting EF.IMPU with File ID - 6f04 in ADF.ISIM Change-Id: Icf78a564aeaf4254658d3b018ff57dfc4b987e6f
2021-01-05pySim-read.py: Enable reading of EF.IMPI from ISIMSupreeth Herle1-0/+1
IMS private user identity (IMPI) As per TS1.103 version 14.2.0, this EF contains the private user identity of the user. EF.IMPI consist of NAI TLV Data object.The NAI shall be encoded to an octet string according to UTF-8 encoding rules as specified in IETF RFC 3629. Reading of EF.IMPI is achieved by first selecting the ISIM application using its AID. This is followed by selecting EF.IMPI with File ID - 6f02 in ADF.ISIM Change-Id: I8d8e76e3f6b9ca7a0be262fee99cd5a397edbefa
2021-01-05pySim-read.py: Enable reading of Home Network Domain Name from ISIMSupreeth Herle1-0/+1
As per TS1.103 version 14.2.0, this EF contains the home operator's network domain name. The Home Network Domain Name, i.e. FQDN shall be encoded to an octet string according to UTF-8 encoding rules as specified in IETF RFC 3629 Change-Id: Ia3c68c717d105e10d52a8e9d170480da2ad7d65a
2021-01-05pySim-read.py: Enabled reading P-CSCF address from ISIMSupreeth Herle1-0/+10
As per 3GPP TS 31.103 version 14.2.0 Release 14, this EF can found under ADF.ISIM at File Id 6f09. This EF contains one or more Proxy Call Session Control Function addresses. The first record in the EF shall be considered to be of the highest priority If ISIM service n°1 and/or service n°5 is available, this file shall be present. Change-Id: I7a701212c84d3dc5d4c8ccbcf638c97ceda33654
2021-01-05utils.py: Bugfix for parsing non-programmed EFePDGSelectionherlesupreeth1-2/+3
Change-Id: I3a16af785d8ae9ea8730771367bba2d50690b414
2020-10-21pySim-read.py: Enable parsing of EF.ePDGSelection in USIMSupreeth Herle1-0/+6
As per TS 31.102, this EF can found under ADF.USIM at File Id 6ff4. Also, if service n°106 and service n°107 are available, this file shall be present. Change-Id: I98916e6f5c9791aff63c18a3b16bdfb8ae9b2d36
2020-10-03Move reading of ePDG Id to generic USIM classherlesupreeth3-3/+0
Change-Id: I716acb994430db3d4e56fea072f8dc2cebeaba84
2020-09-20pySim-read.py: decode contents of EF.AD (Administrative data)Vadim Yanitskiy6-6/+18
Change-Id: I938667bdf99d238eefac205d6dd70db1d714d842
2020-09-16Update UST table as per the latest 3GPP TS 31.102 specificationSupreeth Herle1-0/+4
Change-Id: I07e250f0ada325a23cd58a33f162b0faa01d272b
2020-09-15sysmo-isim-sja2: fix test expectationsPhilipp Maier2-8/+8
The card in the automatic test setup had been replaced, change the ADM pin and the ICCID so that it matches the new card. Also the new card does not feature an MSISDN file and the formatting of the EHPLMN file changed in the output of pySim-Read.py Change-Id: I413f4b8267e01727c59ad135881b3a2ed723ff5f
2020-08-28Add support for ADF_USIM/EF_EHPLMNHarald Welte1-0/+6
If the EF.EHPLMN exists, it contains the "Equivalent Home PLMN List". The odd part of that list is that it is not just a list of additional PLMN identities, but if the first digits of the IMSI are *not* listed in EF.EHPLMN, then the MCC/MNC of the IMSI prefix is suddently no longer considered the home network, but the subscriber is roaming. See TS 23.122: "If the HPLMN code derived from the IMSI is not present in the EHPLMN list, then it shall be treated as a Visited PLMN for PLMN selection purposes." Change-Id: I22d96ab4a424ec5bc1fb02f5e80165c646a748d3
2020-06-23pySim-read.py: Enable parsing of Home ePDG Identifier in USIMSupreeth Herle4-0/+6
As per TS 31.102, version 13.4.0 Release 13, this EF can found under ADF.USIM at File Id 6ff3. Also, if service n°106 and service n°107 are available, this file shall be present. Change-Id: I68114d328d1af5682a5bc1fa7642882e80b5de4d
2020-05-13Treat MCC and MNC as strings, not integersHarald Welte6-14/+14
A MNC of 02 and 002 are *not* equal. The former is a two-digit MNC and the latter is a three-digit MNC. Hence, we shouldn't treat MNCs as integer values as we have no clue how many leading zeroes (if any) the user entered. Change-Id: I9d1d07a64888c76703c3e430bbdd822080c05819 Closes: OS#4523
2020-05-12pySim-prog, pySim-read, do not echo reader idPhilipp Maier6-6/+6
pySim-prog and pySim-read currently echo back the pcsc reader id (or baudrate/socket, depending on the interface used). This makes the output unecessarly undeterministic, which becomes a problem when verifying the putput in tests. Lets not echo those variable, user supplied parameters back. Also lets move the code that does the initalization to utils, so that it can be used from pySim-prog and from pySim-read (code dup). Change-Id: I243cc332f075d007b1c111292effcc610e874eb3 Related: OS#4503
2020-05-09Fix writing of EF.HPLMNwAcT on sysmoISIM-SJA2Harald Welte1-10/+10
Change-Id: I9372a1a1f10fbe916659a8a50fe0e164987b2d5d Closes: OS#4532
2020-04-27Enable parsing of ISIM Service table (IST)Supreeth Herle1-0/+6
As per TS 31.103, This EF indicates which ISIM services are available. If a service is not indicated as available in the ISIM, the ME shall not select this service. Parsing of IST is achieved by first selecting the ISIM application using its AID. This is followed by selecting EF.IST with File ID - 6f07 in ADF.ISIM Change-Id: I3f0a7227360b72a707dc1bcc4cc9c8a4ec7ad2b2
2020-04-27Enable parsing of USIM Service table (UST)Supreeth Herle4-0/+153
As per TS.31.102, This EF indicates which USIM services are available. If a service is not indicated as available in the USIM, the ME shall not select this service. Parsing of UST is achieved by first selecting the USIM application using its AID. This is followed by selecting EF.UST with File ID - 6f38 in ADF.USIM Change-Id: I54dbbd40bd3d22cee81f7c32e58cd946f8564257
2020-04-27Use helper method to print available service in EF.SSTSupreeth Herle6-234/+240
Change-Id: I375475e9f7210dae4e8da7258d6824dc2d54cf4c
2020-04-16Populate AIDs present on the UICCSupreeth Herle2-2/+4
Change-Id: I4d0d8f5f1e8cb252be55a2995b730927cfa7004d
2020-04-16Add ability to parse SIM Service Table (EF.SST)Supreeth Herle6-0/+240
As per TS.51.011, This EF indicates which services in the SIM are allocated, and whether, if allocated, the service is activated .If a service is not indicated as available in the SIM, the ME shall not select this service. Change-Id: Id28a35727adbaaa9df19b1adc621a0c51ad0e51b
2020-03-22pySim-read.py: Added a common card detection function for both pySim-prog.py ↵Supreeth Herle6-4/+10
and pySim-read.py This function is used to detect the card type and return Card class/Card subclasses object if its a know card or else None. Also, an initial step towards refactoring of code. Change-Id: I71f57c6403dc933bd9d54f90df3d3fe105b4f66f
2020-03-13pySim-read.py: support for reading GID2 from SIMSupreeth Herle6-0/+6
Change-Id: I0e893c3929aa1be6b55af296484811a7b94db560
2020-03-13pySim-read.py: support for reading GID1 from SIMSupreeth Herle6-0/+6
Change-Id: I15d061daed20f770b9041977a0b1fc4fe44a8f95
2020-02-15pySim-prog.py: add support for MSISDN programmingSupreeth Herle2-1/+2
This change implements programming of EF.MSISDN as per 3GPP TS 31.102, sections 4.2.26 and 4.4.2.3, excluding the following fields: - Alpha Identifier (currently 'FF'O * 20), - Capability/Configuration1 Record Identifier ('FF'O), - Extension1 Record Identifier ('FF'O). This feature is introduced exclusively for sysmoUSIM-SJS1. Othere SIM card types need to be tested. Change-Id: Ie033a0ffc3697ae562eaa7a241a0f6af6c2b0594
2020-02-15pySim-read.py: fix reading and parsing of EF.MSISDNSupreeth Herle2-2/+2
This change implements parsing of EF.MSISDN (and thus EF.ADN) as per 3GPP TS 31.102, sections 4.2.26 and 4.4.2.3. Example (commercial SIM card from 401/02): EF.MSISDN: ffffffffffffffffffffffffffff07917787028982f7ffffffffffff Decoded (NPI=1 ToN=1): +77782098287 Note that sysmoUSIM-SJS1 in the test setup has malformed EF.MSISDN, so that's why the test output is changed. Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863
2020-02-15Fix MCC and MCC representation in the output of pySim-readSupreeth Herle4-8/+8
Change-Id: Ie699c0a38d5ae90e4d6109e4574ce860e4044096
2020-02-15pySim-read.py: print meaningful message when SPN is not setSupreeth Herle2-2/+2
Change-Id: I1d98520f33a8564c7d69f50a0811204f138f9dca
2020-02-14testdata/sysmoUSIM-SJS1.ok: make it match the actual EF.HPLMNAcTVadim Yanitskiy1-12/+12
Change-Id: Ibe1bf274c15a3159b012c6fe07ef6a7cbf0adbdb Related: OS#4383
2020-01-21Added feature to program SPN into sysmoUSIM-SJS1 SIM cardsSupreeth Herle1-3/+3
Change-Id: Ia0f1a36ecb3898eaa1cf9925864e13369b1f31ce
2020-01-21Added feature to read Service Provider Name (SPN) from the SIM cardSupreeth Herle6-0/+18
Change-Id: I8dc599a76c260ec2823ba5c9b22375b04a50daa8
2019-12-31cards: Add support for sysmo-isim-sja2Philipp Maier2-0/+60
The sysmo-isim-sja2 cards are not yet supported by pysim. Lets add support for writing KI and OPC in ADF.USIM and ADF.ISIM as well as the remaining common simcard parameters. Related: SYS#4466 Change-Id: I23e2b46eac0e0dbc2b271983d448999f6a459ecf
2019-12-16Fix automated testsPhilipp Maier5-5/+5
- The .ok files currently dictate in which pysical reader device the card must be placed. Lets remove this dependncy to make the setup more reliable. Testing in which reade a card is placed is not in the scope of our tests. - Fix bug in pysim-test.sh (test runner), so that the veriable $ADM_HEX gets reset after the execution of the tests. Change-Id: I12e6b46787efb39c5745f4e7f3cdcca9209881b8
2019-11-12Fairwaves-SIM: Add test dataPhilipp Maier2-0/+46
Add test-data in order to be able to run our hardware read/write tests on Fairwaves-SIM as well. Change-Id: I04713e8cb1098521eafa4594100fcc7226978e21
2019-09-03pySim-prog: Add option for hex ADM keysDaniel Willmann1-1/+1
pySim-prog would implicitly try to use the raw or hex-escaped format depending on the length of the parameter, now there is the option "-A" to explicitly specify the hex-escaped ADM1 key. pysim-test.sh: Explicitly use the "-A" option to pass the hex adm1 key for wavemobile cards Change-Id: Id75a03482aa7f8cc3bdbb8d5967f1e8ab45c179a
2019-09-02pysim-testdate: Add test data for Wavemobile-simPhilipp Maier2-0/+53
Change-Id: Id2baedf5ac6396a643f36444e8f570ad9c41fafb
2019-05-10pySim-*.py: print info about selected reader interfaceVadim Yanitskiy3-0/+3
Change-Id: Idd791d7ef635e15915aab13274aefc15e70777b0
2019-05-10utils: add EF [H|O]PLMNwAcT decoding.Daniel Laszlo Sitzer1-3/+42
Allow decoding and pretty printing of PLMNwAcT, HPLMNwAcT and OPLMNwAct. Includes unit tests for the added functions. Change-Id: I9b8ca6ffd98f665690b84239d9a228e2c72c6ff9
2019-05-10import pysim-testdata of automatic testing to this repositoryHarald Welte6-0/+59
This test data is used by the jenkins build verification for pySim, and it was previously located locally on the build slave. By moving the testdata to this repository, any contributor can modify both the code and the expected test results simultaneously. Change-Id: I6714b091a114035d6aab8ba750c5f2b86e438467