{"id":302,"date":"2017-06-20T15:42:02","date_gmt":"2017-06-20T15:42:02","guid":{"rendered":"http:\/\/open-cells.com\/?page_id=302"},"modified":"2024-03-05T17:57:12","modified_gmt":"2024-03-05T17:57:12","slug":"uiccsim-programing","status":"publish","type":"page","link":"https:\/\/open-cells.com\/index.php\/uiccsim-programing\/","title":{"rendered":"UICC\/SIM programing"},"content":{"rendered":"<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li>version 3.3\r\n<ul>\r\n<li>fix wrong encoding of PLMN in case of MNC on 3 digits\r\n<ul>\r\n<li>concerns all PLMN lists of forbidden, authorized, &#8230; for this case of 3 digits MNC<\/li>\r\n<\/ul>\r\n<\/li>\r\n<li>add a command line parameter to choose the authorized access technology\u00a0<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li>\r\n<p>Version 3.2:<\/p>\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li>bug fixing<\/li>\r\n<li>Fix issues in PC\/SC dialog, avoid SEGV with alien cards<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li style=\"list-style-type: none;\">\u00a0<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<p>Version 3.0:<\/p>\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li>Add support of PC\/SC protocol readers<\/li>\r\n<li>Add a README file with example commands<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<p>Version 2.6:<\/p>\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li>Fix 5G SA non-terrestrial (NTN) bit place<\/li>\r\n<li>Remove redundant SMS center configuration in source code<br \/>the SMSC is set to a default value<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<p>Version 2.5:<\/p>\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li>Add explicit support of 5G SA and 5G SA non-terrestrial (NTN)\r\n<ul>\r\n<li>Our cards are still 3GPP rel8<\/li>\r\n<li>We added in all PLMN with access technology files (operator controlled, user controlled) 5G SA and 5G NTN<\/li>\r\n<li>this HELPs brands like Oppo\/oneplus to see 5G networks\r\n<ul>\r\n<li>Quectel, Huawei were working fine without this change<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<p>Version 2.4:<\/p>\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li>Add core network debugging option\r\n<ul>\r\n<li>generate the AUTN message the 4G\/5G core network must generate according to milenage algorithm<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<p>Version 2.3:<\/p>\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li>Fix compiling issue in RedHat<\/li>\r\n<li>add option -ust to define USIM service table<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<p>Version 2.2:<\/p>\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul class=\"\">\r\n<li>Fix program assert related to MSISDN sending to the UICC card<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<p>Version 2.1:<\/p>\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li><span style=\"color: #ff0000;\">Mandatory update<\/span> for cards serial &gt; OC004110<\/li>\r\n<li>early V4 cards (serial between OC004000 and OC004110) have a bug in AUTS: please contact support<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<p>Version 2.0:<\/p>\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul class=\"\">\r\n<li>Add support of V4 UICC cards<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<p>Version 1.7:<\/p>\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li>Added type approval operations + specific facilities in USIM file Administrative Data(EFad) for VoLTE<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<p>Version 1.6:<\/p>\r\n<ul class=\"ili-indent\">\r\n<li>Added the USIM values display if the program is called without &#8220;&#8211;adm&#8221;<\/li>\r\n<li>Added the &#8211;authenticate (milenage verification and SQN) without &#8220;&#8211;adm&#8221;<\/li>\r\n<\/ul>\r\n<p>Version 1.5:<\/p>\r\n<ul class=\"ili-indent\">\r\n<li>Updated the &#8220;USIM service table&#8221; for some terminals compatibility<br \/>(to be able to disable &#8220;roaming&#8221; in UE configuration)<\/li>\r\n<\/ul>\r\n<p>Version 1.4:<\/p>\r\n<ul class=\"ili-indent\">\r\n<li>Fixed bug for MNC on 3 figures: initial UE location and SIM card overwrite from 2 figures MNC<\/li>\r\n<\/ul>\r\n<p>Version1.3:<\/p>\r\n<ul class=\"ili-indent\">\r\n<li>Extended ADM code to hexadecimal values<\/li>\r\n<\/ul>\r\n<p>Version 1.2:<\/p>\r\n<ul class=\"ili-indent\">\r\n<li>Added feature to set &#8220;service provider name&#8221; (SPN)<br \/>This name is displayed on the UE as operator name.<br \/>So, setting SPN different on each card is a convenient usage in labs<\/li>\r\n<li>Increased authentication delay to let more computation time to the UICC<\/li>\r\n<\/ul>\r\n<p>Version 1.1:<\/p>\r\n<ul class=\"ili-indent\">\r\n<li>bug fix:upper case hexa decimal values (A to F) was not processed correctly<\/li>\r\n<\/ul>\r\n<p>Version 1.0, new features:<\/p>\r\n<ul class=\"ili-indent\">\r\n<li>New feature to compute OPc from OP<\/li>\r\n<li>New feature: test authentication (test milenage implementation) and determine the current SQN inside the USIM<\/li>\r\n<li>More controls and warning<\/li>\r\n<li>Less information printed by default<\/li>\r\n<\/ul>\r\n<p>A tutorial on how to dialog with a &#8220;SIM card&#8221; and the 3GPP implementation<\/p>\r\n<p><a href=\"https:\/\/open-cells.com\/index.php\/uicc-tutorial\/\">UICC tutorial<\/a><\/p>\r\n<h1>Open Cells program<\/h1>\r\n<p>uicc.h:<\/p>\r\n<ul class=\"ili-indent\">\r\n<li>class UICC implements common dialog<\/li>\r\n<li>class SIM implements GSM specific dialog<\/li>\r\n<li>class USIM implements 3G\/4G dialogs<\/li>\r\n<\/ul>\r\n<p>aes.h, milenage.h:<\/p>\r\n<ul class=\"ili-indent\">\r\n<li>AES and milenage simple implementation to test the UICC authentication procedure<\/li>\r\n<\/ul>\r\n<p>program_uicc.c:<\/p>\r\n<ul class=\"ili-indent\">\r\n<li>uses these classes to read\/write data in Open cells cards.<\/li>\r\n<\/ul>\r\n<p>Other suppliers cards will also work, for the part that is compliant to standards.<\/p>\r\n<p>Compilation:<\/p>\r\n<pre>make<\/pre>\r\n<p>should compile with no warnings<\/p>\r\n<p>Insert the card in the reader and the reader in a USB socket as:<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-498 size-medium\" src=\"https:\/\/open-cells.com\/wp-content\/uploads\/2018\/01\/sim_inserted-221x300.jpg\" alt=\"\" width=\"221\" height=\"300\" srcset=\"https:\/\/open-cells.com\/wp-content\/uploads\/2018\/01\/sim_inserted-221x300.jpg 221w, https:\/\/open-cells.com\/wp-content\/uploads\/2018\/01\/sim_inserted-768x1041.jpg 768w, https:\/\/open-cells.com\/wp-content\/uploads\/2018\/01\/sim_inserted-755x1024.jpg 755w, https:\/\/open-cells.com\/wp-content\/uploads\/2018\/01\/sim_inserted-1200x1627.jpg 1200w\" sizes=\"auto, (max-width: 221px) 85vw, 221px\" \/><\/p>\r\n<pre>sudo .\/program_uicc<\/pre>\r\n<p>reads basic data in the card<\/p>\r\n<pre>sudo DEBUG=y .\/program_uicc<\/pre>\r\n<p>perform the same, with trace: all data exchange with the UICC are printed<\/p>\r\n<pre>sudo .\/program_uicc --help<\/pre>\r\n<p>shows the parameters help to set values in the UICC.<\/p>\r\n<p>A typical command line (with IMSI, OPC and Ki used in our example configuration files)<\/p>\r\n<pre>sudo .\/program_uicc --adm 12345678 --imsi 208920100001101 --isdn 00000001 --acc 0001 --key 6874736969202073796d4b2079650a73 --opc 504f20634f6320504f50206363500a4f -spn \"OpenCells01\" --authenticate --noreadafter<\/pre>\r\n<p>A README.txt file in the source directory provides examples.<\/p>\r\n<p>This README explains also how to use a PC\/SC reader.<\/p>\r\n<p><a href=\"https:\/\/open-cells.com\/d5138782a8739209ec5760865b1e53b0\/uicc-v3.3.tgz\">source code<\/a><\/p>\r\n<p>ADM code management changed in UICC version 4: you have to specify a ADM code to upload the UICC\/SIM, nevertheless you can use any 8 figures value.<\/p>\r\n<p>For cards before version 4 (before year 2021, serial below OC004000 or no serial printed on the card), you must use the ADM code that is written on the invoice.<\/p>\r\n<p>We offer free support: <a href=\"https:\/\/open-cells.com\/index.php\/uicc-faq\/\">FAQ<\/a><\/p>\r\n<p>If the answer is not in the FAQ, please write comments on the blog page: <a href=\"https:\/\/open-cells.com\/index.php\/2017\/06\/08\/uicc-interface\/\">uicc-interface<\/a> (so the answer can be used by other people).<\/p>\r\n\r\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>version 3.3 fix wrong encoding of PLMN in case of MNC on 3 digits concerns all PLMN lists of forbidden, authorized, &#8230; for this case of 3 digits MNC add a command line parameter to choose the authorized access technology\u00a0 Version 3.2: bug fixing Fix issues in PC\/SC dialog, avoid SEGV with alien cards \u00a0 &hellip; <a href=\"https:\/\/open-cells.com\/index.php\/uiccsim-programing\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;UICC\/SIM programing&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","footnotes":""},"class_list":["post-302","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/pages\/302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/comments?post=302"}],"version-history":[{"count":54,"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/pages\/302\/revisions"}],"predecessor-version":[{"id":5605,"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/pages\/302\/revisions\/5605"}],"wp:attachment":[{"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/media?parent=302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}