Giter Site home page Giter Site logo

super-sim-uplmn-coder's Introduction

Super SIM UPLMN Codec 1.0.0

A basic but handy SIM UPLMN (User-controlled Public Land Mobile Network) table coder and decoder. Use it to generate and check Super SIM UPLMN table entries. For more details see How and Why You Can Set Super SIM’s Network Attach Priority List.

Requirements

This utility requires Python 3 installed on your system.

Usage

Call the utility from the command line. Use it to prepare new UPLMN table entries and to check existing entries.

Encoding

To encode MCC-MNC (Mobile Country Code, Mobile Network Code) pairs, supply a sequence of these as arguments. You must include each pair in this order: MCC first, followed by MNC.

Values are not checked for validity.

Examples

$ python plmn_codec.py 310 410
AT+CRSM=214,28512,0,0,5,1300144080
$ python plmn_codec.py 310 410 310 260
AT+CRSM=214,28512,0,0,10,13001440801300624080
$ python plmn_codec.py 310 410 310
[ERROR] An MCC-MNC pairing is incomplete

The output is in the form of an usage-ready AT command set to write (214) the entered values to the SIM’s UPLMN table (28512) with an offset of zero (0,0 — MSB and LSB of the offset), ie. at the start of the table. You can edit the offset before sending the command if you need to insert values further into the UPLMN table. The number of bytes (10) is calculated and added to the command for you.

Each MCC-MNC paring is appended with RAT (Radio Access Technology) values: 4080. This indicates a primary preferred RAT of 4G (40) and a secondary RAT of GSM (80). For full details of the encoding, please see ETSI Technical Specification 131 102.

Decoding

You can decode UPLMN table entries, or entire tables, with the -p option.

Examples

$ python plmn_codec.py -p '+CRSM: 144,0,1300144080'
1. MCC: 310 MNC: 410 RAT(s): E-UTRAN in WB-S1, NB-S1 modes, GSM + EC-GSM-IoT
$ python plmn_codec.py -p AT+CRSM=214,28512,0,0,10,13006240801300144080
1. MCC: 310 MNC: 260 RAT(s): E-UTRAN in WB-S1, NB-S1 modes, GSM + EC-GSM-IoT
2. MCC: 310 MNC: 410 RAT(s): E-UTRAN in WB-S1, NB-S1 modes, GSM + EC-GSM-IoT
$ python plmn_codec.py -p 13006240801300144080
1. MCC: 310 MNC: 260 RAT(s): E-UTRAN in WB-S1, NB-S1 modes, GSM + EC-GSM-IoT
2. MCC: 310 MNC: 410 RAT(s): E-UTRAN in WB-S1, NB-S1 modes, GSM + EC-GSM-IoT
$ python plmn_codec.py -p 1300624
[ERROR] Malformed PLMNS data: 1300624

You can include as many -p options and accompanying arguments as you require.

Tests

Run the included test file with python -m unittest test*.

Copyright

This source code is copyright 2022-23, KORE Wireless.

Licence

This source code is made available under the terms of the MIT Licence.

super-sim-uplmn-coder's People

Contributors

smittytone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.