Welcome to Osmocom pySim¶
Introduction¶
pySim is a python implementation of various software that helps you with managing subscriber identity cards for cellular networks, so-called SIM cards.
Many Osmocom (Open Source Mobile Communications) projects relate to operating private / custom cellular networks, and provisioning SIM cards for said networks is in many cases a requirement to operate such networks.
To make use of most of pySim’s features, you will need a programmable SIM card, i.e. a card where you are the owner/operator and have sufficient credentials (such as the ADM PIN) in order to write to many if not most of the files on the card.
Such cards are, for example, available from sysmocom, a major contributor to pySim. See https://www.sysmocom.de/products/lab/sysmousim/ for more details.
pySim supports classic GSM SIM cards as well as ETSI UICC with 3GPP USIM and ISIM applications. It is easily extensible, so support for additional files, card applications, etc. can be added easily by any python developer. We do encourage you to submit your contributions to help this collaborative development project.
pySim consists of several parts:
a python library containing plenty of objects and methods that can be used for writing custom programs interfacing with SIM cards.
the [new] pySim-trace APDU trace decoder
the [legacy] pySim-prog and pySim-read tools
- pySim-shell
- Video Presentation
- Running pySim-shell
- Usage Examples
- Advanced Topics
- cmd2 basics
- pySim commands
- ISO7816 commands
- TS 102 221 commands
- Linear Fixed EF commands
- Transparent EF commands
- BER-TLV EF commands
- USIM commands
- File-specific commands
- EF.ARR: read_arr_record
- EF.ARR: read_arr_records
- DF.GSM/EF.SST: sst_service_allocate
- DF.GSM/EF.SST: sst_service_activate
- DF.GSM/EF.SST: sst_service_deallocate
- DF.GSM/EF.SST: sst_service_deactivate
- ADF.USIM/EF.EST: est_service_enable
- ADF.USIM/EF.EST: est_service_disable
- EF.IMSI: update_imsi_plmn
- ADF.USIM/EF.UST: ust_service_activate
- ADF.USIM/EF.UST: ust_service_deactivate
- ADF.USIM/EF.UST: ust_service_check
- ADF.ISIM/EF.IST: ist_service_activate
- ADF.ISIM/EF.IST: ist_service_deactivate
- ADF.ISIM/EF.IST: ist_service_check
- UICC Administrative commands
- ARA-M commands
- GlobalPlatform commands
- eUICC ISD-R commands
- cmd2 settable parameters
- pySim-trace
- Legacy tools
- pySim library
- pySim filesystem abstraction
- pySim commands abstraction
- pySim Transport
- pySim utility functions
CardCommand
CardCommandSet
DataObject
DataObjectChoice
DataObjectCollection
DataObjectSequence
TL0_DataObject
boxed_heading_str()
calculate_luhn()
dec_imsi()
derive_mcc()
derive_milenage_opc()
derive_mnc()
enc_imsi()
enc_plmn()
expand_hex()
get_addr_type()
mcc_from_imsi()
mnc_from_imsi()
sanitize_pin_adm()
sw_match()
tabulate_str_list()
verify_luhn()
- pySim exceptions
- pySim card_handler
- pySim card_key_provider
- osmo-smdpp