Mao V. Ngo
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Write a sim card with pySim ## Installation: Follow the online instruction: https://github.com/osmocom/pysim then install on an Ubuntu machine. If commands does not work, remember to restart and enable service `pcscd.service`: ``` sudo systemctl restart pcscd.service sudo systemctl enable pcscd.service ``` ## Usage: * Read: `./pySim-Read.py -p0` * Write to a sim card, we need to know ADM code. For Gialer, ADM=88888888. ` /pySim-prog.py -p 0 -n SUTD -a 92788340 -s 8988001010000649510  -i 001010000064951 -x 001 -y 01 -k 12345678901234567890123456789012 -o 12345678123456781234567812345678 ` * Write 525/200 to Gialer sim card, note `nmnclen="3"`: ` /pySim-prog.py -p 0 -n SUTD -a 88888888 -s 8988001010000649510  -i 525200000064951 -x 525 -y 200 --nmnclen="3" -k 12345678901234567890123456789012 -o 12345678123456781234567812345678 ` * Example to write a sim card to Open5GS core with `IMSI=001010100011318`, key- 12345678901234567890123456789012 -OP code 12345678123456781234567812345678: ``` fcc@xps:~/ws/pysim$ ./pySim-read.py -p 0 Using PC/SC reader interface Reading ... Autodetected card type: OpenCells-SIM ICCID: 8988001010000649318 IMSI: 001010100011318 GID1: ffffffff GID2: ffffffff SMSP: fffffffffffffffffffffffffdffffffffffffffffffffffff0191ffffffffffffffffffffffffff SPN: SUTD Show in HPLMN: False Hide in OPLMN: False PLMNsel: 00f110ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff PLMNwAcT: 00f1104000 # MCC: 001 MNC: 01 AcT: E-UTRAN ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused OPLMNwAcT: 00f1104000 # MCC: 001 MNC: 01 AcT: E-UTRAN ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused ffffffffff # unused HPLMNAcT: 00f1104000 # MCC: 001 MNC: 01 AcT: E-UTRAN ffffffffff # unused ffffffffff # unused ACC: 0100 MSISDN: Not available Administrative data: 00000002 MS operation mode: normal Ciphering Indicator: disabled SIM Service Table: ff33ffff00003f033000f0c3 Service 1 - CHV1 disable function Service 2 - Abbreviated Dialling Numbers (ADN) Service 3 - Fixed Dialling Numbers (FDN) Service 4 - Short Message Storage (SMS) Service 5 - Advice of Charge (AoC) Service 6 - Capability Configuration Parameters (CCP) Service 7 - PLMN selector Service 8 - RFU Service 9 - MSISDN Service 10 - Extension1 Service 13 - Last Number Dialled (LND) Service 14 - Cell Broadcast Message Identifier Service 17 - Service Provider Name Service 18 - Service Dialling Numbers (SDN) Service 19 - Extension3 Service 20 - RFU Service 21 - VGCS Group Identifier List (EFVGCS and EFVGCSS) Service 22 - VBS Group Identifier List (EFVBS and EFVBSS) Service 23 - enhanced Multi-Level Precedence and Pre-emption Service Service 24 - Automatic Answer for eMLPP Service 25 - Data download via SMS-CB Service 26 - Data download via SMS-PP Service 27 - Menu selection Service 28 - Call control Service 29 - Proactive SIM Service 30 - Cell Broadcast Message Identifier Ranges Service 31 - Barred Dialling Numbers (BDN) Service 32 - Extension4 Service 49 - MExE Service 50 - Reserved and shall be ignored Service 51 - PLMN Network Name Service 52 - Operator PLMN List Service 53 - Mailbox Dialling Numbers Service 54 - Message Waiting Indication Status Service 57 - Multimedia Messaging Service (MMS) Service 58 - Extension 8 EHPLMN: 00f110 # MCC: 001 MNC: 001 ffffff # unused ffffff # unused ffffff # unused USIM Service Table: 867f1f1c230e0000400050 Service 2 - Fixed Dialling Numbers (FDN) Service 3 - Extension 2 Service 8 - Outgoing Call Information (OCI and OCT) Service 9 - Incoming Call Information (ICI and ICT) Service 10 - Short Message Storage (SMS) Service 11 - Short Message Status Reports (SMSR) Service 12 - Short Message Service Parameters (SMSP) Service 13 - Advice of Charge (AoC) Service 14 - Capability Configuration Parameters 2 (CCP2) Service 15 - Cell Broadcast Message Identifier Service 17 - Group Identifier Level 1 Service 18 - Group Identifier Level 2 Service 19 - Service Provider Name Service 20 - User controlled PLMN selector with Access Technology Service 21 - MSISDN Service 27 - GSM Access Service 28 - Data download via SMS-PP Service 29 - Data download via SMS-CB Service 33 - shall be set to 1 Service 34 - Enabled Services Table Service 38 - GSM security context Service 42 - Operator controlled PLMN selector with Access Technology Service 43 - HPLMN selector with Access Technology Service 44 - Extension 5 Service 71 - Equivalent HPLMN Service 85 - EPS Mobility Management Information Service 87 - Call control on EPS PDN connection by USIM Done ! ``` * Write PLMN=525/200: ``` fcc@xps:~/ws/pysim$ ./pySim-prog.py -p 0 -n SUTD -a 88888888 -s 00000005252000011318 -i 525020000011318 -x 525 -y 200 --nmnclen="3" -k 12345678901234567890123456789012 -o 12345678123456781234567812345678 /home/fcc/ws/pysim/./pySim-prog.py:602: SyntaxWarning: "is" with a literal. Did you mean "=="? if opts.mnclen is "2": /home/fcc/ws/pysim/./pySim-prog.py:604: SyntaxWarning: "is" with a literal. Did you mean "=="? elif opts.mnclen is "3": Using PC/SC reader interface Ready for Programming: Insert card now (or CTRL-C to cancel) Autodetected card type: OpenCells-SIM Generated card parameters : > Name : SUTD > SMSP : e1ffffffffffffffffffffffff0581005155f5ffffffffffff000000 > ICCID : 00000005252000011318 > MCC/MNC : 525/200 > IMSI : 525020000011318 > Ki : 12345678901234567890123456789012 > OPC : 12345678123456781234567812345678 > ACC : None > ADM1(hex): 3838383838383838 > OPMODE : None Programming ... Programming successful: Remove card from reader ``` * write with PLMN=00101 `./pySim-prog.py -p 0 -n SUTD -a 88888888 -s 00000001010100011308 -i 001010100011308 -x 001 -y 01 -k 12345678901234567890123456789012 -o 12345678123456781234567812345678 ` ![](https://hackmd.io/_uploads/rJOKzDzsh.png)

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully