laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/31466 )
Change subject: docs: Document the file-specific commands for ADF.USIM/EF.EST
......................................................................
docs: Document the file-specific commands for ADF.USIM/EF.EST
Change-Id: Iddba9f25ba957f03ca25628a7742fe40fd79c030
---
M docs/shell.rst
1 file changed, 17 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/docs/shell.rst b/docs/shell.rst
index 801d2f4..c1f37af 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -555,6 +555,14 @@
~~~~~~~~~~~~~~~~~~~~~~~~
Read + decode all EF.ARR records in flattened, human-friendly form.
+ADF.USIM/EF.EST: est_service_enable
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Enables a single service in EF.EST. Requires service number as argument.
+
+ADF.USIM/EF.EST: est_service_disable
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Disables a single service in EF.EST. Requires service number as argument.
+
EF.IMSI: update_imsi_plmn
~~~~~~~~~~~~~~~~~~~~~~~~~
Change the PLMN part (MCC+MNC) of the IMSI. Requires a single argument consisting of 5/6 digits of
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/31466
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Iddba9f25ba957f03ca25628a7742fe40fd79c030
Gerrit-Change-Number: 31466
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/31464 )
Change subject: docs: Add reference for various commands
......................................................................
docs: Add reference for various commands
A number of more recently introduced commands were not yet listed in the
manual, let's fix that.
Change-Id: I39150f55eecb5d8ff48292dc5cc0f9e16dd4398c
---
M docs/shell.rst
1 file changed, 124 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/docs/shell.rst b/docs/shell.rst
index 2c8da84..801d2f4 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -514,6 +514,8 @@
USIM commands
-------------
+These commands are available only while ADF.USIM (or ADF.ISIM, respectively) is selected.
+
authenticate
~~~~~~~~~~~~
.. argparse::
@@ -539,6 +541,106 @@
:func: ADF_USIM.AddlShellCommands.envelope_sms_parser
+File-specific commands
+----------------------
+
+These commands are valid only if the respective file is currently selected. They perform some
+operation that's specific to this file only.
+
+EF.ARR: read_arr_record
+~~~~~~~~~~~~~~~~~~~~~~~
+Read one EF.ARR record in flattened, human-friendly form.
+
+EF.ARR: read_arr_records
+~~~~~~~~~~~~~~~~~~~~~~~~
+Read + decode all EF.ARR records in flattened, human-friendly form.
+
+EF.IMSI: update_imsi_plmn
+~~~~~~~~~~~~~~~~~~~~~~~~~
+Change the PLMN part (MCC+MNC) of the IMSI. Requires a single argument consisting of 5/6 digits of
+concatenated MCC+MNC.
+
+ADF.USIM/EF.UST: ust_service_activate
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Activates a single service in EF.UST. Requires service number as argument.
+
+ADF.USIM/EF.UST: ust_service_deactivate
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Deactivates a single service in EF.UST. Requires service number as argument.
+
+ADF.USIM/EF.UST: ust_service_check
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Check consistency between services of this file and files present/activated.
+Many services determine if one or multiple files shall be present/activated or if they shall be
+absent/deactivated. This performs a consistency check to ensure that no services are activated
+for files that are not - and vice-versa, no files are activated for services that are not. Error
+messages are printed for every inconsistency found.
+
+ADF.ISIM/EF.IST: ist_service_activate
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Activates a single service in EF.IST. Requires service number as argument.
+
+ADF.ISIM/EF.IST: ist_service_deactivate
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Deactivates a single service in EF.UST. Requires service number as argument.
+
+ADF.ISIM/EF.IST: ist_service_check
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Check consistency between services of this file and files present/activated.
+Many services determine if one or multiple files shall be present/activated or if they shall be
+absent/deactivated. This performs a consistency check to ensure that no services are activated
+for files that are not - and vice-versa, no files are activated for services that are not. Error
+messages are printed for every inconsistency found.
+
+
+UICC Administrative commands
+----------------------------
+
+ETSI TS 102 222 specifies a set of *Administrative Commands*, which can
+be used by the card issuer / operator to modify the file system structure
+(delete files, create files) or even to terminate individual files or the
+entire card.
+
+pySim-shell supports those commands, but **use extreme caution**.
+Unless you know exactly what you're doing, it's very easy to render your
+card unusable. You've been warned!
+
+delete_file
+~~~~~~~~~~~
+.. argparse::
+ :module: pySim.ts_102_222
+ :func: Ts102222Commands.delfile_parser
+
+
+terminate_df
+~~~~~~~~~~~~
+.. argparse::
+ :module: pySim.ts_102_222
+ :func: Ts102222Commands.termdf_parser
+
+terminate_ef
+~~~~~~~~~~~~
+.. argparse::
+ :module: pySim.ts_102_222
+ :func: Ts102222Commands.termdf_parser
+
+terminate_card
+~~~~~~~~~~~~~~
+.. argparse::
+ :module: pySim.ts_102_222
+ :func: Ts102222Commands.tcard_parser
+
+create_ef
+~~~~~~~~~
+.. argparse::
+ :module: pySim.ts_102_222
+ :func: Ts102222Commands.create_parser
+
+create_df
+~~~~~~~~~
+.. argparse::
+ :module: pySim.ts_102_222
+ :func: Ts102222Commands.createdf_parser
ARA-M commands
@@ -622,6 +724,16 @@
intended must be manually inserted again using `aram_store_ref_ar_do`
+GlobalPlatform commands
+-----------------------
+
+pySim-shell has only the mots rudimentary support for GlobalPlatform at this point. Please use dedicated
+projects like GlobalPlatformPro meanwhile.
+
+get_data
+~~~~~~~~
+Performs the GET DATA command as specified by GlobalPlatform.
+
cmd2 settable parameters
------------------------
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/31464
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I39150f55eecb5d8ff48292dc5cc0f9e16dd4398c
Gerrit-Change-Number: 31464
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: iedemam.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31538 )
Change subject: utils: store more fields from meas-feed in db
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
ha, i didn't even remember that this tool existed 😊
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31538
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I509c939524b11a4ee455bcfc3ebee6c5c35b9fba
Gerrit-Change-Number: 31538
Gerrit-PatchSet: 1
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: Jenkins Builder
Gerrit-Attention: iedemam <michael(a)kapsulate.com>
Gerrit-Comment-Date: Mon, 27 Feb 2023 13:36:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31529 )
Change subject: Interleaving for CSD
......................................................................
Interleaving for CSD
This patch adds the [de]interleaving for CSD (circuit switched data),
nominally for TCH/F 9.6, but the same is also used for TCH/F 4.8,
TCH/H 4.8, TCH/F 2.4 and TCH/F 14.4.
Related: OS#4396, OS#1572
Change-Id: I6b16c2d0d7febf3883da662b2c7fec543335de12
---
M src/coding/gsm0503_interleaving.c
M src/coding/libosmocoding.map
2 files changed, 68 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/coding/gsm0503_interleaving.c b/src/coding/gsm0503_interleaving.c
index 7809e83..cd2f235 100644
--- a/src/coding/gsm0503_interleaving.c
+++ b/src/coding/gsm0503_interleaving.c
@@ -678,4 +678,56 @@
}
}
+/* 3GPP TS 45.003 Section 3.3.4
+ * The coded bits are reordered and interleaved according to the following rule:
+ * i(B,j) = c(n,k) for k = 0,1,...,455
+ * n = 0,1,...,N,N + 1,...
+ * B = B0 +4n + (k mod 19) + (k div 114)
+ * j = (k mod 19) + 19 (k mod 6)
+ *
+ * The result of the interleaving is a distribution of the reordered 114
+ * bit of a given data block, n = N, over 19 blocks, 6 bits equally
+ * distributed in each block, in a diagonal way over consecutive blocks.
+ *
+ * Or in other words the interleaving is a distribution of the encoded,
+ * reordered 456 bits from four given input data blocks, which taken
+ * together give n = N, over 22 bursts, 6 bits equally distributed in
+ * the first and 22 nd bursts, 12 bits distributed in the second and 21
+ * st bursts, 18 bits distributed in the third and 20 th bursts and 24
+ * bits distributed in the other 16 bursts.
+ *
+ * The block of coded data is interleaved "diagonal", where a new block
+ * of coded data starts with every fourth burst and is distributed over
+ * 22 bursts.
+ *
+ * Also used for TCH/F4.8, TCH/H4.8, TCH/F2.4 and TCH/H2.4 and TCH/F14.4 */
+void gsm0503_tch_f96_interleave(const ubit_t *cB, ubit_t *iB)
+{
+ int j, k, B;
+
+ for (k = 0; k < 456; k++) {
+ /* upper bound for B: 4*n + 18 + 4 = 4*n + 22 */
+ B = /* B0 + 4n + */ (k % 19) + (k / 114);
+ /* upper bound for j: 18 + 19*5 = 113 */
+ j = (k % 19) + 19 * (k % 6);
+ /* upper iB index: 4*n+23*114-1 */
+ iB[B * 114 + j] = cB[k];
+ }
+}
+
+void gsm0503_tch_f96_deinterleave(sbit_t *cB, const sbit_t *iB)
+{
+ int j, k, B;
+
+ for (k = 0; k < 456; k++) {
+ /* upper bound for B: 4*n + 18 + 4 = 4*n + 22 */
+ B = /* B0 + 4n + */ (k % 19) + (k / 114);
+ /* upper bound for j: 18 + 19*5 = 113 */
+ j = (k % 19) + 19 * (k % 6);
+ /* upper iB index: 4*n+23*114-1 */
+ cB[k] = iB[B * 114 + j];
+ }
+}
+
+
/*! @} */
diff --git a/src/coding/libosmocoding.map b/src/coding/libosmocoding.map
index b083564..ff6ea80 100644
--- a/src/coding/libosmocoding.map
+++ b/src/coding/libosmocoding.map
@@ -76,6 +76,8 @@
gsm0503_xcch_interleave;
gsm0503_tch_fr_deinterleave;
gsm0503_tch_fr_interleave;
+gsm0503_tch_f96_deinterleave;
+gsm0503_tch_f96_interleave;
gsm0503_tch_hr_deinterleave;
gsm0503_tch_hr_interleave;
gsm0503_mcs1_ul_deinterleave;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31529
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6b16c2d0d7febf3883da662b2c7fec543335de12
Gerrit-Change-Number: 31529
Gerrit-PatchSet: 4
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: merged