How to access a SIM card programmatically?

前端 未结 5 1781
逝去的感伤
逝去的感伤 2021-01-30 04:57

Just any old GSM compatible SIM card (bonus for 3G USIM).

I presume I need some hardware? Can anyone recommend something cheap for hobbyist, and something more professio

5条回答
  •  醉话见心
    2021-01-30 05:16

    You can do that with any PC/SC smart card reader (and writer, as others pointed out) and a program that can read and parse the data for you.

    • Talking to a card is done via APDU commands (defined in ISO-7816)
    • The command set used by SIM (2G) and USIM (3G) cards is different, so you have to keep that in mind
    • The structure and format of the file system of a SIM card is defined in GSM 11.11 (for 2G) and ETSI TS 131.102 (for 3G) - all this documentation is public and available free of charge
    • The SMS are kept in a file called EF SMS, its name is 0x6F3C, its structure is defined in section 10.5.3 of GSM 11.11

    Direct answers to your questions:

    • Here's where to buy a SIM reader, click on 'photos' to see pics of the device and screenshots of the software
    • SIM Manager is the program that does everything you want (including reading SMS, restoring SMS, it can even attempt to recover deleted SMS - if they're still physically on the card)
    • A SIM card SDK is available too. It is a DLL you can load and apply in your program. This thing does all the hard work for you, all you need is to create a GUI on top of it

    I am one of the people from the team that created SIM Manager and the aforementioned SDK.

提交回复
热议问题